linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [bpf-next 0/3] potential memleak and use after free in bpf verifier
@ 2021-07-07  4:38 He Fengqing
  2021-07-07  4:38 ` [bpf-next 1/3] bpf: Move bpf_prog_clone_free into filter.h file He Fengqing
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: He Fengqing @ 2021-07-07  4:38 UTC (permalink / raw)
  To: ast, daniel, andrii, kafai, songliubraving, yhs, john.fastabend, kpsingh
  Cc: davem, kuba, netdev, bpf, linux-kernel

While reading the code of bpf verifier, I found these two issues.
Patch 1 move the bpf_prog_clone_free function into filter.h, so
we can use it in other file. Patch 2 fix memleak in an error
handling path in bpf_patch_insn_data function.
Patch 3 fix a use after free in bpf_check function.

He Fengqing (3):
  bpf: Move bpf_prog_clone_free into filter.h file
  bpf: Fix a memory leak in an error handling path in
    'bpf_patch_insn_data()'
  bpf: Fix a use after free in bpf_check()

 include/linux/filter.h | 17 ++++++++++++-
 kernel/bpf/core.c      | 27 +++++---------------
 kernel/bpf/verifier.c  | 58 ++++++++++++++++++++++++++++++++----------
 net/core/filter.c      |  2 +-
 4 files changed, 68 insertions(+), 36 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2021-07-14  1:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-07  4:38 [bpf-next 0/3] potential memleak and use after free in bpf verifier He Fengqing
2021-07-07  4:38 ` [bpf-next 1/3] bpf: Move bpf_prog_clone_free into filter.h file He Fengqing
2021-07-07  7:02   ` Song Liu
2021-07-07  4:38 ` [bpf-next 2/3] bpf: Fix a memory leak in an error handling path in 'bpf_patch_insn_data()' He Fengqing
2021-07-07  4:38 ` [bpf-next 3/3] bpf: Fix a use after free in bpf_check() He Fengqing
2021-07-07  7:25   ` Song Liu
2021-07-08  3:00     ` He Fengqing
2021-07-08  3:09       ` Alexei Starovoitov
2021-07-09 11:11         ` He Fengqing
2021-07-09 15:12           ` Alexei Starovoitov
2021-07-12  2:17             ` He Fengqing
2021-07-13 23:17               ` Alexei Starovoitov
2021-07-14  1:53                 ` He Fengqing

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).