Eric Dumazet
2120bbab55
sctp: initialize more fields in sctp_v6_from_sk()
[ Upstream commit 2e8750469242cad8f01f320131fd5a6f540dbb99 ]
syzbot found that sin6_scope_id was not properly initialized,
leading to undefined behavior.
Clear sin6_scope_id and sin6_flowinfo.
BUG: KMSAN: uninit-value in __sctp_v6_cmp_addr+0x887/0x8c0 net/sctp/ipv6.c:649
__sctp_v6_cmp_addr+0x887/0x8c0 net/sctp/ipv6.c:649
sctp_inet6_cmp_addr+0x4f2/0x510 net/sctp/ipv6.c:983
sctp_bind_addr_conflict+0x22a/0x3b0 net/sctp/bind_addr.c:390
sctp_get_port_local+0x21eb/0x2440 net/sctp/socket.c:8452
sctp_get_port net/sctp/socket.c:8523 [inline]
sctp_listen_start net/sctp/socket.c:8567 [inline]
sctp_inet_listen+0x710/0xfd0 net/sctp/socket.c:8636
__sys_listen_socket net/socket.c:1912 [inline]
__sys_listen net/socket.c:1927 [inline]
__do_sys_listen net/socket.c:1932 [inline]
__se_sys_listen net/socket.c:1930 [inline]
__x64_sys_listen+0x343/0x4c0 net/socket.c:1930
x64_sys_call+0x271d/0x3e20 arch/x86/include/generated/asm/syscalls_64.h:51
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xd9/0x210 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Local variable addr.i.i created at:
sctp_get_port net/sctp/socket.c:8515 [inline]
sctp_listen_start net/sctp/socket.c:8567 [inline]
sctp_inet_listen+0x650/0xfd0 net/sctp/socket.c:8636
__sys_listen_socket net/socket.c:1912 [inline]
__sys_listen net/socket.c:1927 [inline]
__do_sys_listen net/socket.c:1932 [inline]
__se_sys_listen net/socket.c:1930 [inline]
__x64_sys_listen+0x343/0x4c0 net/socket.c:1930
Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Reported-by: syzbot+e69f06a0f30116c68056@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/netdev/68adc0a2.050a0220.37038e.00c4.GAE@google.com/T/#u
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: Xin Long <lucien.xin@gmail.com>
Link: https://patch.msgid.link/20250826141314.1802610-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Ulrich Hecht <uli@kernel.org>
2025-09-22 10:17:53 +02:00
..
2024-12-05 10:59:42 +01:00
2025-03-11 08:34:57 +01:00
2025-09-16 13:55:09 +02:00
2025-09-16 13:55:09 +02:00
2025-09-22 10:17:52 +02:00
2025-05-08 11:55:41 +02:00
2025-09-22 10:17:52 +02:00
2025-07-17 10:10:40 +02:00
2025-09-16 13:55:10 +02:00
2025-07-17 10:07:58 +02:00
2024-07-18 11:39:38 +02:00
2025-09-16 13:55:12 +02:00
2025-03-11 08:35:00 +01:00
2024-09-12 11:02:52 +02:00
2024-05-17 11:42:37 +02:00
2024-03-26 18:22:42 -04:00
2025-02-07 03:34:23 +01:00
2024-01-08 11:27:34 +01:00
2025-09-22 10:17:52 +02:00
2025-09-22 10:17:52 +02:00
2024-09-04 13:13:03 +02:00
2024-09-04 13:13:05 +02:00
2023-08-30 16:31:48 +02:00
2024-05-17 11:42:38 +02:00
2025-07-17 10:07:58 +02:00
2025-09-16 13:55:11 +02:00
2025-03-11 08:34:59 +01:00
2025-07-17 10:08:05 +02:00
2025-09-16 13:55:16 +02:00
2025-09-16 13:55:13 +02:00
2025-07-17 10:08:02 +02:00
2025-09-16 13:55:13 +02:00
2025-02-07 03:34:27 +01:00
2025-07-17 10:08:02 +02:00
2024-05-17 11:42:38 +02:00
2025-07-17 10:07:55 +02:00
2025-09-16 13:55:13 +02:00
2025-09-16 13:55:08 +02:00
2023-12-13 17:42:20 +01:00
2024-11-08 16:19:08 +01:00
2024-09-04 13:13:08 +02:00
2024-12-05 10:59:33 +01:00
2025-08-13 09:44:37 +02:00
2025-08-13 09:44:38 +02:00
2025-09-22 10:17:52 +02:00
2025-09-22 10:17:53 +02:00
2025-02-07 03:34:25 +01:00
2025-07-17 10:08:03 +02:00
2025-08-13 09:44:38 +02:00
2024-09-12 11:02:51 +02:00
2025-09-16 13:55:13 +02:00
2025-09-16 13:55:15 +02:00
2024-03-26 18:22:37 -04:00
2024-07-05 09:00:23 +02:00
2025-05-08 11:55:40 +02:00
2024-01-15 18:23:42 +01:00