aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/garbage.c
diff options
context:
space:
mode:
authorLiu Ye <[email protected]>2025-01-16 01:30:37 +0000
committerJakub Kicinski <[email protected]>2025-01-20 19:25:25 +0000
commit3a0b7fa095212b51ed63892540c4f249991a2d74 (patch)
tree1da6283619764371da1b599b7f37889e29574280 /net/unix/garbage.c
parentnet: phy: realtek: HWMON support for standalone versions of RTL8221B and RTL8251 (diff)
downloadkernel-3a0b7fa095212b51ed63892540c4f249991a2d74.tar.gz
kernel-3a0b7fa095212b51ed63892540c4f249991a2d74.zip
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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/unix/garbage.c')
0 files changed, 0 insertions, 0 deletions