Skip to content

Fix for untrusted BTF pointer writes

Kumar Kartikeya Dwivedi bpf 2 versions – Applied

Status from this message: This series was applied to bpf/bpf-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 0 repliesApplied 2/2
  2. v12 patches 4 repliesSuperseded

Changes in v2 from the cover letter

v1: https://lore.kernel.org/bpf/[email protected]

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

Patches in v2 All 2 applied

#Subject and filesSizeRepliesApplied
1/2bpf: Reject writes through untrusted BTF pointerskernel/bpf/verifier.c+6 -20 repliesApplied
2/2selftests/bpf: Add untrusted BTF write regressiontools/testing/selftests/bpf/prog_tests/bpf_tcp_ca.c tools/testing/selftests/bpf/progs/tcp_ca_untrusted_btf_write.c+38 -00 repliesApplied

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchAmery Hung
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH bpf-next v2 0/2] Fix for untrusted BTF pointer writes

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/[email protected]

* 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

Signature · 1 line
2.53.0