Skip to content

Refuse CO-RE relocations for a signed program

Kumar Kartikeya Dwivedi bpf 1 version 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

  1. v1 Latest2 patches 2 repliesApplied 2/2

Patches in v1 All 2 applied

#Subject and filesSizeRepliesApplied
1/2bpf: Refuse CO-RE relocations for a signed programkernel/bpf/verifier.c+9 -01 replyApplied
2/2selftests/bpf: Test that a signed program with CO-RE relocations is refusedtools/testing/selftests/bpf/prog_tests/signed_loader.c+46 -01 replyApplied

Reviews trailers per patch

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

PatchDaniel Borkmann
1/2A-b
2/2A-b

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

Read the v1 thread

Cover letter [PATCH bpf-next v1 0/2] Refuse CO-RE relocations for a signed program

The signature of a BPF program is checked over the insns as submitted, but the loader may also hand in CO-RE relocation records, which the kernel applies to those insns afterwards with values the loader picks through its BTF. Whoever holds a signed program can so change its constants once the signature has passed. Refuse relocations on a signed load, before the signature is examined, and test it.

Found by Sashiko on the "Fix some arena paper cuts" series:
https://lore.kernel.org/bpf/[email protected]/

Kumar Kartikeya Dwivedi (2):
bpf: Refuse CO-RE relocations for a signed program selftests/bpf: Test that a signed program with CO-RE relocations is
refused

 kernel/bpf/verifier.c                         |  9 ++++
 .../selftests/bpf/prog_tests/signed_loader.c  | 46 +++++++++++++++++++
 2 files changed, 55 insertions(+)

base-commit: 25bb03f0a47b622b9025a1558bf2095ec1f55d26

Signature · 1 line
2.53.0-Meta