* [dpdk-dev] [PATCH] pmd_virtio: Buffer not null terminated
@ 2017-09-19 11:41 SebastianX Basierski
2017-09-20 0:52 ` Tan, Jianfeng
2017-10-09 3:07 ` Yuanhan Liu
0 siblings, 2 replies; 5+ messages in thread
From: SebastianX Basierski @ 2017-09-19 11:41 UTC (permalink / raw)
To: skhare; +Cc: SebastianX Basierski, jianfeng.tan, dev
Fix calling strncpy with the a maximum size equal of destination
array size.
Coverity issue: 140732
Fixes: e3b434818bbb ("net/virtio-user: support kernel vhost")
Cc: jianfeng.tan@intel.com
cc: dev@dpdk.org
Signed-off-by: SebastianX Basierski <sebastianx.basierski@intel.com>
---
drivers/net/virtio/virtio_user/vhost_kernel_tap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
index f585de8..689a5cf 100644
--- a/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
+++ b/drivers/net/virtio/virtio_user/vhost_kernel_tap.c
@@ -95,9 +95,9 @@ vhost_kernel_open_tap(char **p_ifname, int hdr_size, int req_mq)
ifr.ifr_flags |= IFF_MULTI_QUEUE;
if (*p_ifname)
- strncpy(ifr.ifr_name, *p_ifname, IFNAMSIZ);
+ strncpy(ifr.ifr_name, *p_ifname, IFNAMSIZ - 1);
else
- strncpy(ifr.ifr_name, "tap%d", IFNAMSIZ);
+ strncpy(ifr.ifr_name, "tap%d", IFNAMSIZ - 1);
if (ioctl(tapfd, TUNSETIFF, (void *)&ifr) == -1) {
PMD_DRV_LOG(ERR, "TUNSETIFF failed: %s", strerror(errno));
goto error;
--
2.7.4
--------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek
przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by
others is strictly prohibited.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] pmd_virtio: Buffer not null terminated
2017-09-19 11:41 [dpdk-dev] [PATCH] pmd_virtio: Buffer not null terminated SebastianX Basierski
@ 2017-09-20 0:52 ` Tan, Jianfeng
2017-09-20 9:19 ` Basierski, SebastianX
2017-10-09 3:07 ` Yuanhan Liu
1 sibling, 1 reply; 5+ messages in thread
From: Tan, Jianfeng @ 2017-09-20 0:52 UTC (permalink / raw)
To: Basierski, SebastianX, skhare; +Cc: dev
> -----Original Message-----
> From: Basierski, SebastianX
> Sent: Tuesday, September 19, 2017 7:41 PM
> To: skhare@vmware.com
> Cc: Basierski, SebastianX; Tan, Jianfeng; dev@dpdk.org
> Subject: [PATCH] pmd_virtio: Buffer not null terminated
>
> Fix calling strncpy with the a maximum size equal of destination
> array size.
>
> Coverity issue: 140732
>
> Fixes: e3b434818bbb ("net/virtio-user: support kernel vhost")
> Cc: jianfeng.tan@intel.com
> cc: dev@dpdk.org
You want to Cc stable@dpdk.org?
>
> Signed-off-by: SebastianX Basierski <sebastianx.basierski@intel.com>
Besides the above nit,
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] pmd_virtio: Buffer not null terminated
2017-09-20 0:52 ` Tan, Jianfeng
@ 2017-09-20 9:19 ` Basierski, SebastianX
2017-09-20 9:41 ` Tan, Jianfeng
0 siblings, 1 reply; 5+ messages in thread
From: Basierski, SebastianX @ 2017-09-20 9:19 UTC (permalink / raw)
To: Tan, Jianfeng, skhare; +Cc: dev
> -----Original Message-----
> From: Basierski, SebastianX
> Sent: Tuesday, September 19, 2017 7:41 PM
> To: skhare@vmware.com
> Cc: Basierski, SebastianX; Tan, Jianfeng; dev@dpdk.org
> Subject: [PATCH] pmd_virtio: Buffer not null terminated
>
> Fix calling strncpy with the a maximum size equal of destination array
> size.
>
> Coverity issue: 140732
>
> Fixes: e3b434818bbb ("net/virtio-user: support kernel vhost")
> Cc: jianfeng.tan@intel.com
> cc: dev@dpdk.org
You want to Cc stable@dpdk.org?
>
> Signed-off-by: SebastianX Basierski <sebastianx.basierski@intel.com>
Besides the above nit,
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
Hi,
I don't understand.
Are You asking me to send this patch as cc to stable@dpdk.org, but without lines below?
>
> Signed-off-by: SebastianX Basierski <sebastianx.basierski@intel.com>
--------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek
przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by
others is strictly prohibited.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] pmd_virtio: Buffer not null terminated
2017-09-20 9:19 ` Basierski, SebastianX
@ 2017-09-20 9:41 ` Tan, Jianfeng
0 siblings, 0 replies; 5+ messages in thread
From: Tan, Jianfeng @ 2017-09-20 9:41 UTC (permalink / raw)
To: Basierski, SebastianX, skhare; +Cc: dev
> -----Original Message-----
> From: Basierski, SebastianX
> Sent: Wednesday, September 20, 2017 5:20 PM
> To: Tan, Jianfeng; skhare@vmware.com
> Cc: dev@dpdk.org
> Subject: RE: [PATCH] pmd_virtio: Buffer not null terminated
>
...
>
>
> Hi,
>
> I don't understand.
> Are You asking me to send this patch as cc to stable@dpdk.org, but without
> lines below?
Nope. We need to cc stable@dpdk.org for bug fixes.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH] pmd_virtio: Buffer not null terminated
2017-09-19 11:41 [dpdk-dev] [PATCH] pmd_virtio: Buffer not null terminated SebastianX Basierski
2017-09-20 0:52 ` Tan, Jianfeng
@ 2017-10-09 3:07 ` Yuanhan Liu
1 sibling, 0 replies; 5+ messages in thread
From: Yuanhan Liu @ 2017-10-09 3:07 UTC (permalink / raw)
To: SebastianX Basierski; +Cc: skhare, jianfeng.tan, dev
On Tue, Sep 19, 2017 at 01:41:04PM +0200, SebastianX Basierski wrote:
> Fix calling strncpy with the a maximum size equal of destination
> array size.
>
> Coverity issue: 140732
>
> Fixes: e3b434818bbb ("net/virtio-user: support kernel vhost")
> Cc: jianfeng.tan@intel.com
> cc: dev@dpdk.org
>
> Signed-off-by: SebastianX Basierski <sebastianx.basierski@intel.com>
Applied to dpdk-next-virtio.
Thanks.
--yliu
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-10-09 3:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-19 11:41 [dpdk-dev] [PATCH] pmd_virtio: Buffer not null terminated SebastianX Basierski
2017-09-20 0:52 ` Tan, Jianfeng
2017-09-20 9:19 ` Basierski, SebastianX
2017-09-20 9:41 ` Tan, Jianfeng
2017-10-09 3:07 ` Yuanhan Liu
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).