BPF List
 help / color / mirror / Atom feed
* [PATCH 6.12.y / 6.6.y] Backport request: 802eef5afb18 ("bpf: Fix memory access flags in helper prototypes", CVE-2026-45903)
@ 2026-11-19  5:54 梓川咲太
  2026-11-19 16:08 ` Sasha Levin
  0 siblings, 1 reply; 2+ messages in thread
From: 梓川咲太 @ 2026-11-19  5:54 UTC (permalink / raw)
  To: stable; +Cc: bpf, gregkh, sashal

Hi Stable Maintainers,

Please consider backporting upstream commit:

  802eef5afb1865bc5536a5302c068ba2215a1f72 ("bpf: Fix memory access
flags in helper prototypes")

(assigned CVE-2026-45903) to linux-6.12.y and linux-6.6.y.

In both v6.12.118 (kernel/bpf/verifier.c:9403-9414) and v6.6.162
(kernel/bpf/verifier.c:8870-8881), check_func_arg() passes
`fn->arg_type[arg - 1] & MEM_WRITE ? BPF_WRITE : BPF_READ` to
check_mem_size_reg(). Seven memory-writing helpers still omit MEM_WRITE on
these branches (bpf_d_path, bpf_skb_fib_lookup, bpf_xdp_fib_lookup,
bpf_snprintf, bpf_snprintf_btf, bpf_read_branch_records,
bpf_sysctl_get_name), allowing BPF programs to obtain write access into
BPF_F_RDONLY_PROG read-only maps.

We verified this on a live x86_64 QEMU v6.12.118 test kernel using compiled
BPF programs (bpf_d_path and bpf_snprintf targets):
- Unpatched 6.12.118: verification succeeds ([LOADED]) and writes into
  read-only maps.
- With 802eef5afb18 applied: verifier correctly rejects with -EACCES
  ("write into map forbidden, value_size=64 off=0 size=64").

Commit 802eef5afb18 cherry-picks cleanly onto linux-6.12.y (v6.12.118) and
linux-6.6.y (v6.6.162).

Fixes: 37cce22dbd51 ("bpf: verifier: Refactor helper access type tracking")
Signed-off-by: BoBppy <inkxiao12@gmail.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-19 16:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-19  5:54 [PATCH 6.12.y / 6.6.y] Backport request: 802eef5afb18 ("bpf: Fix memory access flags in helper prototypes", CVE-2026-45903) 梓川咲太
2026-11-19 16:08 ` Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox