bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf 0/2] bpf, fix for subprogs with tailcalls
@ 2021-06-30 19:40 John Fastabend
  2021-06-30 19:40 ` [PATCH bpf 1/2] bpf: track subprog poke correctly, fix use-after-free John Fastabend
  2021-06-30 19:40 ` [PATCH bpf 2/2] bpf: selftest to verify mixing bpf2bpf calls and tailcalls with insn patch John Fastabend
  0 siblings, 2 replies; 4+ messages in thread
From: John Fastabend @ 2021-06-30 19:40 UTC (permalink / raw)
  To: maciej.fijalkowski, ast, daniel, andriin; +Cc: john.fastabend, bpf, netdev

This fixes a use-after-free when using subprogs and tailcalls and adds
a test case to trigger the use-after-free.

John Fastabend (2):
  bpf: track subprog poke correctly, fix use-after-free
  bpf: selftest to verify mixing bpf2bpf calls and tailcalls with insn
    patch

 arch/x86/net/bpf_jit_comp.c                   |  4 ++
 include/linux/bpf.h                           |  1 +
 kernel/bpf/core.c                             |  7 +++-
 kernel/bpf/verifier.c                         | 39 ++++---------------
 .../selftests/bpf/prog_tests/tailcalls.c      | 36 ++++++++++++-----
 .../selftests/bpf/progs/tailcall_bpf2bpf4.c   | 21 +++++++++-
 6 files changed, 64 insertions(+), 44 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2021-07-06  8:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-30 19:40 [PATCH bpf 0/2] bpf, fix for subprogs with tailcalls John Fastabend
2021-06-30 19:40 ` [PATCH bpf 1/2] bpf: track subprog poke correctly, fix use-after-free John Fastabend
2021-07-06  8:10   ` Daniel Borkmann
2021-06-30 19:40 ` [PATCH bpf 2/2] bpf: selftest to verify mixing bpf2bpf calls and tailcalls with insn patch John Fastabend

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).