linux/tools/testing/selftests
Chris Gellermann 6be581aeff
selftests/nci: Fix out-of-bounds store on thread join
The NCI test collects the exit status of its helper threads by passing
the address of an int to pthread_join():

	int status;
	...
	pthread_join(thread_t, (void **) &status);

pthread_join() stores a void pointer to the memory location. On 64-bit
systems, a void pointer is wider than an int, so the store overruns the
4 bytes of space allocated on the stack for the integer and corrupts the
adjacent stack. On our CHERI system, this caused a fault due to a
capability bounds violation.

Fix this by introducing a helper that joins a thread through a void
pointer and converts the result back to an integer, which is what the
helper threads return.

While here, also fix the logic in disconnect_tag() if the helper thread
creation failed. Previously, it would have joined a thread that was
never created when pthread_create() failed.

Fixes: f595cf1242 ("selftests: Add nci suite")
Signed-off-by: Chris Gellermann <christian.gellermann@codasip.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20260904095915.3372241-1-christian.gellermann@codasip.com
Signed-off-by: David Heidelberg <david@ixit.cz>
2026-09-23 22:13:16 +02:00
..
acct selftests/acct: share netlink helpers 2026-08-03 21:10:14 -07:00
alloc_tag kselftest: alloc_tag: extend the allocinfo ioctl kselftest 2026-08-24 18:43:13 -07:00
alsa selftests/alsa: Fix the step check for INTEGER controls 2026-09-03 18:07:41 +02:00
amd-pstate
arm64 selftests/arm64: Add MTE test config fragment 2026-08-27 14:18:39 +00:00
bpf bpf-fixes 2026-09-06 13:49:44 -07:00
breakpoints selftests: fix ARCH normalization to handle command-line argument 2026-03-27 21:19:44 -07:00
cachestat selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
capabilities selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
cgroup cgroup: Fixes for v7.3-rc1 2026-08-31 14:20:32 -07:00
clone3 selftests/clone3: fix wild pointer access of getline due to missing init 2026-07-28 17:37:33 -07:00
connector selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
core selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
coredump selftests: check pidfd_info->coredump_code correctness 2026-03-23 16:29:15 +01:00
cpu-hotplug selftests/cpu-hotplug: Fix check for cpu hotplug not supported 2026-03-31 16:07:19 -06:00
cpufreq kselftest: cpufreq: Backup and restore governor for sptests 2026-07-22 21:56:44 +02:00
damon selftests/damon: check correct path in ensure_file() not_exist case 2026-08-04 19:18:29 -07:00
dax selftests/dax: add dax/kmem hotplug sysfs regression test 2026-08-06 18:57:00 -07:00
devices
dm-verity selftests: add dm-verity keyring selftests 2026-01-19 15:21:26 +01:00
dmabuf-heaps selftests: dmabuf-heaps: add fd-leak-on-EFAULT regression test 2026-08-24 14:21:55 +02:00
drivers Char/Misc/IIO/etc driver update for 7.3-rc1 2026-08-25 09:38:50 -07:00
dt
efivarfs
exec selftests/exec: test the pre-opened interpreter limit 2026-08-03 23:36:18 +02:00
fchmodat2 selftests/fchmodat2: use ksft_finished() 2026-03-27 21:19:37 -07:00
filelock kselftest/filelock: add a .gitignore file 2026-05-28 21:24:44 -07:00
filesystems fuse update for 7.3 2026-08-25 07:59:44 -07:00
firmware
fpu
ftrace Probes updates for v7.3: 2026-08-20 15:11:52 -07:00
futex selftests/futex: Give circular-list nodes static storage 2026-07-20 21:03:19 +02:00
gpio selftests: gpio: add gpio-cdev-uaf to .gitignore 2026-07-08 09:45:43 +02:00
hid selftests/hid: prepare test_rdesc_fixup_get_data_overflow for the new verifier 2026-09-01 16:08:28 +02:00
ia64
intel_pstate selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
iommu iommufd/selftest: Add invalidation entry_num and entry_len boundary tests 2026-06-12 10:44:44 -03:00
ipc selftests: ipc: change operation not supported error number 2026-08-03 21:10:17 -07:00
ir selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
kcmp selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
kexec selftests/kexec: Ignore selftest binary 2025-09-25 13:43:28 -06:00
kho selftests: kho: test with deferred struct page init 2026-06-01 02:31:37 +03:00
kmod lib/test_kmod: do not hardcode/depend on any filesystem 2025-05-11 17:54:09 -07:00
kselftest selftests: Fix duplicated test number reporting 2026-04-17 11:29:03 -06:00
kselftest_harness selftests: harness: Validate intermixing of kselftest and harness functionality 2026-03-31 13:48:34 -06:00
kvm KVM/arm64 changes for 7.3 2026-08-24 12:42:07 -04:00
landlock landlock: Test trace path output boundaries 2026-09-08 11:49:39 +02:00
lib
livepatch selftests/livepatch: update test-ftrace.sh for deprecated ftrace_enabled 2026-08-10 21:21:18 -04:00
liveupdate selftests/liveupdate: Move luo_test_utils.* into a reusable library 2026-07-26 11:28:41 +03:00
lkdtm selftests/lkdtm: rename STACKLEAK_ERASING to KSTACK_ERASE 2026-07-15 18:08:11 -07:00
locking
lsm selftests/lsm: Fix memory leak in attr_lsm_count 2026-07-07 15:14:00 -04:00
media_tests selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
membarrier selftests/membarrier: Add rseq stress test for CFS throttle interactions 2026-05-05 12:50:48 +02:00
memfd selftests/memfd: remove unused variable 'sig' in fuse_test 2026-06-04 14:45:06 -07:00
memory-hotplug
mincore selftests: mincore: count file-mmap readahead on both sides 2026-08-06 18:56:55 -07:00
mm mm/secretmem: properly account locked pages 2026-09-03 10:56:10 -07:00
module
mount
mount_setattr selftests/mount_setattr: increase tmpfs size for idmapped mount tests 2026-03-17 16:59:45 +01:00
move_mount_set_group selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
mqueue selftests/mqueue: Fix incorrectly named file 2026-03-31 15:01:51 -06:00
mseal_system_mappings selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
namespaces selftests/namespaces: Fix racy pipe handshake in timens and pidns_separate 2026-08-13 12:20:42 +02:00
nci selftests/nci: Fix out-of-bounds store on thread join 2026-09-23 22:13:16 +02:00
net selftests: mptcp: lib: get counters for the right test 2026-09-09 13:32:56 -07:00
nolibc tools/nolibc: add support for Alpha 2026-08-02 09:30:55 +02:00
ntb
pci_endpoint selftests: pci_endpoint: Skip BAR subrange test on -ENOSPC 2026-04-08 14:41:39 -05:00
pcie_bwctrl
perf_events selftests/perf_events: fix mmap() error check in sigtrap_threads 2026-05-28 21:24:49 -07:00
pid_namespace selftests/pid_namespace: compute pid_max test limits dynamically 2026-05-11 11:09:30 +02:00
pidfd selftests/pidfd: check PIDFD_THREAD survives open_by_handle_at() 2026-07-22 13:55:20 +02:00
pipe selftests/pipe: add pipe_bench microbenchmark 2026-05-28 14:33:25 +02:00
power_supply power: supply: Add PbAc, NiZn, RAM, and ZnAr support 2026-07-21 22:28:11 +02:00
powerpc selftests/powerpc: use MAP_FAILED instead of (void *)-1 in tm-signal-context-force-tm 2026-09-10 13:16:50 +05:30
prctl selftests/prctl: fix non-anonymous VMA mapping in set-anon-vma-name test 2026-08-13 15:42:07 -07:00
proc mm.git review status for linus..mm-stable 2026-08-27 09:17:06 -07:00
pstore
ptp selftests: ptp: treat unsupported PHC operations as skip 2026-01-27 17:57:28 -08:00
ptrace selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
rcutorture torture: Allow "norm" abbreviation for "normal" 2026-05-24 09:38:59 +02:00
rdma RDMA/selftests: Add rxe_netns_names test 2026-07-26 03:11:00 -04:00
resctrl selftests/resctrl: Reduce L2 impact on CAT test 2026-05-04 18:40:02 -06:00
ring-buffer selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
riscv kselftest/riscv: Replace __ASSEMBLY__ with __ASSEMBLER__ 2026-09-01 19:20:23 -06:00
rlimits
rseq Futex updates: 2026-08-18 15:26:35 -07:00
rtc selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
rust
safesetid
sched
sched_ext selftests/sched_ext: Fix flaky ddsp failure tests on busy systems 2026-08-14 12:32:23 -10:00
seccomp selftests/seccomp: Fix pointer type mismatch build error 2026-07-15 18:11:29 -07:00
sgx selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
signal selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
size
sparc64 selftests: fix ARCH normalization to handle command-line argument 2026-03-27 21:19:44 -07:00
splice
static_keys
sync selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
syscall_user_dispatch syscall_user_dispatch: Make it configurable in Kconfig 2026-07-08 10:22:00 +02:00
sysctl sysctl: Nixify sysctl.sh 2025-07-23 11:56:02 +02:00
tc-testing selftests: tc-testing: test action batch failure cleanup 2026-09-10 09:06:05 -07:00
tdx selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
thermal/intel selftests: fix ARCH normalization to handle command-line argument 2026-03-27 21:19:44 -07:00
timens selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
timers selftests: timers: nsleep-lat: Check all calls to clock_nanosleep() and clock_gettime() 2026-08-11 18:11:21 +02:00
tmpfs selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
tpm2 selftests: tpm2: Fix ill defined assertions 2025-12-03 22:55:27 +02:00
tty TTY/Serial changes for 6.19-rc1 2025-12-06 18:38:19 -08:00
turbostat
ublk selftests: ublk: add batch IO cases to recover_03 2026-09-10 20:19:21 -06:00
uevent selftests/uevent: increase __UEVENT_BUFFER_SIZE to avoid ENOBUFS on busy systems 2026-06-17 15:37:46 -07:00
user_events selftests/user_events: Wait for deferred event teardown after unregister 2026-07-08 09:33:22 -04:00
vDSO selftests: vDSO: vdso_test_correctness: Add a test for time() 2026-03-11 15:23:24 +01:00
verification selftests/verification: Add selftests for deadline and stall monitors 2026-07-31 16:27:46 +02:00
vfio vfio: selftests: Retry on EAGAIN during device reset 2026-08-10 13:24:40 -06:00
vsock selftests/vsock: skip vng setsid workaround on >= 1.41 2026-06-15 12:52:01 -07:00
watchdog selftests: watchdog: skip ping loop if WDIOF_KEEPALIVEPING not supported 2025-09-16 16:55:04 -06:00
wireguard sysctl: remove CONFIG_PROC_SYSCTL, it just mirrors CONFIG_SYSCTL 2026-08-05 15:28:23 +02:00
x86 selftests/x86: Add shadow stack uprobe CALL test 2026-07-02 13:21:49 +02:00
zram selftests/zram: fix kernel_gte() for POSIX sh 2026-07-30 07:55:37 -06:00
.gitignore
clock-helpers.h selftests: Add clock-helpers.h 2026-08-11 18:11:20 +02:00
gen_kselftest_tar.sh
kselftest_deps.sh
kselftest_harness.h selftests: harness: Mark test fixture objects __maybe_unused 2026-08-12 12:00:05 -06:00
kselftest_install.sh
kselftest_module.h
kselftest.h linux_kselftest-next-7.2-rc1 2026-06-16 16:49:07 +05:30
lib.mk selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
Makefile mm.git review status for linus..mm-stable 2026-08-27 09:17:06 -07:00
run_kselftest.sh selftests/run_kselftest.sh: Allow choosing per-test log directory 2026-04-13 11:05:39 -06:00