BPF List
 help / color / mirror / Atom feed
* [PATCH bpf v1 0/2] Fix bpf_throw() <> global subprogs interaction
@ 2026-05-16  2:24 Kumar Kartikeya Dwivedi
  2026-05-16  2:24 ` [PATCH bpf v1 1/2] bpf: Check global subprog exception paths Kumar Kartikeya Dwivedi
  2026-05-16  2:24 ` [PATCH bpf v1 2/2] selftests/bpf: Cover global subprog exception leaks Kumar Kartikeya Dwivedi
  0 siblings, 2 replies; 3+ messages in thread
From: Kumar Kartikeya Dwivedi @ 2026-05-16  2:24 UTC (permalink / raw)
  To: bpf
  Cc: Alexei Starovoitov, Andrii Nakryiko, Daniel Borkmann,
	Martin KaFai Lau, Eduard Zingerman, kkd, kernel-team

There is a bug where bpf_throw()'s reachability across global subprogs
is missed by the verifier, leading to successful verification when any
kernel resource or lock is held across global subprog call boundary.

Fix this by effect summarization like other related side effects and
propagate exception reachability into callees.

Kumar Kartikeya Dwivedi (2):
  bpf: Check global subprog exception paths
  selftests/bpf: Cover global subprog exception leaks

 include/linux/bpf_verifier.h                  |  2 ++
 kernel/bpf/cfg.c                              | 13 ++++++++++-
 kernel/bpf/verifier.c                         | 23 ++++++++++++++-----
 .../selftests/bpf/progs/exceptions_fail.c     | 22 ++++++++++++++++++
 4 files changed, 53 insertions(+), 7 deletions(-)


base-commit: a828abbb897657451d96ad7bf20f1893ac983bb9
-- 
2.53.0


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

end of thread, other threads:[~2026-05-16  2:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-16  2:24 [PATCH bpf v1 0/2] Fix bpf_throw() <> global subprogs interaction Kumar Kartikeya Dwivedi
2026-05-16  2:24 ` [PATCH bpf v1 1/2] bpf: Check global subprog exception paths Kumar Kartikeya Dwivedi
2026-05-16  2:24 ` [PATCH bpf v1 2/2] selftests/bpf: Cover global subprog exception leaks Kumar Kartikeya Dwivedi

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