Re: [PATCH bpf v2 1/2] bpf, test_run: Fix use-after-free issue in eth_skb_pkt_type()

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

 



Hello:

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

On Wed, 22 Jan 2025 00:06:42 +0900 you wrote:
> KMSAN reported a use-after-free issue in eth_skb_pkt_type()[1]. The
> cause of the issue was that eth_skb_pkt_type() accessed skb's data
> that didn't contain an Ethernet header. This occurs when
> bpf_prog_test_run_xdp() passes an invalid value as the user_data
> argument to bpf_test_init().
> 
> Fix this by returning an error when user_data is less than ETH_HLEN in
> bpf_test_init(). Additionally, remove the check for "if (user_size >
> size)" as it is unnecessary.
> 
> [...]

Here is the summary with links:
  - [bpf,v2,1/2] bpf, test_run: Fix use-after-free issue in eth_skb_pkt_type()
    https://git.kernel.org/bpf/bpf/c/c5e8e573d6e4
  - [bpf,v2,2/2] selftests/bpf: Adjust data size to have ETH_HLEN
    https://git.kernel.org/bpf/bpf/c/f9f03a0a6d2d

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