mbox series

[v2,bpf-next,0/2] bpf: Fix an issue in bpf_iter_task

Message ID 20240217114152.1623-1-laoar.shao@gmail.com (mailing list archive)
Headers show
Series bpf: Fix an issue in bpf_iter_task | expand

Message

Yafang Shao Feb. 17, 2024, 11:41 a.m. UTC
The uninitialized bpf_iter_task variable poses a risk of triggering a
kernel panic. To fix this potential issue, it's imperative to ensure proper
initialization of the variable. This problem surfaced during the
implementation phase of the bits iterator [0]. 

[0]. https://lwn.net/ml/bpf/CALOAHbDJWHOB+viBz6SUqdeF+Nkxmh4gLZo5Ad_keQXjBWHAsQ@mail.gmail.com 

v1->v2:
- Correct the fixes tag (Chuyi)  

Yafang Shao (2):
  bpf: Fix an issue due to uninitialized bpf_iter_task
  selftests/bpf: Add negtive test cases for task iter

 kernel/bpf/task_iter.c                         |  2 ++
 tools/testing/selftests/bpf/prog_tests/iters.c |  1 +
 tools/testing/selftests/bpf/progs/iters_task.c | 12 +++++++++++-
 3 files changed, 14 insertions(+), 1 deletion(-)

Comments

patchwork-bot+netdevbpf@kernel.org Feb. 19, 2024, 11:40 a.m. UTC | #1
Hello:

This series was applied to bpf/bpf.git (master)
by Daniel Borkmann <daniel@iogearbox.net>:

On Sat, 17 Feb 2024 19:41:50 +0800 you wrote:
> The uninitialized bpf_iter_task variable poses a risk of triggering a
> kernel panic. To fix this potential issue, it's imperative to ensure proper
> initialization of the variable. This problem surfaced during the
> implementation phase of the bits iterator [0].
> 
> [0]. https://lwn.net/ml/bpf/CALOAHbDJWHOB+viBz6SUqdeF+Nkxmh4gLZo5Ad_keQXjBWHAsQ@mail.gmail.com
> 
> [...]

Here is the summary with links:
  - [v2,bpf-next,1/2] bpf: Fix an issue due to uninitialized bpf_iter_task
    https://git.kernel.org/bpf/bpf/c/5f2ae606cb5a
  - [v2,bpf-next,2/2] selftests/bpf: Add negtive test cases for task iter
    https://git.kernel.org/bpf/bpf/c/5c138a8a4abe

You are awesome, thank you!