From: Siddh Raman Pant <siddh.raman.pant@oracle.com>
To: "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: CVE-2024-56642: tipc: Fix use-after-free of kernel socket in cleanup_bearer().
Date: Tue, 18 Feb 2025 13:04:05 +0000 [thread overview]
Message-ID: <6ad79bb59b3535c9666ed5873dee4975f0745676.camel@oracle.com> (raw)
In-Reply-To: <2024122737-CVE-2024-56642-71ee@gregkh>
[-- Attachment #1: Type: text/plain, Size: 1213 bytes --]
The commit message has:
> tipc: Fix use-after-free of kernel socket in cleanup_bearer().
>
> syzkaller reported a use-after-free of UDP kernel socket
> in cleanup_bearer() without repro. [0][1]
>
> When bearer_disable() calls tipc_udp_disable(), cleanup
> of the UDP kernel socket is deferred by work calling
> cleanup_bearer().
>
> tipc_net_stop() waits for such works to finish by checking
> tipc_net(net)->wq_count. However, the work decrements the
> count too early before releasing the kernel socket,
> unblocking cleanup_net() and resulting in use-after-free.
This is incorrect, the function which waits is tipc_exit_net, which has
the spinning while loop.
That function is an exit function so this can't be triggered without
privileges.
Could it be grounds for rejection? Probably not but I thought I should
ask.
> Fixes: 26abe14379f8 ("net: Modify sk_alloc to not reference count the netns of kernel sockets.")
The fixes tag is incorrect. It should be the commit which adds the
counter, which is:
04c26faa51d1 ("tipc: wait and exit until all work queues are done")
Maybe this needs to be corrected in the JSONs (as the commits are set
in stone).
Thanks,
Siddh
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next parent reply other threads:[~2025-02-18 13:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <2024122737-CVE-2024-56642-71ee@gregkh>
2025-02-18 13:04 ` Siddh Raman Pant [this message]
2025-02-18 13:10 ` Greg KH
2025-02-18 13:53 ` [PATCH] CVE-2024-56642: Fix wrong fixes tag and function name in commit message Siddh Raman Pant
2025-02-18 14:06 ` Greg KH
2025-02-18 14:37 ` [PATCH 1/2] CVE-2024-56642: Fix wrong fixes tag Siddh Raman Pant
2025-02-18 15:26 ` Greg KH
2025-02-18 14:37 ` [PATCH 2/2] CVE-2024-56642: Fix mention of wrong function Siddh Raman Pant
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6ad79bb59b3535c9666ed5873dee4975f0745676.camel@oracle.com \
--to=siddh.raman.pant@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®