]> git.baikalelectronics.ru Git - kernel.git/commit
net: hsr: Fix potential use-after-free
authorYueHaibing <yuehaibing@huawei.com>
Fri, 25 Nov 2022 07:57:24 +0000 (15:57 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Dec 2022 10:23:03 +0000 (11:23 +0100)
commitceadc0bd2028448dca1197dfcae0351508713e1b
tree3c55cd0d5e9d4b6b792f6b50bfb6048bd9c39b61
parentcd65a7a6647b66ffd307a5aba5ecf07d93361035
net: hsr: Fix potential use-after-free

[ Upstream commit 7e177d32442b7ed08a9fa61b61724abc548cb248 ]

The skb is delivered to netif_rx() which may free it, after calling this,
dereferencing skb may trigger use-after-free.

Fixes: 8382a55f8658 ("net/hsr: Add support for the High-availability Seamless Redundancy protocol (HSRv0)")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20221125075724.27912-1-yuehaibing@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/hsr/hsr_forward.c