All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Gaetan Rivet <gaetan.rivet@6wind.com>
Cc: stable@dpdk.org, dev@dpdk.org, Ferruh Yigit <ferruh.yigit@intel.com>
Subject: Re: [dpdk-stable] [PATCH v2] ethdev: fix invalid length write on dev detach
Date: Mon, 31 Jul 2017 16:18:11 +0200	[thread overview]
Message-ID: <3471108.DBEpgv82Pf@xps> (raw)
In-Reply-To: <a7e0d6177618a3862345326a07e421de22926428.1501508151.git.gaetan.rivet@6wind.com>

31/07/2017 15:40, Gaetan Rivet:
> The name of a device is copied in a provided buffer within
> rte_eth_dev_detach(). The current sizeof is done on a pointer instead of
> the intended array usually pointed to.
> 
> The name field of an rte_device is not assured however to point an
> rte_devargs name field. The almost correct length to base this copy over
> is thus RTE_DEV_NAME_MAX_LEN.
> 
> Almost correct, because unfortunately this function does not allow the
> user to pass down a size parameter for the buffer it is meant to write.
> This API should be fixed, it is broken by design.
> 
> Fixes: a1e7c17555e8 ("ethdev: use device name from device structure")
> Cc: stable@dpdk.org
> Cc: Ferruh Yigit <ferruh.yigit@intel.com>
> 
> Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>

Applied, thanks

      reply	other threads:[~2017-07-31 14:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-31 10:29 [PATCH] ethdev: fix invalid length write on dev detach Gaetan Rivet
2017-07-31 13:27 ` Thomas Monjalon
2017-07-31 13:29   ` Gaëtan Rivet
2017-07-31 13:40 ` [PATCH v2] " Gaetan Rivet
2017-07-31 14:18   ` Thomas Monjalon [this message]

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=3471108.DBEpgv82Pf@xps \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=gaetan.rivet@6wind.com \
    --cc=stable@dpdk.org \
    /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 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.