patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] examples/vhost_scsi: fix buffer not terminated
@ 2017-09-22 13:07 Michal Jastrzebski
  2017-10-02 13:50 ` [dpdk-stable] [dpdk-dev] " Jastrzebski, MichalX K
  2017-10-12  6:44 ` [dpdk-stable] [PATCH v2] " Jacek Piasecki
  0 siblings, 2 replies; 11+ messages in thread
From: Michal Jastrzebski @ 2017-09-22 13:07 UTC (permalink / raw)
  To: yliu, maxime.coquelin
  Cc: dev, deepak.k.jain, Jacek Piasecki, changpeng.liu, stable

From: Jacek Piasecki <jacekx.piasecki@intel.com>

Fix size of buffer in strcpy. There was possible to get
not terminated string after copy operation.

Coverity issue: 158631
Fixes: db75c7af19bb ("examples/vhost_scsi: introduce a new sample app")
Cc: changpeng.liu@intel.com
Cc: stable@dpdk.org

Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
---
 examples/vhost_scsi/scsi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/examples/vhost_scsi/scsi.c b/examples/vhost_scsi/scsi.c
index 54d3104..de9639a 100644
--- a/examples/vhost_scsi/scsi.c
+++ b/examples/vhost_scsi/scsi.c
@@ -307,7 +307,8 @@
 		strncpy((char *)inqdata->t10_vendor_id, "INTEL", 8);
 
 		/* PRODUCT IDENTIFICATION */
-		strncpy((char *)inqdata->product_id, bdev->product_name, 16);
+		strncpy((char *)inqdata->product_id, bdev->product_name,
+				ARRAY_SIZE(inqdata->product_id) - 1);
 
 		/* PRODUCT REVISION LEVEL */
 		strncpy((char *)inqdata->product_rev, "0001", 4);
-- 
1.9.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH] examples/vhost_scsi: fix buffer not terminated
  2017-09-22 13:07 [dpdk-stable] [PATCH] examples/vhost_scsi: fix buffer not terminated Michal Jastrzebski
@ 2017-10-02 13:50 ` Jastrzebski, MichalX K
  2017-10-02 15:07   ` Maxime Coquelin
  2017-10-12  6:44 ` [dpdk-stable] [PATCH v2] " Jacek Piasecki
  1 sibling, 1 reply; 11+ messages in thread
From: Jastrzebski, MichalX K @ 2017-10-02 13:50 UTC (permalink / raw)
  To: Jastrzebski, MichalX K, yliu, maxime.coquelin
  Cc: dev, Jain, Deepak K, Piasecki, JacekX, Liu, Changpeng, stable

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Michal Jastrzebski
> Sent: Friday, September 22, 2017 3:08 PM
> To: yliu@fridaylinux.org; maxime.coquelin@redhat.com
> Cc: dev@dpdk.org; Jain, Deepak K <deepak.k.jain@intel.com>; Piasecki,
> JacekX <jacekx.piasecki@intel.com>; Liu, Changpeng
> <changpeng.liu@intel.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] examples/vhost_scsi: fix buffer not terminated
> 
> From: Jacek Piasecki <jacekx.piasecki@intel.com>
> 
> Fix size of buffer in strcpy. There was possible to get
> not terminated string after copy operation.
> 
> Coverity issue: 158631
> Fixes: db75c7af19bb ("examples/vhost_scsi: introduce a new sample app")
> Cc: changpeng.liu@intel.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
> ---
>  examples/vhost_scsi/scsi.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/examples/vhost_scsi/scsi.c b/examples/vhost_scsi/scsi.c
> index 54d3104..de9639a 100644
> --- a/examples/vhost_scsi/scsi.c
> +++ b/examples/vhost_scsi/scsi.c
> @@ -307,7 +307,8 @@
>  		strncpy((char *)inqdata->t10_vendor_id, "INTEL", 8);
> 
>  		/* PRODUCT IDENTIFICATION */
> -		strncpy((char *)inqdata->product_id, bdev->product_name,
> 16);
> +		strncpy((char *)inqdata->product_id, bdev->product_name,
> +				ARRAY_SIZE(inqdata->product_id) - 1);
> 
>  		/* PRODUCT REVISION LEVEL */
>  		strncpy((char *)inqdata->product_rev, "0001", 4);
> --
> 1.9.1

Hi Yu / Maxime,
I would like to ask for a feedback regarding proposed fix.
If everything is ok with it, please send acked-by.

Best regards
Michal.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH] examples/vhost_scsi: fix buffer not terminated
  2017-10-02 13:50 ` [dpdk-stable] [dpdk-dev] " Jastrzebski, MichalX K
