Linux Security Modules development
 help / color / mirror / Atom feed
* [PATCH bpf v3 0/2] gen_loader fixes
@ 2026-05-22 21:53 KP Singh
  2026-05-22 21:53 ` [PATCH bpf v3 1/2] libbpf: fix off-by-one in emit_signature_match jump offset KP Singh
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: KP Singh @ 2026-05-22 21:53 UTC (permalink / raw)
  To: bpf, linux-security-module; +Cc: ast, daniel, memxor


  # v2 -> v3

  defer fixing 32 bit.

  Fix off-by-one in the signed loader's cleanup jump and reject
  non-exclusive metadata maps.

  Patch 1 fixes a pre-existing bug: the cleanup-label offset in
  emit_signature_match() does not account for the MOV insn emitted
  before the JMP.

  Patch 2 adds an exclusivity check so the loader bails if the
  metadata map lacks excl_prog_hash, preventing stale-hash attacks
  from concurrent map writers.

KP Singh (2):
  libbpf: fix off-by-one in emit_signature_match jump offset
  bpf, libbpf: reject non-exclusive metadata maps in the signed loader

 include/linux/bpf.h                           |  2 +-
 tools/lib/bpf/gen_loader.c                    | 20 +++++++++++++++++--
 .../selftests/bpf/progs/verifier_map_ptr.c    |  8 +++++---
 3 files changed, 24 insertions(+), 6 deletions(-)

-- 
2.53.0


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

end of thread, other threads:[~2026-05-23 15:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-22 21:53 [PATCH bpf v3 0/2] gen_loader fixes KP Singh
2026-05-22 21:53 ` [PATCH bpf v3 1/2] libbpf: fix off-by-one in emit_signature_match jump offset KP Singh
2026-05-22 22:41   ` bot+bpf-ci
2026-05-22 21:53 ` [PATCH bpf v3 2/2] bpf, libbpf: reject non-exclusive metadata maps in the signed loader KP Singh
2026-05-22 22:41   ` bot+bpf-ci
2026-05-23 15:12   ` Alexei Starovoitov
2026-05-23 15:00 ` [PATCH bpf v3 0/2] gen_loader fixes 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