linux/tools/testing/selftests
Liu Ye 3a0b7fa095 selftests/net/ipsec: Fix Null pointer dereference in rtattr_pack()
Address Null pointer dereference / undefined behavior in rtattr_pack
(note that size is 0 in the bad case).

Flagged by cppcheck as:
    tools/testing/selftests/net/ipsec.c:230:25: warning: Possible null pointer
    dereference: payload [nullPointer]
    memcpy(RTA_DATA(attr), payload, size);
                           ^
    tools/testing/selftests/net/ipsec.c:1618:54: note: Calling function 'rtattr_pack',
    4th argument 'NULL' value is 0
    if (rtattr_pack(&req.nh, sizeof(req), XFRMA_IF_ID, NULL, 0)) {
                                                       ^
    tools/testing/selftests/net/ipsec.c:230:25: note: Null pointer dereference
    memcpy(RTA_DATA(attr), payload, size);
                           ^
Signed-off-by: Liu Ye <liuye@kylinos.cn>

Link: https://patch.msgid.link/20250116013037.29470-1-liuye@kylinos.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-01-20 11:25:25 -08:00
..
acct
alsa selftests/alsa: Fix circular dependency involving global-timer 2024-12-20 10:00:41 +01:00
amd-pstate
arm64 kselftest/arm64: abi: fix SVCR detection 2024-12-13 14:59:37 +00:00
bpf bpf-next-for-netdev 2025-01-07 15:39:09 -08:00
breakpoints
cachestat
capabilities
cgroup cgroup/cpuset: Prevent leakage of isolated CPUs into sched domains 2024-12-11 05:45:52 -10:00
clone3
connector
core
cpu-hotplug
cpufreq
damon selftests/damon: add _damon_sysfs.py to TEST_FILES 2024-12-05 19:54:44 -08:00
devices
dma
dmabuf-heaps
drivers selftests: drv-net-hw: inject pp_alloc_fail errors in the right place 2025-01-16 17:18:53 -08:00
dt
efivarfs
exec
fchmodat2
filelock
filesystems Char/Misc/IIO/Whatever driver subsystem updates for 6.13-rc1 2024-11-29 11:58:27 -08:00
firmware
fpu
ftrace selftests/ftrace: adjust offset for kprobe syntax error test 2024-12-11 10:08:04 -07:00
futex
gpio
hid selftests/hid: fix kfunc inclusions with newer bpftool 2024-11-29 15:27:04 +01:00
ia64
intel_pstate
iommu iommufd/selftest: Cover IOMMU_FAULT_QUEUE_ALLOC in iommufd_fail_nth 2024-12-03 12:15:00 -04:00
ipc
ir
kcmp
kexec
kmod
kselftest selftests/net: packetdrill: report benign debug flakes as xfail 2025-01-07 11:23:37 +01:00
kvm KVM: s390: three small bugfixes 2025-01-12 12:51:05 +01:00
landlock
lib
livepatch
lkdtm
locking
lsm
media_tests
membarrier
memfd selftests/memfd: add test for mapping write-sealed memfd read-only 2024-12-30 17:59:06 -08:00
memory-hotplug
mincore
mm selftests/mm: set allocated memory to non-zero content in cow test 2025-01-12 19:03:37 -08:00
module selftests: find_symbol: Actually use load_mod() parameter 2024-11-28 11:17:38 -08:00
mount
mount_setattr selftests/mount_setattr: Fix failures on 64K PAGE_SIZE kernels 2024-11-20 09:18:48 +01:00
move_mount_set_group
mqueue
nci
net selftests/net/ipsec: Fix Null pointer dereference in rtattr_pack() 2025-01-20 11:25:25 -08:00
nolibc
nsfs
ntb
openat2
pcie_bwctrl
perf_events
pid_namespace
pidfd
power_supply
powerpc
prctl
proc
pstore
ptp
ptrace
rcutorture
resctrl
ring-buffer
riscv Merge patch series "selftest: fix riscv/vector tests" 2025-01-09 09:35:42 -08:00
rlimits
rseq
rtc
rust
safesetid
sched
sched_ext sched_ext: Fix dsq_local_on selftest 2024-12-24 14:09:50 -10:00
seccomp
sgx
signal
size
sparc64
splice
static_keys
sync
syscall_user_dispatch
sysctl
tc-testing Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-01-09 16:11:47 -08:00
tdx
thermal/intel
timens
timers
tmpfs
tpm2
tty
turbostat
uevent
user_events
vDSO powerpc updates for 6.13 2024-11-23 10:44:31 -08:00
watchdog
wireguard Networking changes for 6.13. 2024-11-21 08:28:08 -08:00
x86
zram
.gitignore
Makefile pci-v6.13-changes 2024-11-26 18:05:44 -08:00
gen_kselftest_tar.sh
kselftest.h
kselftest_deps.sh
kselftest_harness.h
kselftest_install.sh
kselftest_module.h
lib.mk
run_kselftest.sh