Re: [PATCH bpf-next v2 1/2] bpf: Reject narrower access to pointer ctx fields

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

 



Hello:

This series was applied to bpf/bpf-next.git (net)
by Martin KaFai Lau <martin.lau@xxxxxxxxxx>:

On Tue, 22 Jul 2025 16:32:32 +0200 you wrote:
> The following BPF program, simplified from a syzkaller repro, causes a
> kernel warning:
> 
>     r0 = *(u8 *)(r1 + 169);
>     exit;
> 
> With pointer field sk being at offset 168 in __sk_buff. This access is
> detected as a narrower read in bpf_skb_is_valid_access because it
> doesn't match offsetof(struct __sk_buff, sk). It is therefore allowed
> and later proceeds to bpf_convert_ctx_access. At that point,
> target_size is null and the verifier errors with a kernel warning and:
> 
> [...]

Here is the summary with links:
  - [bpf-next,v2,1/2] bpf: Reject narrower access to pointer ctx fields
    https://git.kernel.org/bpf/bpf-next/c/e09299225d5b
  - [bpf-next,v2,2/2] selftests/bpf: Test invalid narrower ctx load
    https://git.kernel.org/bpf/bpf-next/c/ba578b87fe2b

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