syzbot


WARNING: refcount bug in sctp_transport_put (2)

Status: auto-closed as invalid on 2020/02/20 05:23
Subsystems: sctp
[Documentation on labels]
Reported-by: syzbot+6cad8d7f75ebce50a44d@syzkaller.appspotmail.com
First crash: 1658d, last: 1640d
Discussions (1)
Title Replies (including bot) Last reply
WARNING: refcount bug in sctp_transport_put (2) 0 (1) 2019/10/05 07:16
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING: refcount bug in sctp_transport_put (3) sctp 11 838d 1144d 0/26 auto-closed as invalid on 2022/05/02 09:19
upstream WARNING: refcount bug in sctp_transport_put sctp 5 2012d 2075d 0/26 auto-closed as invalid on 2019/04/14 11:41
linux-5.15 WARNING: refcount bug in sctp_transport_put 1 178d 178d 0/3 auto-obsoleted due to no activity on 2024/02/01 01:35

Sample crash report:
protocol 88fb is buggy, dev hsr_slave_0
protocol 88fb is buggy, dev hsr_slave_1
------------[ cut here ]------------
refcount_t: underflow; use-after-free.
WARNING: CPU: 0 PID: 11447 at lib/refcount.c:190 refcount_sub_and_test_checked lib/refcount.c:190 [inline]
WARNING: CPU: 0 PID: 11447 at lib/refcount.c:190 refcount_sub_and_test_checked+0x1d0/0x200 lib/refcount.c:180
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 11447 Comm: syz-executor.5 Not tainted 5.4.0-rc4+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x172/0x1f0 lib/dump_stack.c:113
 panic+0x2e3/0x75c kernel/panic.c:221
 __warn.cold+0x2f/0x35 kernel/panic.c:582
 report_bug+0x289/0x300 lib/bug.c:195
 fixup_bug arch/x86/kernel/traps.c:179 [inline]
 fixup_bug arch/x86/kernel/traps.c:174 [inline]
 do_error_trap+0x11b/0x200 arch/x86/kernel/traps.c:272
 do_invalid_op+0x37/0x50 arch/x86/kernel/traps.c:291
 invalid_op+0x23/0x30 arch/x86/entry/entry_64.S:1028
RIP: 0010:refcount_sub_and_test_checked lib/refcount.c:190 [inline]
RIP: 0010:refcount_sub_and_test_checked+0x1d0/0x200 lib/refcount.c:180
Code: 1d bf 3a 7e 06 31 ff 89 de e8 9c be 2e fe 84 db 75 94 e8 53 bd 2e fe 48 c7 c7 c0 ad e6 87 c6 05 9f 3a 7e 06 01 e8 c8 ff ff fd <0f> 0b e9 75 ff ff ff e8 34 bd 2e fe e9 6e ff ff ff 48 89 df e8 c7
RSP: 0018:ffff8880ae809bc8 EFLAGS: 00010282
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000100 RSI: ffffffff815cb646 RDI: ffffed1015d0136b
RBP: ffff8880ae809c60 R08: ffff888058762680 R09: ffffed1015d04101
R10: ffffed1015d04100 R11: ffff8880ae820807 R12: 00000000ffffffff
R13: 0000000000000001 R14: ffff8880ae809c38 R15: 0000000000000000
 refcount_dec_and_test_checked+0x1b/0x20 lib/refcount.c:220
 sctp_transport_put+0x1e/0x130 net/sctp/transport.c:325
 sctp_generate_heartbeat_event+0x2cf/0x450 net/sctp/sm_sideeffect.c:401
 call_timer_fn+0x1ac/0x780 kernel/time/timer.c:1404
 expire_timers kernel/time/timer.c:1449 [inline]
 __run_timers kernel/time/timer.c:1773 [inline]
 __run_timers kernel/time/timer.c:1740 [inline]
 run_timer_softirq+0x6c3/0x1790 kernel/time/timer.c:1786
 __do_softirq+0x262/0x98c kernel/softirq.c:292
 invoke_softirq kernel/softirq.c:373 [inline]
 irq_exit+0x19b/0x1e0 kernel/softirq.c:413
 exiting_irq arch/x86/include/asm/apic.h:536 [inline]
 smp_apic_timer_interrupt+0x1a3/0x610 arch/x86/kernel/apic/apic.c:1137
 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:830
 </IRQ>
RIP: 0010:inet6_sk include/linux/ipv6.h:338 [inline]
RIP: 0010:ip6_sk_dst_check net/ipv6/ip6_output.c:957 [inline]
RIP: 0010:ip6_sk_dst_lookup_flow+0x186/0xb90 net/ipv6/ip6_output.c:1187
Code: e2 07 38 d0 7f 08 84 c0 0f 85 06 08 00 00 41 0f b6 4d 12 be 01 00 00 00 31 ff 31 db d3 e6 81 e6 bf ef ff ff 89 b5 70 ff ff ff <e8> 55 f4 2a fb 8b b5 70 ff ff ff 85 f6 74 2e e8 c6 f2 2a fb 49 8d
RSP: 0018:ffff88805cb27618 EFLAGS: 00000202 ORIG_RAX: ffffffffffffff13
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000001
RDX: 0000000000000002 RSI: 0000000000000002 RDI: 0000000000000000
RBP: ffff88805cb276d0 R08: 0000000000000001 R09: ffff888058762f10
R10: fffffbfff138ce90 R11: ffffffff89c67487 R12: ffff88809707fb80
R13: ffff888096acd0c0 R14: ffff88805cb27840 R15: ffff88805cb276a8
 udpv6_sendmsg+0x17b4/0x2990 net/ipv6/udp.c:1446
 inet6_sendmsg+0x9e/0xe0 net/ipv6/af_inet6.c:576
 sock_sendmsg_nosec net/socket.c:637 [inline]
 sock_sendmsg+0xd7/0x130 net/socket.c:657
 ___sys_sendmsg+0x3e2/0x920 net/socket.c:2311
 __sys_sendmmsg+0x1bf/0x4d0 net/socket.c:2413
 __do_sys_sendmmsg net/socket.c:2442 [inline]
 __se_sys_sendmmsg net/socket.c:2439 [inline]
 __x64_sys_sendmmsg+0x9d/0x100 net/socket.c:2439
 do_syscall_64+0xfa/0x760 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x459ef9
Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f5e01b89c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000133
RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 0000000000459ef9
RDX: 00000000000003c6 RSI: 00000000200092c0 RDI: 0000000000000004
RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000
R10: 000000001c004010 R11: 0000000000000246 R12: 00007f5e01b8a6d4
R13: 00000000004c7ab9 R14: 00000000004dd908 R15: 00000000ffffffff
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/10/23 05:22 upstream 3b7c59a1950c d0686497 .config console log report ci-upstream-kasan-gce-selinux-root
2019/10/05 00:25 linux-next 311ef88adfa3 f3f7d9c8 .config console log report ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.