From: Eduard Zingerman <eddyz87@gmail.com>
To: Min-gyu Kim <gimm78064@gmail.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
Kumar Kartikeya Dwivedi <memxor@gmail.com>,
Ilya Leoshkevich <iii@linux.ibm.com>,
Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>
Cc: bpf@vger.kernel.org, linux-s390@vger.kernel.org,
linux-kernel@vger.kernel.org, regressions@lists.linux.dev,
security@kernel.org
Subject: Re: [RESEND][REGRESSION][SECURITY] bpf, s390: verifier/JIT mismatch allows unprivileged kernel memory access
Date: Thu, 23 Jul 2026 18:03:34 -0700 [thread overview]
Message-ID: <4fc7fef5d38839b5f01e80b05de908d95af8f3c8.camel@gmail.com> (raw)
In-Reply-To: <71f6059ecc89d0b16f8542d73ad8b183a2a4db92.camel@gmail.com>
On Thu, 2026-07-23 at 02:05 -0700, Eduard Zingerman wrote:
> On Thu, 2026-07-23 at 17:16 +0900, Min-gyu Kim wrote:
>
> ...
>
> > Root cause
> >
> > The verifier records an ALU32 definition in subreg_def. A later 64-bit read
> > causes mark_insn_zext() to mark that instruction for explicit zero extension.
> > Before 107e16979905, a cache hit in is_state_visited() propagated the 64-bit
> > read to the alternate path's ALU32 definition.
>
> Hi Min-gyu,
>
> Thank you for the report.
>
> > Commit 107e16979905 removed that propagation when register-chain liveness was
> > replaced with static liveness. The static live-register mask does not track
> > read width or path-specific subreg_def information. In current states.c,
> > regs_exact() compares only fields before id, while subreg_def follows id in
> > struct bpf_reg_state.
>
> Hm, the stack is tracked with 32-bit granularity and it should be easy
> to adjust compute_live_registers() to track the width. I'll give it a try.
I figured out the repro and am working on the fix.
The plan is to extend compute_live_registers() to statically infer
which upper 32-bit subregisters are alive and use this information
to fixup zero extensions, and drop the reg->subreg_def altogether.
...
prev parent reply other threads:[~2026-07-24 1:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-23 8:16 Min-gyu Kim
2026-07-23 9:05 ` Eduard Zingerman
2026-07-24 1:03 ` Eduard Zingerman [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=4fc7fef5d38839b5f01e80b05de908d95af8f3c8.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=gimm78064@gmail.com \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=iii@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=memxor@gmail.com \
--cc=regressions@lists.linux.dev \
--cc=security@kernel.org \
/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
all inboxes | Powered by JetHome®