[PATCH] net/nfp: fix uninit local var in nfp_pre_tun_table_check_del

Stephen Hemminger stephen at networkplumber.org
Sun Nov 15 22:47:55 CET 2026


On Fri, 13 Nov 2026 17:22:07 +0300
Bulatov Mark <ms.bulatov7 at gmail.com> wrote:

> From: Mark Bulatov <ms.bulatov7 at 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 at dpdk.org
> 
> Signed-off-by: Mark Bulatov <ms.bulatov7 at 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")


More information about the dev mailing list