DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Kevin Laatz <kevin.laatz@intel.com>, dev@dpdk.org
Cc: bruce.richardson@intel.com, stephen@networkplumber.org, stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v3] net/ring: fix unchecked return value
Date: Tue, 13 Oct 2020 18:23:53 +0100	[thread overview]
Message-ID: <155dc035-457d-f794-0bfc-8bb20b09ca68@intel.com> (raw)
In-Reply-To: <20201013130704.1186595-1-kevin.laatz@intel.com>

On 10/13/2020 2:07 PM, Kevin Laatz wrote:
> Add a check for the return value of the sscanf call in
> parse_internal_args(), returning an error if we don't get the expected
> result.
> 
> Coverity issue: 362049
> Fixes: 96cb19521147 ("net/ring: use EAL APIs in PMD specific API")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>

<...>

> +#define ETH_RING_INTERNAL_ARG_MAX_LEN	19

Added following comment while merging: /* "0x..16chars..\0" */

<...>

> -	sscanf(value, "%p", &args);
> +	/* make sure 'value' is valid pointer length */
> +	if (strnlen(value, ETH_RING_INTERNAL_ARG_MAX_LEN) >=
> +			ETH_RING_INTERNAL_ARG_MAX_LEN) {
> +		PMD_LOG(ERR, "Error parsing internal args, 'value' too long");

'value' is variable name and may not fit to the debug log.
Replaced with "..., argument is too long" while merging.

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Applied to dpdk-next-net/main, thanks.

      reply	other threads:[~2020-10-13 17:24 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-22 17:20 [dpdk-dev] [PATCH] " Kevin Laatz
2020-09-23  8:06 ` David Marchand
2020-09-23  9:39   ` Bruce Richardson
2020-09-23  9:43     ` David Marchand
2020-09-23 10:04       ` Kevin Laatz
2020-09-23 10:25       ` Bruce Richardson
2020-09-25 12:43 ` Ferruh Yigit
2020-10-01 14:14   ` Kevin Laatz
2020-10-01 14:51     ` Ferruh Yigit
2020-10-01 17:09 ` [dpdk-dev] [PATCH v2] " Kevin Laatz
2020-10-12 11:57   ` Ferruh Yigit
2020-10-12 12:45     ` Bruce Richardson
2020-10-12 13:04       ` Ferruh Yigit
2020-10-12 13:11         ` Bruce Richardson
2020-10-13 13:07   ` [dpdk-dev] [PATCH v3] " Kevin Laatz
2020-10-13 17:23     ` Ferruh Yigit [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=155dc035-457d-f794-0bfc-8bb20b09ca68@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=kevin.laatz@intel.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.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 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).