]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Oct 2025 11:53:55 +0000 (12:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Oct 2025 11:53:55 +0000 (12:53 +0100)
added patches:
net-rtnetlink-fix-module-reference-count-leak-issue-in-rtnetlink_rcv_msg.patch

queue-5.4/net-rtnetlink-fix-module-reference-count-leak-issue-in-rtnetlink_rcv_msg.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/net-rtnetlink-fix-module-reference-count-leak-issue-in-rtnetlink_rcv_msg.patch b/queue-5.4/net-rtnetlink-fix-module-reference-count-leak-issue-in-rtnetlink_rcv_msg.patch
new file mode 100644 (file)
index 0000000..e2a0ee3
--- /dev/null
@@ -0,0 +1,33 @@
+From 5b22f62724a0a09e00d301abf5b57b0c12be8a16 Mon Sep 17 00:00:00 2001
+From: Zhengchao Shao <shaozhengchao@huawei.com>
+Date: Mon, 15 Aug 2022 10:46:29 +0800
+Subject: net: rtnetlink: fix module reference count leak issue in rtnetlink_rcv_msg
+
+From: Zhengchao Shao <shaozhengchao@huawei.com>
+
+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 |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/net/core/rtnetlink.c
++++ b/net/core/rtnetlink.c
+@@ -5304,6 +5304,7 @@ static int rtnetlink_rcv_msg(struct sk_b
+       if (kind == RTNL_KIND_DEL && (nlh->nlmsg_flags & NLM_F_BULK) &&
+           !(flags & RTNL_FLAG_BULK_DEL_SUPPORTED)) {
+               NL_SET_ERR_MSG(extack, "Bulk delete is not supported");
++              module_put(owner);
+               goto err_unlock;
+       }
index 0c291c51ee607afe43a81fe3d7f63c379057241b..9be5036ba47241382b19c7f10c8475f8ebe63790 100644 (file)
@@ -221,3 +221,4 @@ padata-reset-next-cpu-when-reorder-sequence-wraps-around.patch
 nfsd-minor-cleanup-in-layoutcommit-processing.patch
 nfsd-fix-last-write-offset-handling-in-layoutcommit.patch
 media-s5p-mfc-remove-an-unused-uninitialized-variable.patch
+net-rtnetlink-fix-module-reference-count-leak-issue-in-rtnetlink_rcv_msg.patch