]> git.ipfire.org Git - thirdparty/linux.git/commit
net: ncsi: fix skb leak in error paths
authorJian Zhang <zhangjian.3032@bytedance.com>
Thu, 5 Mar 2026 06:06:55 +0000 (14:06 +0800)
committerJakub Kicinski <kuba@kernel.org>
Sat, 7 Mar 2026 01:34:48 +0000 (17:34 -0800)
commit5c3398a54266541610c8d0a7082e654e9ff3e259
treef3416e02b1c1815483fb5558cc2816ec6b9b84e4
parent63f428cb941fb0efd6bf0cd9d743cb2d0539a0e4
net: ncsi: fix skb leak in error paths

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: 7a82ecf4cfb8 ("net/ncsi: NCSI AEN packet handler")
Fixes: 138635cc27c9 ("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>
net/ncsi/ncsi-aen.c
net/ncsi/ncsi-rsp.c