All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
Cc: linux-security-module@vger.kernel.org
Subject: Re: [PATCH] smack: reject relabel-self writes from io_uring workers
Date: Sat, 19 Sep 2026 04:04:57 +0000	[thread overview]
Message-ID: <20260919040458.3629D1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260919035351.88453-1-ngocthang2710.1999@gmail.com>

> smk_write_relabel_self() calls commit_creds() on current. When the write
> is issued through io_uring it runs on an io-wq worker, and io_uring
> override_creds()es the submitter's creds when they differ from the
> worker's. commit_creds() then trips BUG_ON(task->cred != task->real_cred):
> 
>   kernel BUG at kernel/cred.c:376!
>   commit_creds
>   smk_write_relabel_self
>   loop_rw_iter
>   io_write
>   io_wq_submit_work
>   io_worker_handle_work
>   io_wq_worker
> 
> Even without the override, committing creds on a worker would relabel
> the worker rather than the submitting task. Refuse the write from
> PF_IO_WORKER context.
> 
> Fixes: 38416e53936e ("Smack: limited capability for changing process label")
> Reported-by: syzbot+fa63184795283ac3f842@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=fa63184795283ac3f842
> Cc: stable@vger.kernel.org
> Signed-off-by: Nguyen Ngoc Thang <ngocthang2710.1999@gmail.com>

Sashiko has reviewed this patch and found no issues. It looks great!

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


      reply	other threads:[~2026-09-19  4:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-19  3:53 [PATCH] smack: reject relabel-self writes from io_uring workers Nguyen Ngoc Thang
2026-09-19  4:04 ` 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=20260919040458.3629D1F000FF@smtp.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.