From: Jinchao Wang <wangjinchao600@gmail.com>
To: mathieu.desnoyers@efficios.com,
Alexander Viro <viro@zeniv.linux.org.uk>,
Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
Kees Cook <kees@kernel.org>,
linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] exec: do not call sched_mm_cid_after_execve() on exec fail
Date: Wed, 24 Dec 2025 20:10:49 +0800 [thread overview]
Message-ID: <aUvYMRmkWXUuuWXW@ndev> (raw)
In-Reply-To: <20251218032327.199721-1-wangjinchao600@gmail.com>
On Thu, Dec 18, 2025 at 11:23:23AM +0800, Jinchao Wang wrote:
Hi, mathieu
Please review this patch for mm_cid.
The syzbot test failure occurs because the syz-repro breaks the system
state, causing all user commands to fail. Actually the syz-rero can only
trigger a panic or error.
The broken system can be recovered by resetting binfmt_misc with:
echo 0 > /proc/sys/fs/binfmt_misc/status
Thanks.
Cc: mathieu.desnoyers@efficios.com
> sched_mm_cid_after_execve() is called from the failure path
> of bprm_execve(). At that point exec has not completed successfully,
> so updating the mm CID state is incorrect and can trigger a panic,
> as reported by syzbot.
>
> Remove the call from the exec failure path.
>
> Cc: stable@vger.kernel.org
> Reported-by: syzbot+9ca2c6e6b098bf5ae60a@syzkaller.appspotmail.com
> Signed-off-by: Jinchao Wang <wangjinchao600@gmail.com>
> ---
> fs/exec.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/fs/exec.c b/fs/exec.c
> index 9d5ebc9d15b0..9044a75d26ab 100644
> --- a/fs/exec.c
> +++ b/fs/exec.c
> @@ -1773,7 +1773,6 @@ static int bprm_execve(struct linux_binprm *bprm)
> if (bprm->point_of_no_return && !fatal_signal_pending(current))
> force_fatal_sig(SIGSEGV);
>
> - sched_mm_cid_after_execve(current);
> rseq_force_update();
> current->in_execve = 0;
>
> --
> 2.43.0
>
next prev parent reply other threads:[~2025-12-24 12:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-18 3:23 [PATCH] exec: do not call sched_mm_cid_after_execve() on exec fail Jinchao Wang
2025-12-24 12:10 ` Jinchao Wang [this message]
2025-12-24 13:52 ` Mathieu Desnoyers
2025-12-25 0:01 ` Jinchao Wang
-- strict thread matches above, loose matches on Subject: below --
2025-12-18 2:24 Jinchao Wang
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=aUvYMRmkWXUuuWXW@ndev \
--to=wangjinchao600@gmail.com \
--cc=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=kees@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mathieu.desnoyers@efficios.com \
--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 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.