linux/tools
Mickaël Salaün 9143d79033
selftests/landlock: Fix socket file descriptor leaks in audit helpers
audit_init() opens a netlink socket and configures it, but leaks the
file descriptor if audit_set_status() or setsockopt() fails.  Fix this
by jumping to an error path that closes the socket before returning.

Apply the same fix to audit_init_with_exe_filter(), which leaks the file
descriptor from audit_init() if audit_init_filter_exe() or
audit_filter_exe() fails, and to audit_cleanup(), which leaks it if
audit_init_filter_exe() fails in FIXTURE_TEARDOWN_PARENT().

Cc: Günther Noack <gnoack@google.com>
Cc: stable@vger.kernel.org
Fixes: 6a500b2297 ("selftests/landlock: Add tests for audit flags and domain IDs")
Reviewed-by: Günther Noack <gnoack3000@gmail.com>
Link: https://lore.kernel.org/r/20260402192608.1458252-3-mic@digikod.net
Signed-off-by: Mickaël Salaün <mic@digikod.net>
2026-04-07 18:51:01 +02:00
..
accounting delayacct: fix build regression on accounting tool 2026-02-12 15:45:56 -08:00
arch tools headers UAPI: Sync x86's asm/kvm.h with the kernel sources 2026-03-22 18:31:54 -03:00
bootconfig tools/bootconfig: fix fd leak in load_xbc_file() on fstat failure 2026-03-19 08:43:06 +09:00
bpf resolve_btfids: Fix linker flags detection 2026-03-07 08:51:51 -08:00
build tools build: Fix rust cross compilation 2026-03-04 11:37:30 -03:00
certs
cgroup
counter
crypto
debugging kernel-chktaint: add reporting for tainted modules 2026-01-26 19:07:15 -08:00
dma
docs tools: sphinx-build-wrapper: improve its help message 2026-02-02 09:57:46 -07:00
firewire
firmware
gpio
hv
iio
include tools headers: Synchronize linux/build_bug.h with the kernel sources 2026-03-22 18:34:39 -03:00
kvm/kvm_stat
laptop
leds
lib perf tools changes for v7.0: 2026-02-21 10:51:08 -08:00
memory-model
mm tools/mm/slabinfo: fix --partial long option mapping 2026-01-20 19:24:43 -08:00
net NFSD 7.0 Release Notes 2026-02-12 08:23:53 -08:00
objtool objtool: Fix Clang jump table detection 2026-03-16 15:31:25 -07:00
pcmcia
perf perf kvm stat: Fix relative paths for including headers 2026-03-17 17:16:45 -03:00
power cpupower: Add intel_pstate turbo boost support for Intel platforms 2026-03-03 11:18:53 -07:00
rcu
sched
sched_ext tools/sched_ext: Add -fms-extensions to bpf build flags 2026-03-02 22:00:23 -10:00
scripts tools headers: Update the syscall tables and unistd.h, to support the new 'rseq_slice_yield' syscall 2026-03-05 17:20:23 -03:00
sound
spi spi: tools: Add include folder to .gitignore 2026-02-09 12:27:31 +00:00
testing selftests/landlock: Fix socket file descriptor leaks in audit helpers 2026-04-07 18:51:01 +02:00
thermal
time
tracing
usb tools: usb: usbip: remove dead-link from README 2026-01-23 17:16:42 +01:00
verification
virtio
wmi
workqueue
writeback
Makefile