From: "Uwe Kleine-König" <ukleinek@debian.org>
To: stable@vger.kernel.org
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Qualys Security Advisory <qsa@qualys.com>,
Oleg Nesterov <oleg@redhat.com>, Kees Cook <kees@kernel.org>
Subject: Re: [PATCH 7.0.y] ptrace: slightly saner 'get_dumpable()' logic
Date: Fri, 15 May 2026 09:39:38 +0200 [thread overview]
Message-ID: <4cfc6feb-7344-4b52-88f4-d010c61a4266@debian.org> (raw)
In-Reply-To: <20260515073404.2974912-2-ukleinek@debian.org>
[-- Attachment #1.1: Type: text/plain, Size: 1677 bytes --]
Hello,
On 2026-05-15 09:33, Uwe Kleine-König wrote:
> From: Linus Torvalds <torvalds@linux-foundation.org>
oops, I forgot:
commit 31e62c2ebbfdc3fe3dbdf5e02c92a9dc67087a3a upstream.
here.
> The 'dumpability' of a task is fundamentally about the memory image of
> the task - the concept comes from whether it can core dump or not - and
> makes no sense when you don't have an associated mm.
>
> And almost all users do in fact use it only for the case where the task
> has a mm pointer.
>
> But we have one odd special case: ptrace_may_access() uses 'dumpable' to
> check various other things entirely independently of the MM (typically
> explicitly using flags like PTRACE_MODE_READ_FSCREDS). Including for
> threads that no longer have a VM (and maybe never did, like most kernel
> threads).
>
> It's not what this flag was designed for, but it is what it is.
>
> The ptrace code does check that the uid/gid matches, so you do have to
> be uid-0 to see kernel thread details, but this means that the
> traditional "drop capabilities" model doesn't make any difference for
> this all.
>
> Make it all make a *bit* more sense by saying that if you don't have a
> MM pointer, we'll use a cached "last dumpability" flag if the thread
> ever had a MM (it will be zero for kernel threads since it is never
> set), and require a proper CAP_SYS_PTRACE capability to override.
>
> Reported-by: Qualys Security Advisory <qsa@qualys.com>
> Cc: Oleg Nesterov <oleg@redhat.com>
> Cc: Kees Cook <kees@kernel.org>
> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
> Signed-off-by: Uwe Kleine-König <ukleinek@debian.org>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2026-05-15 7:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-15 7:33 [PATCH 7.0.y] ptrace: slightly saner 'get_dumpable()' logic Uwe Kleine-König
2026-05-15 7:39 ` Uwe Kleine-König [this message]
2026-05-15 8:06 ` Greg KH
2026-05-15 8:23 ` Greg KH
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=4cfc6feb-7344-4b52-88f4-d010c61a4266@debian.org \
--to=ukleinek@debian.org \
--cc=kees@kernel.org \
--cc=oleg@redhat.com \
--cc=qsa@qualys.com \
--cc=stable@vger.kernel.org \
--cc=torvalds@linux-foundation.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