From: Andrew Morton <akpm@linux-foundation.org>
To: Daehyeon Ko <4ncienth@gmail.com>
Cc: Christian Brauner <brauner@kernel.org>,
Al Viro <viro@zeniv.linux.org.uk>, NeilBrown <neil@brown.name>,
Manfred Spraul <manfred@colorfullife.com>,
Jan Kara <jack@suse.cz>,
linux-kernel@vger.kernel.org, Davidlohr Bueso <dave@stgolabs.net>
Subject: Re: [PATCH] ipc/mqueue: release notification resources during inode eviction
Date: Wed, 26 Aug 2026 21:11:14 -0700 [thread overview]
Message-ID: <20260826211114.69f01811929877dc73f41914@linux-foundation.org> (raw)
In-Reply-To: <20260824042359.925145-1-4ncienth@gmail.com>
On Mon, 24 Aug 2026 13:23:59 +0900 Daehyeon Ko <4ncienth@gmail.com> wrote:
> mqueue_flush_file() removes an mq_notify() registration only when the
> closing task belongs to the thread group stored in notify_owner.
>
> A task in a separate thread group created with CLONE_FILES can register
> SIGEV_THREAD notification and exit without closing the shared file table.
> If another thread group then unlinks and last-closes the queue, ->flush()
> skips the registration and inode eviction loses the only pointers to its
> resources.
>
> The orphaned registration permanently retains the notification skb, its
> netlink socket, a pid reference and a user namespace reference. An
> unprivileged process can repeat the sequence with new queues and sockets.
>
> No inode users remain during eviction. Remove any stale registration there
> after dropping info->lock, since netlink_sendskb() may release the final
> socket reference.
Thanks.
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Cc: stable@vger.kernel.org
Pity the poor -stable maintainers (and others downstream from them)
wondering "why was I sent this".
To answer this, please, in all bugfix changelogs, provide a concise
description of the userspace-visible runtime effects of the bug.
I asked Gemini that exact question and was told
This bug creates an unkillable kernel resource leak by failing to
free netlink socket, PID, and user namespace references when a POSIX
message queue is evicted. An unprivileged process can exploit this
leak repeatedly to cause kernel memory exhaustion and lead to a
Denial of Service (DoS).
which I'll paste into the changelog.
> Assisted-by: LLM
OK ;)
> A reproducer and regression selftest are available on request.
>
> Tested on x86_64 KASAN at the stated base. The unpatched oracle reproduced
> 3/3 and the patched oracle passed 3/3, with no KASAN report, WARNING splat,
> Oops or panic.
Useful info, thanks for including.
next prev parent reply other threads:[~2026-08-27 4:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-24 4:23 Daehyeon Ko
2026-08-27 4:11 ` Andrew Morton [this message]
2026-08-31 10:29 ` Christian Brauner
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=20260826211114.69f01811929877dc73f41914@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=4ncienth@gmail.com \
--cc=brauner@kernel.org \
--cc=dave@stgolabs.net \
--cc=jack@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=manfred@colorfullife.com \
--cc=neil@brown.name \
--cc=viro@zeniv.linux.org.uk \
/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®