Linux Security Modules development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
Cc: linux-security-module@vger.kernel.org
Subject: Re: [PATCH] yama: hold the PR_SET_PTRACER tracer by its struct pid
Date: Thu, 19 Nov 2026 03:07:27 +0000	[thread overview]
Message-ID: <sashiko-outbox-222363@kernel.org> (raw)
In-Reply-To: <20261119025918.86247-1-ljyoung04@gmail.com>

> Hi Kees,
> 
> An unprivileged user can make Yama read a freed task_struct with the
> default ptrace_scope=1. relation->tracer is stored without a reference,
> and yama_task_free() marks the relation invalid only just before the
> task is freed, so a concurrent ptracer_exception_found() can still
> dereference it in task_is_descendant(). The KASAN report, the details
> and the fix are in the patch below.
> 
> This is the problem Oleg Nesterov described on LKML on 2018-10-29
> ("yama: unsafe usage of ptrace_relation->tracer"). It was never fixed.
> 
> Affected (reproduced under KASAN as uid 65534):
> - mainline 4405c18c95d2 (v7.4-rc3-230)
> - stable 6.12.118
> [ ... ]
> 
> Link: https://lore.kernel.org/all/0000000000004904df0578b7d3da@google.com/T/
> Fixes: 93b69d437eff ("Yama: add RCU to drop read locking")
> Cc: stable@vger.kernel.org
> Signed-off-by: JunYoung Lee <ljyoung04@gmail.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261119025918.86247-1-ljyoung04@gmail.com?part=1


      reply	other threads:[~2026-11-19  3:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19  2:59 [PATCH] yama: hold the PR_SET_PTRACER tracer by its struct pid JunYoung Lee
2026-11-19  3:07 ` sashiko-bot [this message]

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-222363@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox