From: patchwork-bot+netdevbpf@kernel.org
To: Henry Martin <bsdhenrymartin@gmail.com>
Cc: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
eddyz87@gmail.com, memxor@gmail.com, john.fastabend@gmail.com,
bpf@vger.kernel.org, netdev@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] bpf: fix verifier model mismatch on __sk_buff.remote_port narrow read
Date: Sat, 14 Nov 2026 18:50:10 +0000 [thread overview]
Message-ID: <179468221032.2337414.16612050775582398663.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20261105060331.1912252-1-bsdhenrymartin@gmail.com>
Hello:
This patch was applied to bpf/bpf.git (master)
by Alexei Starovoitov <ast@kernel.org>:
On Thu, 5 Nov 2026 14:03:31 +0800 you wrote:
> On little endian, the ctx access conversion for __sk_buff.remote_port
> loads the 16-bit skc_dport and shifts it left by 16, producing a
> 4-byte value of up to 0xffff0000. It reports its width through
> bpf_target_off() as 2, the member size.
>
> A 2-byte read is a narrower load of this 4-byte ctx field, but the
> fixup pass only masks the result when the access size is smaller
> than the reported width, so the masking is skipped. The verifier
> models the register as [0, 0xffff] while the runtime value is
> [0, 0xffff0000]. Arithmetic the verifier folds to a constant can
> therefore take any 16-bit port value at runtime, enabling
> out-of-bounds reads and writes relative to map values.
>
> [...]
Here is the summary with links:
- bpf: fix verifier model mismatch on __sk_buff.remote_port narrow read
https://git.kernel.org/bpf/bpf/c/4722bac72de6
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
prev parent reply other threads:[~2026-11-14 18:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 6:03 [PATCH] bpf: fix verifier model mismatch on __sk_buff.remote_port narrow read Henry Martin
2026-11-14 18:50 ` patchwork-bot+netdevbpf [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=179468221032.2337414.16612050775582398663.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=bsdhenrymartin@gmail.com \
--cc=daniel@iogearbox.net \
--cc=eddyz87@gmail.com \
--cc=john.fastabend@gmail.com \
--cc=memxor@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.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