Re: [PATCH bpf-next] bpf: bpf_prog_pack: set proper size before freeing ro_header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello:

This patch was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@xxxxxxxxxx>:

On Thu, 17 Feb 2022 10:30:01 -0800 you wrote:
> bpf_prog_pack_free() uses header->size to decide whether the header
> should be freed with module_memfree() or the bpf_prog_pack logic.
> However, in kvmalloc() failure path of bpf_jit_binary_pack_alloc(),
> header->size is not set yet. As a result, bpf_prog_pack_free() may treat
> a slice of a pack as a standalone kvmalloc'd header and call
> module_memfree() on the whole pack. This in turn causes use-after-free by
> other users of the pack.
> 
> [...]

Here is the summary with links:
  - [bpf-next] bpf: bpf_prog_pack: set proper size before freeing ro_header
    https://git.kernel.org/bpf/bpf-next/c/d24d2a2b0a81

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux