Linux kernel source tree
Go to file
Martin KaFai Lau 3f00e4a9c9 selftests/bpf: Test racing between bpf_timer_cancel_and_free and bpf_timer_cancel
This selftest is based on a Alexei's test adopted from an internal
user to troubleshoot another bug. During this exercise, a separate
racing bug was discovered between bpf_timer_cancel_and_free
and bpf_timer_cancel. The details can be found in the previous
patch.

This patch is to add a selftest that can trigger the bug.
I can trigger the UAF everytime in my qemu setup with KASAN. The idea
is to have multiple user space threads running in a tight loop to exercise
both bpf_map_update_elem (which calls into bpf_timer_cancel_and_free)
and bpf_timer_cancel.

Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Hou Tao <houtao1@huawei.com>
Link: https://lore.kernel.org/bpf/20240215211218.990808-2-martin.lau@linux.dev
2024-02-19 12:26:46 +01:00
arch x86/mm: Disallow vsyscall page read for copy_from_kernel_nofault() 2024-02-15 19:21:39 -08:00
block
certs
crypto
Documentation
drivers net: lan966x: Fix port configuration when using SGMII interface 2024-01-27 10:02:01 +00:00
fs overlayfs fixes for 6.8-rc2 2024-01-25 10:52:30 -08:00
include ipmr: fix kernel panic when forwarding mcast packets 2024-01-26 21:05:26 -08:00
init
io_uring
ipc
kernel bpf: Fix racing between bpf_timer_cancel_and_free and bpf_timer_cancel 2024-02-19 12:26:46 +01:00
lib
LICENSES
mm
net xsk: Add truesize to skb_add_rx_frag(). 2024-02-13 23:10:29 +01:00
rust
samples
scripts bpf, scripts: Correct GPL license name 2024-02-14 17:10:48 +01:00
security
sound
tools selftests/bpf: Test racing between bpf_timer_cancel_and_free and bpf_timer_cancel 2024-02-19 12:26:46 +01:00
usr
virt
.clang-format
.cocciconfig
.editorconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
.rustfmt.toml
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS MAINTAINERS: Add connector headers to NETWORKING DRIVERS 2024-01-27 09:59:48 +00:00
Makefile
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.