* [PATCH] vhost: fix sprintf with snprintf
@ 2019-02-04 7:28 Pallantla Poornima
2019-02-04 9:32 ` Maxime Coquelin
2019-02-21 18:16 ` Maxime Coquelin
0 siblings, 2 replies; 4+ messages in thread
From: Pallantla Poornima @ 2019-02-04 7:28 UTC (permalink / raw)
To: dev
Cc: reshma.pattan, maxime.coquelin, tiwei.bie, zhihong.wang,
Pallantla Poornima, stable
sprintf function is not secure as it doesn't check the length of string.
More secure function snprintf is used.
Fixes: d7280c9fff ("vhost: support selective datapath")
Cc: stable@dpdk.org
Signed-off-by: Pallantla Poornima <pallantlax.poornima@intel.com>
---
lib/librte_vhost/vdpa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_vhost/vdpa.c b/lib/librte_vhost/vdpa.c
index 02083bb8a..fcc2c73a3 100644
--- a/lib/librte_vhost/vdpa.c
+++ b/lib/librte_vhost/vdpa.c
@@ -66,7 +66,7 @@ rte_vdpa_register_device(struct rte_vdpa_dev_addr *addr,
if (i == MAX_VHOST_DEVICE)
return -1;
- sprintf(device_name, "vdpa-dev-%d", i);
+ snprintf(device_name, sizeof(device_name), "vdpa-dev-%d", i);
dev = rte_zmalloc(device_name, sizeof(struct rte_vdpa_device),
RTE_CACHE_LINE_SIZE);
if (!dev)
--
2.17.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] vhost: fix sprintf with snprintf
2019-02-04 7:28 [PATCH] vhost: fix sprintf with snprintf Pallantla Poornima
@ 2019-02-04 9:32 ` Maxime Coquelin
[not found] ` <7AE31235A30B41498D1C31348DC858BD5B534A5F@IRSMSX103.ger.corp.intel.com>
2019-02-21 18:16 ` Maxime Coquelin
1 sibling, 1 reply; 4+ messages in thread
From: Maxime Coquelin @ 2019-02-04 9:32 UTC (permalink / raw)
To: Pallantla Poornima, dev; +Cc: reshma.pattan, tiwei.bie, zhihong.wang, stable
On 2/4/19 8:28 AM, Pallantla Poornima wrote:
> sprintf function is not secure as it doesn't check the length of string.
> More secure function snprintf is used.
>
> Fixes: d7280c9fff ("vhost: support selective datapath")
> Cc: stable@dpdk.org
>
> Signed-off-by: Pallantla Poornima <pallantlax.poornima@intel.com>
> ---
> lib/librte_vhost/vdpa.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] vhost: fix sprintf with snprintf
[not found] ` <7AE31235A30B41498D1C31348DC858BD5B534A5F@IRSMSX103.ger.corp.intel.com>
@ 2019-02-20 2:20 ` Tiwei Bie
0 siblings, 0 replies; 4+ messages in thread
From: Tiwei Bie @ 2019-02-20 2:20 UTC (permalink / raw)
To: Parthasarathy, JananeeX M
Cc: Maxime Coquelin, Poornima, PallantlaX, dev, Pattan, Reshma, Wang,
Zhihong, stable
On Tue, Feb 19, 2019 at 08:59:51PM +0800, Parthasarathy, JananeeX M wrote:
>
> >-----Original Message-----
> >From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Maxime Coquelin
> >Sent: Monday, February 04, 2019 3:02 PM
> >To: Poornima, PallantlaX <pallantlax.poornima@intel.com>; dev@dpdk.org
> >Cc: Pattan, Reshma <reshma.pattan@intel.com>; Bie, Tiwei
> ><tiwei.bie@intel.com>; Wang, Zhihong <zhihong.wang@intel.com>;
> >stable@dpdk.org
> >Subject: Re: [dpdk-dev] [PATCH] vhost: fix sprintf with snprintf
> >
> >
> >
> >On 2/4/19 8:28 AM, Pallantla Poornima wrote:
> >> sprintf function is not secure as it doesn't check the length of string.
> >> More secure function snprintf is used.
> >>
> >> Fixes: d7280c9fff ("vhost: support selective datapath")
> >> Cc: stable@dpdk.org
> >>
> >> Signed-off-by: Pallantla Poornima <pallantlax.poornima@intel.com>
> >> ---
> >> lib/librte_vhost/vdpa.c | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >
> >Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
> >
> >Thanks,
> >Maxime
>
> Request for Ack please if there are no comments
Maxime already did the review. It will be merged in this
release. :) But anyway,
Acked-by: Tiwei Bie <tiwei.bie@intel.com>
Thanks for your contribution.
>
> Thanks
> M.P.Jananee
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] vhost: fix sprintf with snprintf
2019-02-04 7:28 [PATCH] vhost: fix sprintf with snprintf Pallantla Poornima
2019-02-04 9:32 ` Maxime Coquelin
@ 2019-02-21 18:16 ` Maxime Coquelin
1 sibling, 0 replies; 4+ messages in thread
From: Maxime Coquelin @ 2019-02-21 18:16 UTC (permalink / raw)
To: Pallantla Poornima, dev; +Cc: reshma.pattan, tiwei.bie, zhihong.wang, stable
On 2/4/19 8:28 AM, Pallantla Poornima wrote:
> sprintf function is not secure as it doesn't check the length of string.
> More secure function snprintf is used.
>
> Fixes: d7280c9fff ("vhost: support selective datapath")
> Cc: stable@dpdk.org
>
> Signed-off-by: Pallantla Poornima <pallantlax.poornima@intel.com>
> ---
> lib/librte_vhost/vdpa.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Applied to dpdk-next-virtio/master.
Thanks,
Maxime
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-02-21 18:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-04 7:28 [PATCH] vhost: fix sprintf with snprintf Pallantla Poornima
2019-02-04 9:32 ` Maxime Coquelin
[not found] ` <7AE31235A30B41498D1C31348DC858BD5B534A5F@IRSMSX103.ger.corp.intel.com>
2019-02-20 2:20 ` Tiwei Bie
2019-02-21 18:16 ` Maxime Coquelin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.