From: Stephen Hemminger <stephen@networkplumber.org>
To: Bulatov Mark <ms.bulatov7@gmail.com>
Cc: "Niklas Söderlund" <niklas.soderlund@corigine.com>,
"Chaoyong He" <chaoyong.he@corigine.com>,
dev@dpdk.org, stable@dpdk.org
Subject: Re: [PATCH] net/nfp: fix uninit local var in nfp_pre_tun_table_check_del
Date: Sun, 15 Nov 2026 13:47:55 -0800 [thread overview]
Message-ID: <20261115134755.1e3b3b33@phoenix.local> (raw)
In-Reply-To: <20261113142207.5537-1-ms.bulatov7@gmail.com>
On Fri, 13 Nov 2026 17:22:07 +0300
Bulatov Mark <ms.bulatov7@gmail.com> wrote:
> From: Mark Bulatov <ms.bulatov7@gmail.com>
>
> If the search fails, it leads to a null pointer dereference when attempting
> to initialize nfp_mac_idx.
>
> Fix this by adding a check.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: d3c33bdf1f ("net/nfp: prepare for IPv4 UDP tunnel decap flow action")
> Cc: stable@dpdk.org
>
> Signed-off-by: Mark Bulatov <ms.bulatov7@gmail.com>
> ---
AI review feedback
[PATCH] net/nfp: fix uninit local var in nfp_pre_tun_table_check_del
Error: find_entry is still uninitialized on one path.
find_entry is only assigned inside the loop, and only for indexes
where pre_tun_bitmap[i] != 0. If no bit is set, the loop never
calls nfp_pre_tun_table_search() and the new NULL check reads an
uninitialized pointer. The subject says "fix uninit local var" but
the patch does not initialize anything. Initialize it:
struct nfp_pre_tun_entry *find_entry = NULL;
With that, the added check covers both the "nothing searched" and
"nothing found" cases.
Warning: Fixes tag needs a 12 character hash:
Fixes: d3c33bdf1f18 ("net/nfp: prepare for IPv4 UDP tunnel decap flow action")
prev parent reply other threads:[~2026-11-15 21:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 14:22 [PATCH] net/nfp: fix uninit local var in nfp_pre_tun_table_check_del Bulatov Mark
2026-11-15 21:47 ` Stephen Hemminger [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=20261115134755.1e3b3b33@phoenix.local \
--to=stephen@networkplumber.org \
--cc=chaoyong.he@corigine.com \
--cc=dev@dpdk.org \
--cc=ms.bulatov7@gmail.com \
--cc=niklas.soderlund@corigine.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.