From: sashiko-bot@kernel.org
Cc: linux-security-module@vger.kernel.org
Subject: Re: [PATCH] yama: fix use-after-free read of a dead PR_SET_PTRACER tracer
Date: Mon, 23 Nov 2026 17:01:57 +0000 [thread overview]
Message-ID: <sashiko-outbox-229702@kernel.org> (raw)
In-Reply-To: <20261123165357.4092273-1-bsdhenrymartin@gmail.com>
> A PR_SET_PTRACER relation stores a bare pointer to the tracer's
> task_struct. When the tracer dies, its task_struct is freed via
> call_rcu(), and the relation is only marked invalid from
> security_task_free(), i.e. from the same RCU callback that frees the
> task. A reader that enters rcu_read_lock() after the callback was
> queued is not protected against it: ptracer_exception_found() can read
> relation->invalid while it is still false and then dereference the
> already freed tracer in task_is_descendant().
>
> This is a slab-use-after-free read during ptrace access checks, e.g.
> via process_vm_readv(), on mainline v7.4-rc4 (KASAN build):
>
> BUG: KASAN: slab-use-after-free in task_is_descendant+0x1a3/0x1b0
> Read of size 4 at addr ffff88810a46c598 by task poc/167
> CPU: 6 UID: 1000 PID: 167 Comm: poc
> [ ... ]
>
> This issue was discovered by Tencent CodeBuddy Security.
> Cc: stable@vger.kernel.org
> Fixes: 93b69d437eff ("Yama: add RCU to drop read locking")
> Signed-off-by: Henry Martin <bsdhenrymartin@gmail.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261123165357.4092273-1-bsdhenrymartin@gmail.com?part=1
next prev parent reply other threads:[~2026-11-23 17:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 16:53 [PATCH] yama: fix use-after-free read of a dead PR_SET_PTRACER tracer Henry Martin
2026-11-23 17:01 ` sashiko-bot [this message]
2026-11-24 10:41 ` Guicai Ma
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=sashiko-outbox-229702@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.