@ 2017-10-02 15:07   ` Maxime Coquelin
  0 siblings, 0 replies; 11+ messages in thread
From: Maxime Coquelin @ 2017-10-02 15:07 UTC (permalink / raw)
  To: Jastrzebski, MichalX K, yliu
  Cc: dev, Jain, Deepak K, Piasecki, JacekX, Liu, Changpeng, stable



On 10/02/2017 03:50 PM, Jastrzebski, MichalX K wrote:
>> -----Original Message-----
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Michal Jastrzebski
>> Sent: Friday, September 22, 2017 3:08 PM
>> To: yliu@fridaylinux.org; maxime.coquelin@redhat.com
>> Cc: dev@dpdk.org; Jain, Deepak K <deepak.k.jain@intel.com>; Piasecki,
>> JacekX <jacekx.piasecki@intel.com>; Liu, Changpeng
>> <changpeng.liu@intel.com>; stable@dpdk.org
>> Subject: [dpdk-dev] [PATCH] examples/vhost_scsi: fix buffer not terminated
>>
>> From: Jacek Piasecki <jacekx.piasecki@intel.com>
>>
>> Fix size of buffer in strcpy. There was possible to get
>> not terminated string after copy operation.
>>
>> Coverity issue: 158631
>> Fixes: db75c7af19bb ("examples/vhost_scsi: introduce a new sample app")
>> Cc: changpeng.liu@intel.com
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
>> ---
>>   examples/vhost_scsi/scsi.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/examples/vhost_scsi/scsi.c b/examples/vhost_scsi/scsi.c
>> index 54d3104..de9639a 100644
>> --- a/examples/vhost_scsi/scsi.c
>> +++ b/examples/vhost_scsi/scsi.c
>> @@ -307,7 +307,8 @@
>>   		strncpy((char *)inqdata->t10_vendor_id, "INTEL", 8);
>>
>>   		/* PRODUCT IDENTIFICATION */
>> -		strncpy((char *)inqdata->product_id, bdev->product_name,
>> 16);
>> +		strncpy((char *)inqdata->product_id, bdev->product_name,
>> +				ARRAY_SIZE(inqdata->product_id) - 1);

Does it assume that product_id is memzero'ed before?
IIUC strncpy manpage, it wouldn't protect against non-null terminated
strings if it is not the case:

"
        A simple implementation of strncpy() might be:

            char *
            strncpy(char *dest, const char *src, size_t n)
            {
                size_t i;

                for (i = 0; i < n && src[i] != '\0'; i++)
                    dest[i] = src[i];
                for ( ; i < n; i++)
                    dest[i] = '\0';

                return dest;
            }
"

Cheers,
Maxime

>>
>>   		/* PRODUCT REVISION LEVEL */
>>   		strncpy((char *)inqdata->product_rev, "0001", 4);
>> --
>> 1.9.1
> 
> Hi Yu / Maxime,
> I would like to ask for a feedback regarding proposed fix.
> If everything is ok with it, please send acked-by.
> 
> Best regards
> Michal.
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [dpdk-stable] [PATCH v2] examples/vhost_scsi: fix buffer not terminated
  2017-09-22 13:07 [dpdk-stable] [PATCH] examples/vhost_scsi: fix buffer not terminated Michal Jastrzebski
  2017-10-02 13:50 ` [dpdk-stable] [dpdk-dev] " Jastrzebski, MichalX K
