linux/net/ncsi
Jian Zhang fef5aa6e3b net: ncsi: fix skb leak in error paths
commit 5c3398a542 upstream.

Early return paths in NCSI RX and AEN handlers fail to release
the received skb, resulting in a memory leak.

Specifically, ncsi_aen_handler() returns on invalid AEN packets
without consuming the skb. Similarly, ncsi_rcv_rsp() exits early
when failing to resolve the NCSI device, response handler, or
request, leaving the skb unfreed.

CC: stable@vger.kernel.org
Fixes: 7a82ecf4cf ("net/ncsi: NCSI AEN packet handler")
Fixes: 138635cc27 ("net/ncsi: NCSI response packet handler")
Signed-off-by: Jian Zhang <zhangjian.3032@bytedance.com>
Link: https://patch.msgid.link/20260305060656.3357250-1-zhangjian.3032@bytedance.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-04-18 10:33:15 +02:00
..
internal.h net: ncsi: Fix buffer overflow in fetching version id 2025-08-28 16:24:22 +02:00
Kconfig net/ncsi: add NCSI Intel OEM command to keep PHY up 2021-07-08 14:16:39 -07:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
ncsi-aen.c net: ncsi: fix skb leak in error paths 2026-04-18 10:33:15 +02:00
ncsi-cmd.c net/ncsi: Add NC-SI 1.2 Get MC MAC Address command 2025-03-13 12:50:20 +01:00
ncsi-manage.c net/ncsi: wait for the last response to Deselect Package before configuring channel 2025-03-13 12:50:33 +01:00
ncsi-netlink.c net/ncsi: Fix netlink major/minor version numbers 2024-01-25 14:52:36 -08:00
ncsi-netlink.h net/ncsi: Fix netlink registration 2020-11-12 17:00:13 -08:00
ncsi-pkt.h net: ncsi: Fix GCPS 64-bit member variables 2025-06-27 11:05:12 +01:00
ncsi-rsp.c net: ncsi: fix skb leak in error paths 2026-04-18 10:33:15 +02:00