netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Gianfranco Trad <gianf.trad@gmail.com>
Cc: manishc@marvell.com, andrew+netdev@lunn.ch, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	skhan@linuxfoundation.org
Subject: Re: [PATCH v2] qed: fix possible uninit pointer read in qed_mcp_nvm_info_populate()
Date: Mon, 16 Dec 2024 16:07:03 +0000	[thread overview]
Message-ID: <20241216160703.GE780307@kernel.org> (raw)
In-Reply-To: <20241215011733.351325-2-gianf.trad@gmail.com>

On Sun, Dec 15, 2024 at 02:17:34AM +0100, Gianfranco Trad wrote:
> Coverity reports an uninit pointer read in qed_mcp_nvm_info_populate().
> If EOPNOTSUPP is returned from qed_mcp_bist_nvm_get_num_images() ensure
> nvm_info.num_images is set to 0 to avoid possible uninit assignment
> to p_hwfn->nvm_info.image_att later on in out label.
> 
> Closes: https://scan5.scan.coverity.com/#/project-view/63204/10063?selectedIssue=1636666
> Suggested-by: Simon Horman <horms@kernel.org>
> Signed-off-by: Gianfranco Trad <gianf.trad@gmail.com>
> ---
> Notes:
>   - Changes in v2: set nvm_info.num_images to 0 before goto out.
>   - Link to v1: https://lore.kernel.org/all/20241211134041.65860-2-gianf.trad@gmail.com/

Thanks for the update.

Reviewed-by: Simon Horman <horms@kernel.org>


  reply	other threads:[~2024-12-16 16:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-15  1:17 [PATCH v2] qed: fix possible uninit pointer read in qed_mcp_nvm_info_populate() Gianfranco Trad
2024-12-16 16:07 ` Simon Horman [this message]
2024-12-17 14:20 ` patchwork-bot+netdevbpf

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=20241216160703.GE780307@kernel.org \
    --to=horms@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gianf.trad@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manishc@marvell.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=skhan@linuxfoundation.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).