BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next v1 0/2] Fix for untrusted BTF pointer writes
@ 2026-07-07 19:02 Kumar Kartikeya Dwivedi
  2026-07-07 19:02 ` [PATCH bpf-next v1 1/2] bpf: Reject writes through untrusted BTF pointers Kumar Kartikeya Dwivedi
  2026-07-07 19:02 ` [PATCH bpf-next v1 2/2] selftests/bpf: Add untrusted BTF write regression Kumar Kartikeya Dwivedi
  0 siblings, 2 replies; 8+ messages in thread
From: Kumar Kartikeya Dwivedi @ 2026-07-07 19:02 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.

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: f425a0443b7f0221a4b34f6acc0c2924bf5877f2
-- 
2.53.0


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

end of thread, other threads:[~2026-07-07 22:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-07 19:02 [PATCH bpf-next v1 0/2] Fix for untrusted BTF pointer writes Kumar Kartikeya Dwivedi
2026-07-07 19:02 ` [PATCH bpf-next v1 1/2] bpf: Reject writes through untrusted BTF pointers Kumar Kartikeya Dwivedi
2026-07-07 19:48   ` bot+bpf-ci
2026-07-07 22:10   ` Amery Hung
2026-07-07 19:02 ` [PATCH bpf-next v1 2/2] selftests/bpf: Add untrusted BTF write regression Kumar Kartikeya Dwivedi
2026-07-07 22:31   ` Amery Hung
2026-07-07 22:36     ` Kumar Kartikeya Dwivedi
2026-07-07 22:58       ` Amery Hung

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