Commit da9fd576 authored by Wei Yongjun's avatar Wei Yongjun Committed by sanglipeng
Browse files

net/x25: Fix skb leak in x25_lapb_receive_frame()

stable inclusion
from stable-v5.10.156
commit 9f00da9c866d506998bf0a3f699ec900730472da
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7MCG1

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9f00da9c866d506998bf0a3f699ec900730472da



--------------------------------

[ Upstream commit 2929cceb ]

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: cb101ed2 ("x25: Handle undersized/fragmented skbs")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Acked-by: default avatarMartin Schiller <ms@dev.tdt.de>
Link: https://lore.kernel.org/r/20221114110519.514538-1-weiyongjun@huaweicloud.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent aa474b15
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment