[BUG][KMEMLEAK] selftests/net/tcp_ao: unreferenced object (size 128)

From: Mirsad Todorovac
Date: Sat Mar 23 2024 - 16:40:45 EST


Hi,

On the Ubuntu 22.04 LTS system, with recent iproute2-next toolsvand build 6.8-11743-ga4145ce1e7bc,
kmemleak system reported the following memory leaks:

unreferenced object 0xffff9d998a7a9200 (size 128):
comm "unsigned-md5_ip", pid 884102, jiffies 4297217176
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace (crc 2a283862):
kmemleak_alloc (/home/marvin/linux/kernel/linux_torvalds/mm/kmemleak.c:1045)
kmalloc_trace (/home/marvin/linux/kernel/linux_torvalds/./include/linux/kmemleak.h:42 /home/marvin/linux/kernel/linux_torvalds/mm/slub.c:3802 /home/marvin/linux/kernel/linux_torvalds/mm/slub.c:3845 /home/marvin/linux/kernel/linux_torvalds/mm/slub.c:3992)
tcp_ao_alloc_info (/home/marvin/linux/kernel/linux_torvalds/net/ipv4/tcp_ao.c:229)
tcp_ao_info_cmd.constprop.0 (/home/marvin/linux/kernel/linux_torvalds/net/ipv4/tcp_ao.c:1959)
tcp_v4_parse_ao (/home/marvin/linux/kernel/linux_torvalds/net/ipv4/tcp_ao.c:2038)
do_tcp_setsockopt (/home/marvin/linux/kernel/linux_torvalds/net/ipv4/tcp.c:3655)
tcp_setsockopt (/home/marvin/linux/kernel/linux_torvalds/net/ipv4/tcp.c:3738)
sock_common_setsockopt (/home/marvin/linux/kernel/linux_torvalds/net/core/sock.c:3727)
do_sock_setsockopt (/home/marvin/linux/kernel/linux_torvalds/net/socket.c:2311)
__sys_setsockopt (/home/marvin/linux/kernel/linux_torvalds/./include/linux/file.h:34 /home/marvin/linux/kernel/linux_torvalds/net/socket.c:2336)
__x64_sys_setsockopt (/home/marvin/linux/kernel/linux_torvalds/net/socket.c:2340)
do_syscall_64 (/home/marvin/linux/kernel/linux_torvalds/arch/x86/entry/common.c:52 /home/marvin/linux/kernel/linux_torvalds/arch/x86/entry/common.c:83)
entry_SYSCALL_64_after_hwframe (/home/marvin/linux/kernel/linux_torvalds/arch/x86/entry/entry_64.S:129)
unreferenced object 0xffff9d9a49065b00 (size 128):
comm "unsigned-md5_ip", pid 884438, jiffies 4297233666
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace (crc 2a283862):
kmemleak_alloc (/home/marvin/linux/kernel/linux_torvalds/mm/kmemleak.c:1045)
kmalloc_trace (/home/marvin/linux/kernel/linux_torvalds/./include/linux/kmemleak.h:42 /home/marvin/linux/kernel/linux_torvalds/mm/slub.c:3802 /home/marvin/linux/kernel/linux_torvalds/mm/slub.c:3845 /home/marvin/linux/kernel/linux_torvalds/mm/slub.c:3992)
tcp_ao_alloc_info (/home/marvin/linux/kernel/linux_torvalds/net/ipv4/tcp_ao.c:229)
tcp_ao_info_cmd.constprop.0 (/home/marvin/linux/kernel/linux_torvalds/net/ipv4/tcp_ao.c:1959)
tcp_parse_ao (/home/marvin/linux/kernel/linux_torvalds/net/ipv4/tcp_ao.c:2033)
tcp_v6_parse_ao (/home/marvin/linux/kernel/linux_torvalds/net/ipv6/tcp_ao.c:146)
do_tcp_setsockopt (/home/marvin/linux/kernel/linux_torvalds/net/ipv4/tcp.c:3655)
tcp_setsockopt (/home/marvin/linux/kernel/linux_torvalds/net/ipv4/tcp.c:3738)
sock_common_setsockopt (/home/marvin/linux/kernel/linux_torvalds/net/core/sock.c:3727)
do_sock_setsockopt (/home/marvin/linux/kernel/linux_torvalds/net/socket.c:2311)
__sys_setsockopt (/home/marvin/linux/kernel/linux_torvalds/./include/linux/file.h:34 /home/marvin/linux/kernel/linux_torvalds/net/socket.c:2336)
__x64_sys_setsockopt (/home/marvin/linux/kernel/linux_torvalds/net/socket.c:2340)
do_syscall_64 (/home/marvin/linux/kernel/linux_torvalds/arch/x86/entry/common.c:52 /home/marvin/linux/kernel/linux_torvalds/arch/x86/entry/common.c:83)
entry_SYSCALL_64_after_hwframe (/home/marvin/linux/kernel/linux_torvalds/arch/x86/entry/entry_64.S:129)
unreferenced object 0xffff9d9a8c98fb00 (size 128):
comm "unsigned-md5_ip", pid 2063902, jiffies 4321736387
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace (crc 2a283862):
kmemleak_alloc (/home/marvin/linux/kernel/linux_torvalds/mm/kmemleak.c:1045)
kmalloc_trace (/home/marvin/linux/kernel/linux_torvalds/./include/linux/kmemleak.h:42 /home/marvin/linux/kernel/linux_torvalds/mm/slub.c:3802 /home/marvin/linux/kernel/linux_torvalds/mm/slub.c:3845 /home/marvin/linux/kernel/linux_torvalds/mm/slub.c:3992)
tcp_ao_alloc_info (/home/marvin/linux/kernel/linux_torvalds/net/ipv4/tcp_ao.c:229)
tcp_ao_info_cmd.constprop.0 (/home/marvin/linux/kernel/linux_torvalds/net/ipv4/tcp_ao.c:1959)
tcp_v4_parse_ao (/home/marvin/linux/kernel/linux_torvalds/net/ipv4/tcp_ao.c:2038)
do_tcp_setsockopt (/home/marvin/linux/kernel/linux_torvalds/net/ipv4/tcp.c:3655)
tcp_setsockopt (/home/marvin/linux/kernel/linux_torvalds/net/ipv4/tcp.c:3738)
sock_common_setsockopt (/home/marvin/linux/kernel/linux_torvalds/net/core/sock.c:3727)
do_sock_setsockopt (/home/marvin/linux/kernel/linux_torvalds/net/socket.c:2311)
__sys_setsockopt (/home/marvin/linux/kernel/linux_torvalds/./include/linux/file.h:34 /home/marvin/linux/kernel/linux_torvalds/net/socket.c:2336)
__x64_sys_setsockopt (/home/marvin/linux/kernel/linux_torvalds/net/socket.c:2340)
do_syscall_64 (/home/marvin/linux/kernel/linux_torvalds/arch/x86/entry/common.c:52 /home/marvin/linux/kernel/linux_torvalds/arch/x86/entry/common.c:83)
entry_SYSCALL_64_after_hwframe (/home/marvin/linux/kernel/linux_torvalds/arch/x86/entry/entry_64.S:129)
unreferenced object 0xffff9d9a49efdd00 (size 128):
comm "unsigned-md5_ip", pid 2064231, jiffies 4321752509
hex dump (first 32 bytes):
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace (crc 2a283862):
kmemleak_alloc (/home/marvin/linux/kernel/linux_torvalds/mm/kmemleak.c:1045)
kmalloc_trace (/home/marvin/linux/kernel/linux_torvalds/./include/linux/kmemleak.h:42 /home/marvin/linux/kernel/linux_torvalds/mm/slub.c:3802 /home/marvin/linux/kernel/linux_torvalds/mm/slub.c:3845 /home/marvin/linux/kernel/linux_torvalds/mm/slub.c:3992)
tcp_ao_alloc_info (/home/marvin/linux/kernel/linux_torvalds/net/ipv4/tcp_ao.c:229)
tcp_ao_info_cmd.constprop.0 (/home/marvin/linux/kernel/linux_torvalds/net/ipv4/tcp_ao.c:1959)
tcp_parse_ao (/home/marvin/linux/kernel/linux_torvalds/net/ipv4/tcp_ao.c:2033)
tcp_v6_parse_ao (/home/marvin/linux/kernel/linux_torvalds/net/ipv6/tcp_ao.c:146)
do_tcp_setsockopt (/home/marvin/linux/kernel/linux_torvalds/net/ipv4/tcp.c:3655)
tcp_setsockopt (/home/marvin/linux/kernel/linux_torvalds/net/ipv4/tcp.c:3738)
sock_common_setsockopt (/home/marvin/linux/kernel/linux_torvalds/net/core/sock.c:3727)
do_sock_setsockopt (/home/marvin/linux/kernel/linux_torvalds/net/socket.c:2311)
__sys_setsockopt (/home/marvin/linux/kernel/linux_torvalds/./include/linux/file.h:34 /home/marvin/linux/kernel/linux_torvalds/net/socket.c:2336)
__x64_sys_setsockopt (/home/marvin/linux/kernel/linux_torvalds/net/socket.c:2340)
do_syscall_64 (/home/marvin/linux/kernel/linux_torvalds/arch/x86/entry/common.c:52 /home/marvin/linux/kernel/linux_torvalds/arch/x86/entry/common.c:83)
entry_SYSCALL_64_after_hwframe (/home/marvin/linux/kernel/linux_torvalds/arch/x86/entry/entry_64.S:129)

Hope this helps,

Best regards,
Mirsad Todorovac