Re: [PATCH bpf] bpf, arm64: fix trampoline for BPF_TRAMP_F_CALL_ORIG

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

 



Hello:

This patch was applied to bpf/bpf-next.git (master)
by Daniel Borkmann <daniel@xxxxxxxxxxxxx>:

On Thu, 11 Jul 2024 15:18:38 +0000 you wrote:
> When BPF_TRAMP_F_CALL_ORIG is set, the trampoline calls
> __bpf_tramp_enter() and __bpf_tramp_exit() functions, passing them the
> struct bpf_tramp_image *im pointer as an argument in R0.
> 
> The trampoline generation code uses emit_addr_mov_i64() to emit
> instructions for moving the bpf_tramp_image address into R0, but
> emit_addr_mov_i64() assumes the address to be in the vmalloc() space and
> uses only 48 bits. Because bpf_tramp_image is allocated using kzalloc(),
> its address can use more than 48-bits, in this case the trampoline
> will pass an invalid address to __bpf_tramp_enter/exit() causing a
> kernel crash.
> 
> [...]

Here is the summary with links:
  - [bpf] bpf, arm64: fix trampoline for BPF_TRAMP_F_CALL_ORIG
    https://git.kernel.org/bpf/bpf-next/c/19d3c179a377

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