syzbot


WARNING in inet_csk_destroy_sock (2)

Status: fixed on 2023/02/24 13:50
Subsystems: io-uring net
[Documentation on labels]
Fix commit: e0833d1fedb0 dccp/tcp: Fixup bhash2 bucket when connect() fails.
First crash: 563d, last: 476d
Cause bisection: introduced by (bisect log) :
commit 28044fc1d4953b07acec0da4d2fc4784c57ea6fb
Author: Joanne Koong <joannelkoong@gmail.com>
Date: Mon Aug 22 18:10:21 2022 +0000

  net: Add a bhash2 table hashed by port and address

Crash: WARNING in inet_csk_destroy_sock (log)
Repro: C syz .config
  
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING in inet_csk_destroy_sock (3) net 1 337d 337d 22/26 fixed on 2023/05/27 00:56
upstream WARNING in inet_csk_destroy_sock (5) net 1 96d 96d 26/26 fixed on 2024/03/26 17:39
upstream WARNING in inet_csk_destroy_sock (4) net 2 195d 261d 0/26 closed as invalid on 2023/12/14 11:36
upstream WARNING in inet_csk_destroy_sock net 1 681d 681d 0/26 auto-closed as invalid on 2022/09/14 07:34

Sample crash report:
------------[ cut here ]------------
WARNING: CPU: 1 PID: 4777 at net/ipv4/inet_connection_sock.c:1155 inet_csk_destroy_sock+0x2dd/0x440 net/ipv4/inet_connection_sock.c:1155
Modules linked in:
CPU: 1 PID: 4777 Comm: syz-executor385 Not tainted 6.1.0-rc6-syzkaller-00012-g4312098baf37 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:inet_csk_destroy_sock+0x2dd/0x440 net/ipv4/inet_connection_sock.c:1155
Code: 41 5c 41 5d 41 5e e9 92 da 46 f9 e8 8d da 46 f9 48 89 ef e8 b5 04 72 ff 5b 5d 41 5c 41 5d 41 5e e9 78 da 46 f9 e8 73 da 46 f9 <0f> 0b e9 66 fe ff ff e8 67 da 46 f9 4c 89 e7 be 03 00 00 00 e8 da
RSP: 0018:ffffc90004b47b88 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 000000000000ee14 RCX: 0000000000000000
RDX: ffff888079081d40 RSI: ffffffff88393f9d RDI: ffff888028a5a560
RBP: ffff888028a59ec0 R08: 0000000000000003 R09: 0000000000000000
R10: 000000000000ee14 R11: 0000000000000000 R12: ffff888028a59f20
R13: ffff888028a59f58 R14: ffff888028a5a078 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f885afc82d0 CR3: 000000000c28e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 dccp_close+0xa41/0xd60 net/dccp/proto.c:1060
 inet_release+0x132/0x270 net/ipv4/af_inet.c:428
 __sock_release+0xcd/0x280 net/socket.c:650
 sock_close+0x1c/0x20 net/socket.c:1365
 __fput+0x27c/0xa90 fs/file_table.c:320
 task_work_run+0x16f/0x270 kernel/task_work.c:179
 exit_task_work include/linux/task_work.h:38 [inline]
 do_exit+0xb3d/0x2a30 kernel/exit.c:820
 do_group_exit+0xd4/0x2a0 kernel/exit.c:950
 __do_sys_exit_group kernel/exit.c:961 [inline]
 __se_sys_exit_group kernel/exit.c:959 [inline]
 __x64_sys_exit_group+0x3e/0x50 kernel/exit.c:959
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x39/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f885af530a9
Code: Unable to access opcode bytes at 0x7f885af5307f.
RSP: 002b:00007ffc31088818 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 00007f885afc7430 RCX: 00007f885af530a9
RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffffffffffffffc0 R09: 0000000000000004
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f885afc7430
R13: 0000000000000001 R14: 0000000000000000 R15: 0000000000000001
 </TASK>

Crashes (8):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2022/11/24 09:32 upstream 4312098baf37 12c66417 .config strace log report syz C ci-upstream-kasan-gce WARNING in inet_csk_destroy_sock
2023/01/06 16:56 linux-next cc3c08b41a9c 1dac8c7a .config strace log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING in inet_csk_destroy_sock
2022/11/24 05:20 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 65762d97e6fa 12c66417 .config console log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in inet_csk_destroy_sock
2022/12/04 17:28 upstream c2bf05db6c78 e080de16 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce WARNING in inet_csk_destroy_sock
2022/10/12 02:08 upstream 55be6084c8e0 1353c374 .config console log report info [disk image] [vmlinux] ci-upstream-kasan-gce WARNING in inet_csk_destroy_sock
2022/10/13 01:50 upstream 55be6084c8e0 89b5a509 .config console log report info ci-upstream-kasan-gce-386 WARNING in inet_csk_destroy_sock
2022/11/24 03:19 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 65762d97e6fa 12c66417 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in inet_csk_destroy_sock
2022/11/09 17:27 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 56751c56c2a2 5fa28208 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 WARNING in inet_csk_destroy_sock
* Struck through repros no longer work on HEAD.