syzbot


WARNING in inet_csk_get_port

Status: upstream: reported C repro on 2022/05/23 15:12
Reported-by: syzbot+015d756bbd1f8b5c8f09@syzkaller.appspotmail.com
Fix commit: 593d1ebe00a4 Revert "net: Add a second bind table hashed by port and address"
Patched on: [ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-leak ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce ci-upstream-kmsan-gce-386 ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu2-riscv64]
First crash: 37d, last: 9d22h

Cause bisection: introduced by (bisect log) :
commit d5a42de8bdbe25081f07b801d8b35f4d75a791f4
Author: Joanne Koong <joannelkoong@gmail.com>
Date: Fri May 20 00:18:33 2022 +0000

  net: Add a second bind table hashed by port and address

Crash: WARNING in inet_csk_get_port (log)
Repro: C syz .config

Sample crash report:
netdevsim netdevsim0 netdevsim3: set [1, 0] type 2 family 0 port 6081 - 0
------------[ cut here ]------------
WARNING: CPU: 1 PID: 3607 at net/ipv4/inet_connection_sock.c:525 inet_csk_get_port+0x1148/0x1ad0 net/ipv4/inet_connection_sock.c:525
Modules linked in:
CPU: 1 PID: 3607 Comm: syz-executor222 Not tainted 5.18.0-syzkaller-11972-gd1dc87763f40 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:inet_csk_get_port+0x1148/0x1ad0 net/ipv4/inet_connection_sock.c:525
Code: 07 00 00 48 8b 44 24 28 4c 89 ee 48 8b 78 18 e8 2e d1 fe ff e9 0f ff ff ff e8 b4 39 a2 f9 0f 0b e9 ae fa ff ff e8 a8 39 a2 f9 <0f> 0b e9 de fa ff ff e8 9c 39 a2 f9 e8 77 57 9e 01 31 ff 89 c3 89
RSP: 0018:ffffc9000300fbf8 EFLAGS: 00010293
RAX: 0000000000000000 RBX: ffff88801b6a2000 RCX: 0000000000000000
RDX: ffff8880271f5880 RSI: ffffffff87d84aa8 RDI: ffff88801ae39368
RBP: ffff88801ae39360 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
R13: ffff88801b6a2000 R14: 0000000000000000 R15: ffff88801ae38cc0
FS:  00005555567fd300(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000180 CR3: 000000001bb71000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 inet_csk_listen_start+0x13e/0x3c0 net/ipv4/inet_connection_sock.c:1178
 inet_listen+0x231/0x640 net/ipv4/af_inet.c:228
 __sys_listen+0x17d/0x250 net/socket.c:1810
 __do_sys_listen net/socket.c:1819 [inline]
 __se_sys_listen net/socket.c:1817 [inline]
 __x64_sys_listen+0x50/0x70 net/socket.c:1817
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x46/0xb0
RIP: 0033:0x7fba38adb4d9
Code: 28 c3 e8 4a 15 00 00 66 2e 0f 1f 84 00 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 c0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffe43836ab8 EFLAGS: 00000246 ORIG_RAX: 0000000000000032
RAX: ffffffffffffffda RBX: 000000002000024a RCX: 00007fba38adb4d9
RDX: ffffffffffffffc0 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 0000000020000257 R08: 000000000000001c R09: 000000000000001c
R10: 0000000020000240 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffe43836b00 R14: 0000000000000000 R15: 0000000000000000
 </TASK>

Crashes (70):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce 2022/06/02 18:00 upstream d1dc87763f40 5783034f .config log report syz C WARNING in inet_csk_get_port
ci-upstream-net-kasan-gce 2022/06/02 12:43 net-next 7e062cda7d90 5783034f .config log report syz C WARNING in inet_csk_get_port
ci-upstream-net-kasan-gce 2022/05/21 06:17 net-next aa5334b1f968 7268fa62 .config log report syz C WARNING in inet_csk_get_port
ci-upstream-kasan-gce-smack-root 2022/06/15 23:03 upstream 979086f5e006 1719ee24 .config log report info WARNING in inet_csk_get_port
ci-upstream-kasan-gce 2022/06/15 11:54 upstream 018ab4fabddd 127d1faf .config log report info WARNING in inet_csk_get_port
ci-upstream-kasan-gce 2022/06/15 07:56 upstream 018ab4fabddd 127d1faf .config log report info WARNING in inet_csk_get_port
ci-upstream-kasan-gce-selinux-root 2022/06/13 06:09 upstream 997952851843 0d5abf15 .config log report info WARNING in inet_csk_get_port
ci-upstream-kasan-gce-root 2022/06/11 06:53 upstream 0885eacdc81f 0d5abf15 .config log report info WARNING in inet_csk_get_port
ci-upstream-kasan-gce 2022/06/07 21:11 upstream e71e60cd74df c8857892 .config log report info WARNING in inet_csk_get_port
ci-upstream-kasan-gce 2022/06/04 18:23 upstream 032dcf09e2bf c8857892 .config log report info WARNING in inet_csk_get_port
ci-upstream-kasan-gce-smack-root 2022/06/03 01:27 upstream d1dc87763f40 5783034f .config log report info WARNING in inet_csk_get_port
ci-upstream-kasan-gce 2022/06/02 22:21 upstream d1dc87763f40 5783034f .config log report info WARNING in inet_csk_get_port
ci-upstream-kasan-gce 2022/05/29 02:32 upstream 9d004b2f4fea a46af346 .config log report info WARNING in inet_csk_get_port
ci-upstream-kasan-gce-root 2022/05/27 14:19 upstream 7e284070abe5 116e7a7b .config log report info WARNING in inet_csk_get_port
ci-upstream-kasan-gce 2022/05/27 13:57 upstream 7e284070abe5 116e7a7b .config log report info WARNING in inet_csk_get_port
ci-qemu-upstream 2022/05/26 18:13 upstream babf0bb978e3 3037caa9 .config log report info WARNING in inet_csk_get_port
ci-qemu-upstream 2022/05/26 05:23 upstream d7227785e384 3037caa9 .config log report info WARNING in inet_csk_get_port
ci-upstream-kasan-gce-selinux-root 2022/05/26 03:56 upstream 7e062cda7d90 3037caa9 .config log report info WARNING in inet_csk_get_port
ci-upstream-kasan-gce 2022/05/26 03:12 upstream 7e062cda7d90 3037caa9 .config log report info WARNING in inet_csk_get_port
ci-upstream-kasan-gce-root 2022/05/26 01:39 upstream 7e062cda7d90 3037caa9 .config log report info WARNING in inet_csk_get_port
ci-upstream-kasan-gce 2022/05/26 00:59 upstream 7e062cda7d90 3037caa9 .config log report info WARNING in inet_csk_get_port
ci-upstream-kasan-gce-selinux-root 2022/05/26 00:51 upstream 7e062cda7d90 3037caa9 .config log report info WARNING in inet_csk_get_port
ci-upstream-kasan-gce-root 2022/05/25 23:55 upstream 7e062cda7d90 3037caa9 .config log report info WARNING in inet_csk_get_port
ci-qemu-upstream-386 2022/06/10 19:23 upstream 874c8ca1e60b 0d5abf15 .config log report info WARNING in inet_csk_get_port
ci-qemu-upstream-386 2022/05/26 05:56 upstream d7227785e384 3037caa9 .config log report info WARNING in inet_csk_get_port
ci-upstream-kasan-gce-386 2022/05/26 03:34 upstream 7e062cda7d90 3037caa9 .config log report info WARNING in inet_csk_get_port
ci-qemu-upstream-386 2022/05/26 03:21 upstream d7227785e384 3037caa9 .config log report info WARNING in inet_csk_get_port
ci-upstream-kasan-gce-386 2022/05/26 02:45 upstream 7e062cda7d90 3037caa9 .config log report info WARNING in inet_csk_get_port
ci-upstream-net-this-kasan-gce 2022/06/16 03:39 net d7dd6eccfbc9 1719ee24 .config log report info WARNING in inet_csk_get_port
ci-upstream-net-this-kasan-gce 2022/06/16 00:40 net d7dd6eccfbc9 1719ee24 .config log report info WARNING in inet_csk_get_port
ci-upstream-net-this-kasan-gce 2022/06/14 20:33 net 4b7a632ac4e7 127d1faf .config log report info WARNING in inet_csk_get_port
ci-upstream-net-this-kasan-gce 2022/06/11 13:28 net 6f0e1efc880a 0d5abf15 .config log report info WARNING in inet_csk_get_port
ci-upstream-net-this-kasan-gce 2022/06/11 11:43 net 6f0e1efc880a 0d5abf15 .config log report info WARNING in inet_csk_get_port
ci-upstream-net-this-kasan-gce 2022/06/05 00:21 net 58f9d52ff689 c8857892 .config log report info WARNING in inet_csk_get_port
ci-upstream-net-this-kasan-gce 2022/06/04 04:24 net 58f9d52ff689 c8857892 .config log report info WARNING in inet_csk_get_port
ci-upstream-net-this-kasan-gce 2022/06/01 16:18 net 0a375c822497 3666edfe .config log report info WARNING in inet_csk_get_port
ci-upstream-net-this-kasan-gce 2022/05/29 13:33 net 18eeb4dea65c a46af346 .config log report info WARNING in inet_csk_get_port
ci-upstream-net-this-kasan-gce 2022/05/29 12:45 net 18eeb4dea65c a46af346 .config log report info WARNING in inet_csk_get_port
ci-upstream-net-this-kasan-gce 2022/05/29 01:37 net 9bae058ab57f a46af346 .config log report info WARNING in inet_csk_get_port
ci-upstream-net-this-kasan-gce 2022/05/26 11:29 net 7e062cda7d90 3037caa9 .config log report info WARNING in inet_csk_get_port
ci-upstream-net-this-kasan-gce 2022/05/26 01:32 net 7e062cda7d90 3037caa9 .config log report info WARNING in inet_csk_get_port
ci-upstream-net-this-kasan-gce 2022/05/25 23:28 net 7e062cda7d90 3037caa9 .config log report info WARNING in inet_csk_get_port
ci-upstream-net-this-kasan-gce 2022/05/25 22:32 net 7e062cda7d90 647c0e27 .config log report info WARNING in inet_csk_get_port
ci-upstream-net-this-kasan-gce 2022/05/25 21:51 net 7e062cda7d90 647c0e27 .config log report info WARNING in inet_csk_get_port
ci-upstream-net-kasan-gce 2022/06/17 07:40 net-next 5dcb50c009c9 1719ee24 .config log report info WARNING in inet_csk_get_port
ci-upstream-net-kasan-gce 2022/06/16 12:04 net-next cfbc80e34e3a 1719ee24 .config log report info WARNING in inet_csk_get_port
ci-upstream-net-kasan-gce 2022/06/15 09:02 net-next 6ac6dc746d70 127d1faf .config log report info WARNING in inet_csk_get_port
ci-upstream-net-kasan-gce 2022/06/10 06:32 net-next 263efe85a4b6 0d5abf15 .config log report info WARNING in inet_csk_get_port
ci-upstream-net-kasan-gce 2022/06/09 18:51 net-next 263efe85a4b6 0d5abf15 .config log report info WARNING in inet_csk_get_port
ci-upstream-net-kasan-gce 2022/06/08 08:41 net-next ba36c5b7ac93 b2706118 .config log report info WARNING in inet_csk_get_port
ci-upstream-net-kasan-gce 2022/06/07 17:30 net-next 12de1ebd2ae3 c8857892 .config log report info WARNING in inet_csk_get_port
ci-upstream-net-kasan-gce 2022/06/07 08:46 net-next 58f9d52ff689 c8857892 .config log report info WARNING in inet_csk_get_port
ci-upstream-net-kasan-gce 2022/06/04 14:28 net-next 58f9d52ff689 c8857892 .config log report info WARNING in inet_csk_get_port
ci-upstream-net-kasan-gce 2022/06/03 12:10 net-next 58f9d52ff689 02dddea8 .config log report info WARNING in inet_csk_get_port
ci-upstream-net-kasan-gce 2022/06/03 00:21 net-next 7e062cda7d90 5783034f .config log report info WARNING in inet_csk_get_port
ci-upstream-net-kasan-gce 2022/06/02 16:24 net-next 7e062cda7d90 5783034f .config log report info WARNING in inet_csk_get_port
ci-upstream-net-kasan-gce 2022/06/01 03:03 net-next 7e062cda7d90 3666edfe .config log report info WARNING in inet_csk_get_port
ci-upstream-net-kasan-gce 2022/05/31 19:31 net-next 7e062cda7d90 af70c3a9 .config log report info WARNING in inet_csk_get_port
ci-upstream-net-kasan-gce 2022/05/30 10:52 net-next 7e062cda7d90 a46af346 .config log report info WARNING in inet_csk_get_port
ci-upstream-net-kasan-gce 2022/05/27 12:44 net-next 7e062cda7d90 116e7a7b .config log report info WARNING in inet_csk_get_port
ci-upstream-net-kasan-gce 2022/05/26 03:27 net-next 7e062cda7d90 3037caa9 .config log report info WARNING in inet_csk_get_port
ci-upstream-net-kasan-gce 2022/05/23 21:10 net-next 1e39b27bd9d1 4c7657cb .config log report info WARNING in inet_csk_get_port
ci-upstream-net-kasan-gce 2022/05/22 16:36 net-next aa5334b1f968 7268fa62 .config log report info WARNING in inet_csk_get_port
ci-upstream-net-kasan-gce 2022/05/21 15:53 net-next aa5334b1f968 7268fa62 .config log report info WARNING in inet_csk_get_port
ci-upstream-net-kasan-gce 2022/05/21 05:07 net-next aa5334b1f968 7268fa62 .config log report info WARNING in inet_csk_get_port
ci-upstream-net-kasan-gce 2022/05/21 04:03 net-next aa5334b1f968 7268fa62 .config log report info WARNING in inet_csk_get_port
ci-upstream-linux-next-kasan-gce-root 2022/06/08 19:29 linux-next 03c312cc5f47 b2706118 .config log report info WARNING in inet_csk_get_port
ci-upstream-linux-next-kasan-gce-root 2022/05/29 16:30 linux-next d3fde8ff50ab a46af346 .config log report info WARNING in inet_csk_get_port
ci-upstream-linux-next-kasan-gce-root 2022/05/23 21:14 linux-next cc63e8e92cb8 4c7657cb .config log report info WARNING in inet_csk_get_port