public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 bpf-next 0/2] bpf: Fix Null-Pointer Dereference in kernel_clone() via BPF fmod_ret on security_task_alloc
@ 2026-04-11 16:35 Feng Yang
  2026-04-11 16:35 ` [PATCH v3 bpf-next 1/2] " Feng Yang
  2026-04-11 16:35 ` [PATCH v3 bpf-next 2/2] selftests/bpf: Add selftests for verifying return values of fmod_ret Feng Yang
  0 siblings, 2 replies; 7+ messages in thread
From: Feng Yang @ 2026-04-11 16:35 UTC (permalink / raw)
  To: ast, daniel, andrii, martin.lau, eddyz87, memxor, song,
	yonghong.song, jolsa, john.fastabend, kpsingh, mattbobrowski,
	jiayuan.chen, leon.hwang, menglong.dong
  Cc: bpf, linux-kernel, linux-kselftest, Feng Yang

From: Feng Yang <yangfeng@kylinos.cn>

This patch set adds return value validation for fmod_ret
to prevent system crashes caused by incorrect return values.

Changes in v3:
- Do not move the code, and make some formatting changes. Thanks, Leon
  Hwang.
- Error injection always ensures that 0 is a valid return value. Thanks,
  Menglong Dong.
- Link to v2: https://lore.kernel.org/all/20260410061037.149532-1-yangfeng59949@163.com/
Changes in v2:
- Add validation for fault injection and include selftests. Thanks, Jiri
  Olsa, Jiayuan Chen.
- Link to v1: https://lore.kernel.org/all/20260408094816.228322-1-yangfeng59949@163.com/

Feng Yang (2):
  bpf: Fix Null-Pointer Dereference in kernel_clone() via BPF fmod_ret
    on security_task_alloc
  selftests/bpf: Add selftests for verifying return values of fmod_ret.

 kernel/bpf/verifier.c                         | 114 +++++++++++++++++-
 .../selftests/bpf/prog_tests/verifier.c       |   2 +
 .../bpf/progs/verifier_fmod_ret_return.c      |  59 +++++++++
 3 files changed, 173 insertions(+), 2 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/progs/verifier_fmod_ret_return.c

-- 
2.43.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-04-13  1:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-11 16:35 [PATCH v3 bpf-next 0/2] bpf: Fix Null-Pointer Dereference in kernel_clone() via BPF fmod_ret on security_task_alloc Feng Yang
2026-04-11 16:35 ` [PATCH v3 bpf-next 1/2] " Feng Yang
2026-04-11 17:32   ` Alexei Starovoitov
2026-04-12  2:40     ` Feng Yang
2026-04-12  3:39   ` Menglong Dong
2026-04-13  1:58     ` Feng Yang
2026-04-11 16:35 ` [PATCH v3 bpf-next 2/2] selftests/bpf: Add selftests for verifying return values of fmod_ret Feng Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox