]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net/x25: Fix skb leak in x25_lapb_receive_frame()
authorWei Yongjun <weiyongjun1@huawei.com>
Mon, 14 Nov 2022 11:05:19 +0000 (11:05 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 16 Nov 2022 04:22:19 +0000 (20:22 -0800)
commit2929cceb2fcf0ded7182562e4888afafece82cce
treef9bacf2fc24e734004408b7450a82eb7fdc600a7
parentc9b895c6878bdb6789dc1d7af60fd10f4a9f1937
net/x25: Fix skb leak in x25_lapb_receive_frame()

x25_lapb_receive_frame() using skb_copy() to get a private copy of
skb, the new skb should be freed in the undersized/fragmented skb
error handling path. Otherwise there is a memory leak.

Fixes: cb101ed2c3c7 ("x25: Handle undersized/fragmented skbs")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Martin Schiller <ms@dev.tdt.de>
Link: https://lore.kernel.org/r/20221114110519.514538-1-weiyongjun@huaweicloud.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/x25/x25_dev.c