]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: rtnetlink: fix module reference count leak issue in rtnetlink_rcv_msg
authorZhengchao Shao <shaozhengchao@huawei.com>
Mon, 15 Aug 2022 02:46:29 +0000 (10:46 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2025 13:03:16 +0000 (14:03 +0100)
commit83a563fab563fa8d96a2f0bb6b87cf0bc6f96b4d
tree22e58cd38675aeac4f83d912c5003603134d6c45
parentc5d116862dd3ed162d079738a5ebddf9fceea850
net: rtnetlink: fix module reference count leak issue in rtnetlink_rcv_msg

commit 5b22f62724a0a09e00d301abf5b57b0c12be8a16 upstream.

When bulk delete command is received in the rtnetlink_rcv_msg function,
if bulk delete is not supported, module_put is not called to release
the reference counting. As a result, module reference count is leaked.

Fixes: a6cec0bcd342 ("net: rtnetlink: add bulk delete support flag")
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Link: https://lore.kernel.org/r/20220815024629.240367-1-shaozhengchao@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/core/rtnetlink.c