BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next v2 0/2] Fix for untrusted BTF pointer writes
@ 2026-07-08  3:07 Kumar Kartikeya Dwivedi
  2026-07-08  3:07 ` [PATCH bpf-next v2 1/2] bpf: Reject writes through untrusted BTF pointers Kumar Kartikeya Dwivedi
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Kumar Kartikeya Dwivedi @ 2026-07-08  3:07 UTC (permalink / raw)
  To: bpf
  Cc: Alexei Starovoitov, Andrii Nakryiko, Daniel Borkmann,
	Eduard Zingerman, Emil Tsalapatis, kkd, kernel-team

When using custom btf_struct_access() callbacks, we miss rejecting
unstrusted BTF pointer writes. Fix and add a selftest for coverage.

Changelog:
----------
v1 -> v2
v1: https://lore.kernel.org/bpf/20260707190214.1997705-1-memxor@gmail.com

 * Add missing fixes tag.
 * Add Amery's acks.

Kumar Kartikeya Dwivedi (1):
  selftests/bpf: Add untrusted BTF write regression

Nicholas Dudar (1):
  bpf: Reject writes through untrusted BTF pointers

 kernel/bpf/verifier.c                         |  8 ++++--
 .../selftests/bpf/prog_tests/bpf_tcp_ca.c     | 12 +++++++++
 .../bpf/progs/tcp_ca_untrusted_btf_write.c    | 26 +++++++++++++++++++
 3 files changed, 44 insertions(+), 2 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/progs/tcp_ca_untrusted_btf_write.c


base-commit: e909296d8750c9939ce311925ca1f59acb8944c1
-- 
2.53.0


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

end of thread, other threads:[~2026-07-08  7:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-08  3:07 [PATCH bpf-next v2 0/2] Fix for untrusted BTF pointer writes Kumar Kartikeya Dwivedi
2026-07-08  3:07 ` [PATCH bpf-next v2 1/2] bpf: Reject writes through untrusted BTF pointers Kumar Kartikeya Dwivedi
2026-07-08  3:07 ` [PATCH bpf-next v2 2/2] selftests/bpf: Add untrusted BTF write regression Kumar Kartikeya Dwivedi
2026-07-08  7:40 ` [PATCH bpf-next v2 0/2] Fix for untrusted BTF pointer writes patchwork-bot+netdevbpf

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