@ 2017-10-12  6:44 ` Jacek Piasecki
  2017-10-12 11:09   ` Maxime Coquelin
  2017-10-12 11:34   ` [dpdk-stable] [PATCH v3] " Jacek Piasecki
  1 sibling, 2 replies; 11+ messages in thread
From: Jacek Piasecki @ 2017-10-12  6:44 UTC (permalink / raw)
  To: dev
  Cc: maxime.coquelin, changpeng.liu, deepak.k.jain,
	michalx.k.jastrzebski, Jacek Piasecki, stable

Use snprintf instead strncpy to get safe null string termination.
There was possible to get not terminated string after strncpy operation.

Coverity issue: 158631
Fixes: db75c7af19bb ("examples/vhost_scsi: introduce a new sample app")
Cc: changpeng.liu@intel.com
Cc: stable@dpdk.org

Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
---
v2:
* use snprintf instead strncpy

 examples/vhost_scsi/scsi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/examples/vhost_scsi/scsi.c b/examples/vhost_scsi/scsi.c
index 54d3104..c0f3187 100644
--- a/examples/vhost_scsi/scsi.c
+++ b/examples/vhost_scsi/scsi.c
@@ -307,7 +307,8 @@
 		strncpy((char *)inqdata->t10_vendor_id, "INTEL", 8);
 
 		/* PRODUCT IDENTIFICATION */
-		strncpy((char *)inqdata->product_id, bdev->product_name, 16);
+		snprintf((char *)inqdata->product_id,
+				ARRAY_SIZE(inqdata->product_id), "%s", bdev->product_name);
 
 		/* PRODUCT REVISION LEVEL */
 		strncpy((char *)inqdata->product_rev, "0001", 4);
-- 
1.9.1

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-stable] [PATCH v2] examples/vhost_scsi: fix buffer not terminated
  2017-10-12  6:44 ` [dpdk-stable] [PATCH v2] " Jacek Piasecki
@ 2017-10-12 11:09   ` Maxime Coquelin
  2017-10-12 11:34   ` [dpdk-stable] [PATCH v3] " Jacek Piasecki
  1 sibling, 0 replies; 11+ messages in thread
From: Maxime Coquelin @ 2017-10-12 11:09 UTC (permalink / raw)
  To: Jacek Piasecki, dev
  Cc: changpeng.liu, deepak.k.jain, michalx.k.jastrzebski, stable



On 10/12/2017 08:44 AM, Jacek Piasecki wrote:
> Use snprintf instead strncpy to get safe null string termination.
> There was possible to get not terminated string after strncpy operation.
> 
> Coverity issue: 158631
> Fixes: db75c7af19bb ("examples/vhost_scsi: introduce a new sample app")
> Cc: changpeng.liu@intel.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
> ---
> v2:
> * use snprintf instead strncpy
> 
>   examples/vhost_scsi/scsi.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/examples/vhost_scsi/scsi.c b/examples/vhost_scsi/scsi.c
> index 54d3104..c0f3187 100644
> --- a/examples/vhost_scsi/scsi.c
> +++ b/examples/vhost_scsi/scsi.c
> @@ -307,7 +307,8 @@
>   		strncpy((char *)inqdata->t10_vendor_id, "INTEL", 8);
>   
>   		/* PRODUCT IDENTIFICATION */
> -		strncpy((char *)inqdata->product_id, bdev->product_name, 16);
> +		snprintf((char *)inqdata->product_id,
> +				ARRAY_SIZE(inqdata->product_id), "%s", bdev->product_name);
>   
>   		/* PRODUCT REVISION LEVEL */
>   		strncpy((char *)inqdata->product_rev, "0001", 4);
> 

Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [dpdk-stable] [PATCH v3] examples/vhost_scsi: fix buffer not terminated
  2017-10-12  6:44 ` [dpdk-stable] [PATCH v2] " Jacek Piasecki
  2017-10-12 11:09   ` Maxime Coquelin
