patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Hunt, David" <david.hunt@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dev@dpdk.org, stable@dpdk.org, bruce.richardson@intel.com,
	anatoly.burakov@intel.com
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v2] examples/vm_power: fix strcpy buffer overrun
Date: Tue, 16 Jul 2019 12:23:26 +0100	[thread overview]
Message-ID: <e2cb92aa-61bd-2548-50c6-c499084575a9@intel.com> (raw)
In-Reply-To: <1731111.OQE5oHDSl3@xps>


On 16/07/2019 12:05, Thomas Monjalon wrote:
> 16/07/2019 10:24, David Hunt:
>> replace strcpy with strlcpy to prevent buffer overrun
>> With fix, attempting to use a VERY lonng vm name results in a nicely
>> truncated 32 character name rather than a segfault:
>> Setting VM Name to [sdfdsfsfsdffdsdsasdsadasdakjshd]
>>
>> Using strlcpy rather than rte_strlcpy, as the rte_ version is only a
>> fallback.
>>
>> As well as the fix in main.c, this patch also changes an occurrence of
>> rte_strlcpy in channel_manager.c and channel_monitor.c to strlcpy.
> [...]
>> --- a/examples/vm_power_manager/guest_cli/main.c
>> +++ b/examples/vm_power_manager/guest_cli/main.c
>> -			strcpy(policy->vm_name, optarg);
>> +			rte_strlcpy(policy->vm_name, optarg, VM_MAX_NAME_SZ);
> This is still using rte_strlcpy !!


Apologies, too many balls in the air.  v3 pushed.



  reply	other threads:[~2019-07-16 11:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-12 14:04 [dpdk-stable] [PATCH v1] " David Hunt
2019-07-12 14:14 ` [dpdk-stable] [dpdk-dev] " Burakov, Anatoly
2019-07-12 14:47 ` Bruce Richardson
2019-07-14 13:26   ` Thomas Monjalon
2019-07-16  8:24 ` [dpdk-stable] [PATCH v2] " David Hunt
2019-07-16 11:05   ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
2019-07-16 11:23     ` Hunt, David [this message]
2019-07-16 11:19   ` [dpdk-stable] [PATCH v3] " David Hunt
2019-07-16 11:28     ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e2cb92aa-61bd-2548-50c6-c499084575a9@intel.com \
    --to=david.hunt@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).