syzbot


BUG: corrupted list in sctp_destroy_sock

Status: upstream: reported C repro on 2025/11/06 22:30
Subsystems: sctp
[Documentation on labels]
Reported-by: syzbot+ba535cb417f106327741@syzkaller.appspotmail.com
Fix commit: sctp: Don't inherit do_auto_asconf in sctp_clone_sock().
Patched on: [ci-qemu-gce-upstream-auto ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-qemu2-riscv64 ci-snapshot-upstream-root ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root 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-386-root ci-upstream-kmsan-gce-root ci-upstream-linux-next-kasan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci-upstream-rust-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu-native-arm64-kvm]
First crash: 56d, last: 46d
Cause bisection: introduced by (bisect log) :
commit 16942cf4d3e31b6246b7d000dd823f7b0b38bf8c
Author: Kuniyuki Iwashima <kuniyu@google.com>
Date: Thu Oct 23 23:16:54 2025 +0000

  sctp: Use sk_clone() in sctp_accept().

Crash: BUG: corrupted list in sctp_destroy_sock (log)
Repro: C syz .config
  
Discussions (2)
Title Replies (including bot) Last reply
[PATCH v1 net-next] sctp: Don't inherit do_auto_asconf in sctp_clone_sock(). 3 (3) 2025/11/11 00:30
[syzbot] [sctp?] BUG: corrupted list in sctp_destroy_sock 1 (3) 2025/11/07 02:11
Last patch testing requests (2)
Created Duration User Patch Repo Result
2025/11/07 00:35 1h06m hdanton@sina.com patch net-next OK log
2025/11/06 18:38 22m kuniyu@google.com patch net-next OK log

Sample crash report:
 slab net_namespace start ffff88803347c900 pointer offset 4344 size 9088
list_del corruption. prev->next should be ffff8880799e9148, but was ffff8880799e8808. (prev=ffff88803347d9f8)
------------[ cut here ]------------
kernel BUG at lib/list_debug.c:64!
Oops: invalid opcode: 0000 [#1] SMP KASAN PTI
CPU: 0 UID: 0 PID: 6008 Comm: syz.0.17 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
RIP: 0010:__list_del_entry_valid_or_report+0x15a/0x190 lib/list_debug.c:62
Code: e8 7b 26 71 fd 43 80 3c 2c 00 74 08 4c 89 ff e8 7c ee 92 fd 49 8b 17 48 c7 c7 80 0a bf 8b 48 89 de 4c 89 f9 e8 07 c6 94 fc 90 <0f> 0b 4c 89 f7 e8 4c 26 71 fd 43 80 3c 2c 00 74 08 4c 89 ff e8 4d
RSP: 0018:ffffc90003067ad8 EFLAGS: 00010246
RAX: 000000000000006d RBX: ffff8880799e9148 RCX: b056988859ee6e00
RDX: 0000000000000000 RSI: 0000000000000202 RDI: 0000000000000000
RBP: dffffc0000000000 R08: ffffc90003067807 R09: 1ffff9200060cf00
R10: dffffc0000000000 R11: fffff5200060cf01 R12: 1ffff1100668fb3f
R13: dffffc0000000000 R14: ffff88803347d9f8 R15: ffff88803347d9f8
FS:  00005555823e5500(0000) GS:ffff88812613e000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000200000000480 CR3: 00000000741ce000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 __list_del_entry_valid include/linux/list.h:132 [inline]
 __list_del_entry include/linux/list.h:223 [inline]
 list_del include/linux/list.h:237 [inline]
 sctp_destroy_sock+0xb4/0x370 net/sctp/socket.c:5163
 sk_common_release+0x75/0x310 net/core/sock.c:3961
 sctp_close+0x77e/0x900 net/sctp/socket.c:1550
 inet_release+0x144/0x190 net/ipv4/af_inet.c:437
 __sock_release net/socket.c:662 [inline]
 sock_close+0xc3/0x240 net/socket.c:1455
 __fput+0x44c/0xa70 fs/file_table.c:468
 task_work_run+0x1d4/0x260 kernel/task_work.c:227
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop+0xe9/0x130 kernel/entry/common.c:43
 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline]
 syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline]
 do_syscall_64+0x2bd/0xfa0 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f3890b8efc9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd5dc3b8a8 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4
RAX: 0000000000000000 RBX: 0000000000015724 RCX: 00007f3890b8efc9
RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000001 R09: 000000055dc3bb9f
R10: 0000001b2ec20000 R11: 0000000000000246 R12: 00007f3890de5fac
R13: 00007f3890de5fa0 R14: ffffffffffffffff R15: 0000000000000003
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__list_del_entry_valid_or_report+0x15a/0x190 lib/list_debug.c:62
Code: e8 7b 26 71 fd 43 80 3c 2c 00 74 08 4c 89 ff e8 7c ee 92 fd 49 8b 17 48 c7 c7 80 0a bf 8b 48 89 de 4c 89 f9 e8 07 c6 94 fc 90 <0f> 0b 4c 89 f7 e8 4c 26 71 fd 43 80 3c 2c 00 74 08 4c 89 ff e8 4d
RSP: 0018:ffffc90003067ad8 EFLAGS: 00010246
RAX: 000000000000006d RBX: ffff8880799e9148 RCX: b056988859ee6e00
RDX: 0000000000000000 RSI: 0000000000000202 RDI: 0000000000000000
RBP: dffffc0000000000 R08: ffffc90003067807 R09: 1ffff9200060cf00
R10: dffffc0000000000 R11: fffff5200060cf01 R12: 1ffff1100668fb3f
R13: dffffc0000000000 R14: ffff88803347d9f8 R15: ffff88803347d9f8
FS:  00005555823e5500(0000) GS:ffff88812613e000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000200000000480 CR3: 00000000741ce000 CR4: 00000000003526f0

Crashes (10):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/11/01 03:54 net-next 1a2352ad82b5 2c50b6a9 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce BUG: corrupted list in sctp_destroy_sock
2025/11/01 02:59 net-next 1a2352ad82b5 2c50b6a9 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce BUG: corrupted list in sctp_destroy_sock
2025/11/01 07:14 linux-next 98bd8b16ae57 2c50b6a9 .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci-upstream-rust-kasan-gce BUG: corrupted list in sctp_destroy_sock
2025/11/10 20:59 net-next a0c3aefb08cd 4e1406b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce BUG: corrupted list in sctp_destroy_sock
2025/11/09 08:45 net-next a0c3aefb08cd 4e1406b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce BUG: corrupted list in sctp_destroy_sock
2025/11/07 22:32 net-next c6934c4e049c 4e1406b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce BUG: corrupted list in sctp_destroy_sock
2025/11/07 14:40 net-next 6fc33710cd6c 4e1406b4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce BUG: corrupted list in sctp_destroy_sock
2025/11/03 18:20 net-next 01cc760632b8 2c50b6a9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce BUG: corrupted list in sctp_destroy_sock
2025/11/03 09:44 net-next 01cc760632b8 2c50b6a9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce BUG: corrupted list in sctp_destroy_sock
2025/11/01 01:57 net-next 1a2352ad82b5 2c50b6a9 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-net-kasan-gce BUG: corrupted list in sctp_destroy_sock
* Struck through repros no longer work on HEAD.