@ 2017-10-12 11:34   ` Jacek Piasecki
  2017-10-13  7:12     ` Maxime Coquelin
  2017-10-25 10:07     ` [dpdk-stable] [PATCH v4] " Jacek Piasecki
  1 sibling, 2 replies; 11+ messages in thread
From: Jacek Piasecki @ 2017-10-12 11:34 UTC (permalink / raw)
  To: dev
  Cc: maxime.coquelin, michalx.k.jastrzebski, Jacek Piasecki,
	changpeng.liu, stable

Use snprintf instead strncpy to get safe null string termination.
There was possible to get not terminated string after strncpy operation.

Coverity issue: 158631
Fixes: db75c7af19bb ("examples/vhost_scsi: introduce a new sample app")
Cc: changpeng.liu@intel.com
Cc: stable@dpdk.org

Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
---
 examples/vhost_scsi/scsi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/examples/vhost_scsi/scsi.c b/examples/vhost_scsi/scsi.c
index 54d3104..2de3110 100644
--- a/examples/vhost_scsi/scsi.c
+++ b/examples/vhost_scsi/scsi.c
@@ -307,7 +307,9 @@ vhost_bdev_scsi_inquiry_command(struct vhost_block_dev *bdev,
 		strncpy((char *)inqdata->t10_vendor_id, "INTEL", 8);
 
 		/* PRODUCT IDENTIFICATION */
-		strncpy((char *)inqdata->product_id, bdev->product_name, 16);
+		snprintf((char *)inqdata->product_id,
+				ARRAY_SIZE(inqdata->product_id), "%s",
+				bdev->product_name);
 
 		/* PRODUCT REVISION LEVEL */
 		strncpy((char *)inqdata->product_rev, "0001", 4);
-- 
2.7.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-stable] [PATCH v3] examples/vhost_scsi: fix buffer not terminated
  2017-10-12 11:34   ` [dpdk-stable] [PATCH v3] " Jacek Piasecki
@ 2017-10-13  7:12     ` Maxime Coquelin
  2017-10-17 13:26       ` [dpdk-stable] [dpdk-dev] " Yuanhan Liu
  2017-10-25 10:07     ` [dpdk-stable] [PATCH v4] " Jacek Piasecki
  1 sibling, 1 reply; 11+ messages in thread
From: Maxime Coquelin @ 2017-10-13  7:12 UTC (permalink / raw)
  To: Jacek Piasecki, dev; +Cc: michalx.k.jastrzebski, changpeng.liu, stable



On 10/12/2017 01:34 PM, Jacek Piasecki wrote:
> Use snprintf instead strncpy to get safe null string termination.
> There was possible to get not terminated string after strncpy operation.
> 
> Coverity issue: 158631
> Fixes: db75c7af19bb ("examples/vhost_scsi: introduce a new sample app")
> Cc: changpeng.liu@intel.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
> ---
>   examples/vhost_scsi/scsi.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/examples/vhost_scsi/scsi.c b/examples/vhost_scsi/scsi.c
> index 54d3104..2de3110 100644
> --- a/examples/vhost_scsi/scsi.c
> +++ b/examples/vhost_scsi/scsi.c
> @@ -307,7 +307,9 @@ vhost_bdev_scsi_inquiry_command(struct vhost_block_dev *bdev,
>   		strncpy((char *)inqdata->t10_vendor_id, "INTEL", 8);
>   
>   		/* PRODUCT IDENTIFICATION */
> -		strncpy((char *)inqdata->product_id, bdev->product_name, 16);
> +		snprintf((char *)inqdata->product_id,
> +				ARRAY_SIZE(inqdata->product_id), "%s",
> +				bdev->product_name);
>   
>   		/* PRODUCT REVISION LEVEL */
>   		strncpy((char *)inqdata->product_rev, "0001", 4);
> 

Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH v3] examples/vhost_scsi: fix buffer not terminated
  2017-10-13  7:12     ` Maxime Coquelin
