The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: patchwork-bot+netdevbpf@kernel.org
To: Luis Gerhorst <luis.gerhorst@fau.de>
Cc: ast@kernel.org, daniel@iogearbox.net, john.fastabend@gmail.com,
	andrii@kernel.org, martin.lau@linux.dev, eddyz87@gmail.com,
	song@kernel.org, yonghong.song@linux.dev, kpsingh@kernel.org,
	sdf@fomichev.me, haoluo@google.com, jolsa@kernel.org,
	memxor@gmail.com, henriette.herzog@rub.de, bpf@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	syzbot+b5eb72a560b8149a1885@syzkaller.appspotmail.com
Subject: Re: [PATCH bpf-next] bpf: Fix state use-after-free on push_stack() err
Date: Wed, 11 Jun 2025 23:10:45 +0000	[thread overview]
Message-ID: <174968344511.3524559.6735332386842029341.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20250611210728.266563-1-luis.gerhorst@fau.de>

Hello:

This patch was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:

On Wed, 11 Jun 2025 23:07:28 +0200 you wrote:
> Without this, `state->speculative` is used after the cleanup cycles in
> push_stack() or push_async_cb() freed `env->cur_state` (i.e., `state`).
> Avoid this by relying on the short-circuit logic to only access `state`
> if the error is recoverable (and make sure it never is after push_*()
> failed).
> 
> push_*() callers must always return an error for which
> error_recoverable_with_nospec(err) is false if push_*() returns NULL,
> otherwise we try to recover and access the stale `state`. This is only
> violated by sanitize_ptr_alu(), thus also fix this case to return
> -ENOMEM.
> 
> [...]

Here is the summary with links:
  - [bpf-next] bpf: Fix state use-after-free on push_stack() err
    https://git.kernel.org/bpf/bpf-next/c/1c66f4a3612c

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



  parent reply	other threads:[~2025-06-11 23:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-11 12:36 [syzbot] [bpf?] KASAN: slab-use-after-free Read in do_check syzbot
2025-06-11 13:02 ` Eduard Zingerman
2025-06-11 14:03   ` Luis Gerhorst
2025-06-11 17:20     ` Eduard Zingerman
2025-06-11 21:07       ` [PATCH bpf-next] bpf: Fix state use-after-free on push_stack() err Luis Gerhorst
2025-06-11 22:23         ` Eduard Zingerman
2025-06-11 23:10         ` patchwork-bot+netdevbpf [this message]
2025-06-11 21:14       ` [PATCH bpf-next] bpf: Remove redundant free_verifier_state()/pop_stack() Luis Gerhorst
2025-06-11 22:36         ` Eduard Zingerman
2025-06-13  9:01           ` [PATCH bpf-next v2] " Luis Gerhorst
2025-06-13 21:17             ` Eduard Zingerman
2025-06-13 22:06               ` Alexei Starovoitov
2025-06-13  9:07           ` [PATCH bpf-next] " Luis Gerhorst
2025-06-11 21:32       ` [syzbot] [bpf?] KASAN: slab-use-after-free Read in do_check Luis Gerhorst
2025-06-11 21:43         ` Eduard Zingerman
2025-06-11 21:40 ` Eduard Zingerman
2025-06-11 23:00   ` syzbot

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=174968344511.3524559.6735332386842029341.git-patchwork-notify@kernel.org \
    --to=patchwork-bot+netdevbpf@kernel.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=haoluo@google.com \
    --cc=henriette.herzog@rub.de \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luis.gerhorst@fau.de \
    --cc=martin.lau@linux.dev \
    --cc=memxor@gmail.com \
    --cc=sdf@fomichev.me \
    --cc=song@kernel.org \
    --cc=syzbot+b5eb72a560b8149a1885@syzkaller.appspotmail.com \
    --cc=yonghong.song@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