Loading
be2net: fix potential memory leak in be_xmit()
stable inclusion from stable-v4.19.323 commit 941026023c256939943a47d1c66671526befbb26 category: bugfix bugzilla: https://gitee.com/src-openeuler/kernel/issues/IB2STK CVE: CVE-2024-50167 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=941026023c256939943a47d1c66671526befbb26 -------------------------------- [ Upstream commit e4dd8bfe0f6a23acd305f9b892c00899089bd621 ] The be_xmit() returns NETDEV_TX_OK without freeing skb in case of be_xmit_enqueue() fails, add dev_kfree_skb_any() to fix it. Fixes: 760c295e ("be2net: Support for OS2BMC.") Signed-off-by:Wang Hai <wanghai38@huawei.com> Reviewed-by:
Simon Horman <horms@kernel.org> Reviewed-by:
Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Message-ID: <20241015144802.12150-1-wanghai38@huawei.com> Signed-off-by:
Andrew Lunn <andrew@lunn.ch> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Dong Chenchen <dongchenchen2@huawei.com>