@ 2017-10-17 13:26       ` Yuanhan Liu
  2017-10-24 16:22         ` Thomas Monjalon
  0 siblings, 1 reply; 11+ messages in thread
From: Yuanhan Liu @ 2017-10-17 13:26 UTC (permalink / raw)
  To: Maxime Coquelin
  Cc: Jacek Piasecki, dev, michalx.k.jastrzebski, changpeng.liu, stable

On Fri, Oct 13, 2017 at 09:12:33AM +0200, Maxime Coquelin wrote:
> 
> 
> On 10/12/2017 01:34 PM, Jacek Piasecki wrote:
> >Use snprintf instead strncpy to get safe null string termination.
> >There was possible to get not terminated string after strncpy operation.
> >
> >Coverity issue: 158631
> >Fixes: db75c7af19bb ("examples/vhost_scsi: introduce a new sample app")
> >Cc: changpeng.liu@intel.com
> >Cc: stable@dpdk.org
> >
> >Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
> >---
> >  examples/vhost_scsi/scsi.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> >diff --git a/examples/vhost_scsi/scsi.c b/examples/vhost_scsi/scsi.c
> >index 54d3104..2de3110 100644
> >--- a/examples/vhost_scsi/scsi.c
> >+++ b/examples/vhost_scsi/scsi.c
> >@@ -307,7 +307,9 @@ vhost_bdev_scsi_inquiry_command(struct vhost_block_dev *bdev,
> >  		strncpy((char *)inqdata->t10_vendor_id, "INTEL", 8);
> >  		/* PRODUCT IDENTIFICATION */
> >-		strncpy((char *)inqdata->product_id, bdev->product_name, 16);
> >+		snprintf((char *)inqdata->product_id,
> >+				ARRAY_SIZE(inqdata->product_id), "%s",
> >+				bdev->product_name);
> >  		/* PRODUCT REVISION LEVEL */
> >  		strncpy((char *)inqdata->product_rev, "0001", 4);
> >
> 
> Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Firstly, sorry for being so late response. And,

Applied to dpdk-next-virtio. Thanks!

	--yliu

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH v3] examples/vhost_scsi: fix buffer not terminated
  2017-10-17 13:26       ` [dpdk-stable] [dpdk-dev] " Yuanhan Liu
@ 2017-10-24 16:22         ` Thomas Monjalon
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas Monjalon @ 2017-10-24 16:22 UTC (permalink / raw)
  To: Yuanhan Liu, Maxime Coquelin, Jacek Piasecki
  Cc: stable, dev, michalx.k.jastrzebski, changpeng.liu

