2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/tools/testing
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
..
crypto/chacha20-s390
cxl module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
fault-injection failcmd: make failcmd.sh executable 2024-09-01 20:43:32 -07:00
ktest ktest.pl: Avoid false positives with grub2 skip regex 2024-09-04 15:06:28 -04:00
kunit kunit: qemu_configs: loongarch: Enable shutdown 2024-11-19 15:26:30 -07:00
memblock memblock: updates for 6.12-rc1 2024-09-25 11:35:19 -07:00
nvdimm Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
radix-tree maple_tree: add some alloc node test case 2024-11-06 20:11:13 -08:00
scatterlist
selftests selftests/net/ipsec: Fix Null pointer dereference in rtattr_pack() 2025-01-20 11:25:25 -08:00
shared tools: fix atomic_set() definition to set the value correctly 2025-01-12 19:03:35 -08:00
vma tools: fix atomic_set() definition to set the value correctly 2025-01-12 19:03:35 -08:00
vsock vsock/test: Add test for MSG_ZEROCOPY completion memory leak 2024-12-23 10:28:01 -08:00