syzbot


WARNING: refcount bug in sctp_transport_put (4)

Status: moderation: reported on 2024/10/11 10:12
Subsystems: sctp
[Documentation on labels]
Reported-by: syzbot+7fcae8dcf3a61ff8e63c@syzkaller.appspotmail.com
First crash: 8d14h, last: 8d14h
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING: refcount bug in sctp_transport_put (3) sctp 11 1017d 1323d 0/28 auto-closed as invalid on 2022/05/02 09:19
upstream WARNING: refcount bug in sctp_transport_put (2) sctp 2 1819d 1837d 0/28 auto-closed as invalid on 2020/02/20 05:23
upstream WARNING: refcount bug in sctp_transport_put sctp 5 2191d 2254d 0/28 auto-closed as invalid on 2019/04/14 11:41
linux-5.15 WARNING: refcount bug in sctp_transport_put 1 357d 357d 0/3 auto-obsoleted due to no activity on 2024/02/01 01:35

Sample crash report:
------------[ cut here ]------------
refcount_t: underflow; use-after-free.
WARNING: CPU: 0 PID: 0 at lib/refcount.c:28 refcount_warn_saturate+0x14a/0x210 lib/refcount.c:28
Modules linked in:
CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.12.0-rc1-syzkaller-00381-g2a130b7e1fcd #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:refcount_warn_saturate+0x14a/0x210 lib/refcount.c:28
Code: ff 89 de e8 d8 15 fe fc 84 db 0f 85 66 ff ff ff e8 eb 13 fe fc c6 05 22 8c b8 0b 01 90 48 c7 c7 c0 4d d1 8b e8 97 02 bf fc 90 <0f> 0b 90 90 e9 43 ff ff ff e8 c8 13 fe fc 0f b6 1d fd 8b b8 0b 31
RSP: 0000:ffffc90000007c38 EFLAGS: 00010286
RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff814e71a9
RDX: ffffffff8de957c0 RSI: ffffffff814e71b6 RDI: 0000000000000001
RBP: ffff888063aa9020 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000001 R12: ffff888063aa9020
R13: 0000000000000001 R14: 0000000000000102 R15: 000000000003dbcc
FS:  0000000000000000(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b2c1eeff8 CR3: 0000000057de0000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 __refcount_sub_and_test include/linux/refcount.h:275 [inline]
 __refcount_dec_and_test include/linux/refcount.h:307 [inline]
 refcount_dec_and_test include/linux/refcount.h:325 [inline]
 sctp_transport_put+0x12a/0x170 net/sctp/transport.c:483
 call_timer_fn+0x1a0/0x610 kernel/time/timer.c:1794
 expire_timers kernel/time/timer.c:1845 [inline]
 __run_timers+0x6e8/0x930 kernel/time/timer.c:2419
 __run_timer_base kernel/time/timer.c:2430 [inline]
 __run_timer_base kernel/time/timer.c:2423 [inline]
 run_timer_base+0x111/0x190 kernel/time/timer.c:2439
 run_timer_softirq+0x1a/0x40 kernel/time/timer.c:2449
 handle_softirqs+0x213/0x8f0 kernel/softirq.c:554
 __do_softirq kernel/softirq.c:588 [inline]
 invoke_softirq kernel/softirq.c:428 [inline]
 __irq_exit_rcu kernel/softirq.c:637 [inline]
 irq_exit_rcu+0xbb/0x120 kernel/softirq.c:649
 instr_sysvec_call_function_single arch/x86/kernel/smp.c:266 [inline]
 sysvec_call_function_single+0xa4/0xc0 arch/x86/kernel/smp.c:266
 </IRQ>
 <TASK>
 asm_sysvec_call_function_single+0x1a/0x20 arch/x86/include/asm/idtentry.h:709
RIP: 0010:sched_core_balance+0x9f/0xc40 kernel/sched/core.c:6339
Code: 40 83 1b 8e e8 32 48 0c 00 e8 dd 52 c3 09 5e 85 c0 0f 85 74 08 00 00 4c 89 e7 e8 6c 52 fe ff e8 67 be 36 00 fb 48 63 44 24 0c <48> c7 c3 80 ee 03 00 48 83 f8 07 48 89 44 24 10 0f 87 27 0b 00 00
RSP: 0000:ffffffff8de07b98 EFLAGS: 00000206
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 1ffffffff20bde99
RDX: 0000000000000000 RSI: ffffffff8b6cd040 RDI: ffffffff8bd1a0c0
RBP: ffffffff8de07e08 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff905f370f R11: 0000000000000000 R12: ffff8880b863ee80
R13: ffff8880b86288f0 R14: ffffffff815e6df0 R15: ffff8880b863ee80
 do_balance_callbacks kernel/sched/core.c:4967 [inline]
 __balance_callbacks kernel/sched/core.c:5021 [inline]
 __schedule+0x3b2a/0x5750 kernel/sched/core.c:6678
 schedule_idle+0x5c/0x90 kernel/sched/core.c:6793
 do_idle+0x287/0x3f0 kernel/sched/idle.c:354
 cpu_startup_entry+0x4f/0x60 kernel/sched/idle.c:424
 rest_init+0x16b/0x2b0 init/main.c:747
 start_kernel+0x3e4/0x4d0 init/main.c:1105
 x86_64_start_reservations+0x18/0x30 arch/x86/kernel/head64.c:507
 x86_64_start_kernel+0xb2/0xc0 arch/x86/kernel/head64.c:488
 common_startup_64+0x13e/0x148
 </TASK>
----------------
Code disassembly (best guess):
   0:	40 83 1b 8e          	rex sbbl $0xffffff8e,(%rbx)
   4:	e8 32 48 0c 00       	call   0xc483b
   9:	e8 dd 52 c3 09       	call   0x9c352eb
   e:	5e                   	pop    %rsi
   f:	85 c0                	test   %eax,%eax
  11:	0f 85 74 08 00 00    	jne    0x88b
  17:	4c 89 e7             	mov    %r12,%rdi
  1a:	e8 6c 52 fe ff       	call   0xfffe528b
  1f:	e8 67 be 36 00       	call   0x36be8b
  24:	fb                   	sti
  25:	48 63 44 24 0c       	movslq 0xc(%rsp),%rax
* 2a:	48 c7 c3 80 ee 03 00 	mov    $0x3ee80,%rbx <-- trapping instruction
  31:	48 83 f8 07          	cmp    $0x7,%rax
  35:	48 89 44 24 10       	mov    %rax,0x10(%rsp)
  3a:	0f 87 27 0b 00 00    	ja     0xb67

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/07 10:08 upstream 2a130b7e1fcd d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root WARNING: refcount bug in sctp_transport_put
* Struck through repros no longer work on HEAD.