17/10/2017 15:26, Yuanhan Liu:
> On Fri, Oct 13, 2017 at 09:12:33AM +0200, Maxime Coquelin wrote:
> > On 10/12/2017 01:34 PM, Jacek Piasecki wrote:
> > >--- a/examples/vhost_scsi/scsi.c
> > >+++ b/examples/vhost_scsi/scsi.c
> > >@@ -307,7 +307,9 @@ vhost_bdev_scsi_inquiry_command(struct vhost_block_dev *bdev,
> > >  		strncpy((char *)inqdata->t10_vendor_id, "INTEL", 8);
> > >  		/* PRODUCT IDENTIFICATION */
> > >-		strncpy((char *)inqdata->product_id, bdev->product_name, 16);
> > >+		snprintf((char *)inqdata->product_id,
> > >+				ARRAY_SIZE(inqdata->product_id), "%s",
> > >+				bdev->product_name);
> > >  		/* PRODUCT REVISION LEVEL */
> > >  		strncpy((char *)inqdata->product_rev, "0001", 4);
> > 
> > Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> 
> Firstly, sorry for being so late response. And,
> 
> Applied to dpdk-next-virtio. Thanks!

I don't know where this ARRAY_SIZE comes from.
It does not compile.
In DPDK you can use RTE_DIM.

This patch is removed from the next-virtio pull queue.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [dpdk-stable] [PATCH v4] examples/vhost_scsi: fix buffer not terminated
  2017-10-12 11:34   ` [dpdk-stable] [PATCH v3] " Jacek Piasecki
  2017-10-13  7:12     ` Maxime Coquelin
@ 2017-10-25 10:07     ` Jacek Piasecki
  2017-10-25 10:18       ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon
  1 sibling, 1 reply; 11+ messages in thread
From: Jacek Piasecki @ 2017-10-25 10:07 UTC (permalink / raw)
  To: dev; +Cc: maxime.coquelin, thomas, yliu, Jacek Piasecki, changpeng.liu, stable

Use snprintf instead strncpy to get safe null string termination.
There was possible to get not terminated string after strncpy operation.

Coverity issue: 158631
Fixes: db75c7af19bb ("examples/vhost_scsi: introduce a new sample app")
Cc: changpeng.liu@intel.com
Cc: stable@dpdk.org

Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
v4: RTE_DIM instead ARRAY_SIZE
v3: checkpatch fix
v2: snprintf instead strncpy
---
 examples/vhost_scsi/scsi.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/examples/vhost_scsi/scsi.c b/examples/vhost_scsi/scsi.c
index 54d3104..fd430ec 100644
--- a/examples/vhost_scsi/scsi.c
+++ b/examples/vhost_scsi/scsi.c
@@ -307,7 +307,9 @@ vhost_bdev_scsi_inquiry_command(struct vhost_block_dev *bdev,
 		strncpy((char *)inqdata->t10_vendor_id, "INTEL", 8);
 
 		/* PRODUCT IDENTIFICATION */
-		strncpy((char *)inqdata->product_id, bdev->product_name, 16);
+		snprintf((char *)inqdata->product_id,
+				RTE_DIM(inqdata->product_id), "%s",
+				bdev->product_name);
 
 		/* PRODUCT REVISION LEVEL */
 		strncpy((char *)inqdata->product_rev, "0001", 4);
-- 
2.7.4

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH v4] examples/vhost_scsi: fix buffer not terminated
  2017-10-25 10:07     ` [dpdk-stable] [PATCH v4] " Jacek Piasecki
@ 2017-10-25 10:18       ` Thomas Monjalon
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas Monjalon @ 2017-10-25 10:18 UTC (permalink / raw)
  To: Jacek Piasecki; +Cc: dev, maxime.coquelin, yliu, changpeng.liu, stable

25/10/2017 12:07, Jacek Piasecki:
> Use snprintf instead strncpy to get safe null string termination.
> There was possible to get not terminated string after strncpy operation.
> 
> Coverity issue: 158631
> Fixes: db75c7af19bb ("examples/vhost_scsi: introduce a new sample app")
> Cc: changpeng.liu@intel.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
> Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> ---
> v4: RTE_DIM instead ARRAY_SIZE
> v3: checkpatch fix
> v2: snprintf instead strncpy

Applied, thanks

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-10-25 10:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-22 13:07 [dpdk-stable] [PATCH] examples/vhost_scsi: fix buffer not terminated Michal Jastrzebski
2017-10-02 13:50 ` [dpdk-stable] [dpdk-dev] " Jastrzebski, MichalX K
2017-10-02 15:07   ` Maxime Coquelin
2017-10-12  6:44 ` [dpdk-stable] [PATCH v2] " Jacek Piasecki
2017-10-12 11:09   ` Maxime Coquelin
2017-10-12 11:34   ` [dpdk-stable] [PATCH v3] " Jacek Piasecki
2017-10-13  7:12     ` Maxime Coquelin
2017-10-17 13:26       ` [dpdk-stable] [dpdk-dev] " Yuanhan Liu
2017-10-24 16:22         ` Thomas Monjalon
2017-10-25 10:07     ` [dpdk-stable] [PATCH v4] " Jacek Piasecki
2017-10-25 10:18       ` [dpdk-stable] [dpdk-dev] " Thomas Monjalon

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).