syzbot


WARNING: refcount bug in sock_wfree

Status: closed as invalid on 2019/04/09 10:51
Subsystems: sctp
[Documentation on labels]
Reported-by: syzbot+98a809ad0f54884bde26@syzkaller.appspotmail.com
First crash: 2256d, last: 1975d
Cause bisection: failed (error log, bisect log)
  
Discussions (1)
Title Replies (including bot) Last reply
WARNING: refcount bug in sock_wfree 4 (5) 2019/04/09 10:51
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 WARNING: refcount bug in sock_wfree C done done 3 1496d 1617d 1/1 fixed on 2020/04/20 22:55
upstream WARNING: refcount bug in sock_wfree (2) C done 606 1483d 1656d 1/26 closed as invalid on 2020/06/27 23:36
linux-4.19 WARNING: refcount bug in sock_wfree C done done 1 1497d 1617d 1/1 fixed on 2020/04/20 22:55

Sample crash report:
IPv6: ADDRCONF(NETDEV_UP): veth0: link is not ready
IPv6: ADDRCONF(NETDEV_UP): bond0: link is not ready
8021q: adding VLAN 0 to HW filter on device bond0
------------[ cut here ]------------
refcount_t: underflow; use-after-free.
WARNING: CPU: 0 PID: 5416 at lib/refcount.c:187 refcount_sub_and_test+0x167/0x1b0 lib/refcount.c:187
IPv6: ADDRCONF(NETDEV_UP): veth1: link is not ready
Kernel panic - not syncing: panic_on_warn set ...

CPU: 0 PID: 5416 Comm: syz-executor6 Not tainted 4.16.0-rc4+ #345
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
IPv6: ADDRCONF(NETDEV_CHANGE): veth1: link becomes ready
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x194/0x24d lib/dump_stack.c:53
IPv6: ADDRCONF(NETDEV_CHANGE): veth0: link becomes ready
 panic+0x1e4/0x41c kernel/panic.c:183
IPv6: ADDRCONF(NETDEV_UP): veth0: link is not ready
 __warn+0x1dc/0x200 kernel/panic.c:547
 report_bug+0x211/0x2d0 lib/bug.c:184
 fixup_bug.part.11+0x37/0x80 arch/x86/kernel/traps.c:178
 fixup_bug arch/x86/kernel/traps.c:247 [inline]
 do_error_trap+0x2d7/0x3e0 arch/x86/kernel/traps.c:296
IPv6: ADDRCONF(NETDEV_UP): bond0: link is not ready
8021q: adding VLAN 0 to HW filter on device bond0
 do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:315
 invalid_op+0x1b/0x40 arch/x86/entry/entry_64.S:986
RIP: 0010:refcount_sub_and_test+0x167/0x1b0 lib/refcount.c:187
RSP: 0018:ffff8801b472e490 EFLAGS: 00010282
RAX: dffffc0000000008 RBX: 0000000000000401 RCX: ffffffff815abb5e
RDX: 0000000000000000 RSI: 1ffff100368e5c42 RDI: 1ffff100368e5c17
IPv6: ADDRCONF(NETDEV_UP): veth1: link is not ready
RBP: ffff8801b472e520 R08: 1ffff100368e5bd9 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 1ffff100368e5c93
R13: 00000000ffffff01 R14: 0000000000000500 R15: ffff8801b4e619fc
IPv6: ADDRCONF(NETDEV_CHANGE): veth1: link becomes ready
IPv6: ADDRCONF(NETDEV_CHANGE): veth0: link becomes ready
 sock_wfree+0xa6/0x140 net/core/sock.c:1819
IPv6: ADDRCONF(NETDEV_UP): veth1: link is not ready
 sctp_wfree+0x2eb/0x670 net/sctp/socket.c:8065
IPv6: ADDRCONF(NETDEV_CHANGE): veth1: link becomes ready
 skb_release_head_state+0x124/0x260 net/core/skbuff.c:612
 skb_release_all+0x15/0x60 net/core/skbuff.c:625
 __kfree_skb net/core/skbuff.c:641 [inline]
 consume_skb+0x153/0x490 net/core/skbuff.c:701
IPv6: ADDRCONF(NETDEV_CHANGE): veth0: link becomes ready
IPv6: ADDRCONF(NETDEV_UP): veth0: link is not ready
 sctp_chunk_destroy net/sctp/sm_make_chunk.c:1450 [inline]
 sctp_chunk_put+0x29c/0x420 net/sctp/sm_make_chunk.c:1477
 sctp_chunk_free+0x53/0x60 net/sctp/sm_make_chunk.c:1464
 __sctp_outq_teardown+0x244/0x1230 net/sctp/outqueue.c:234
IPv6: ADDRCONF(NETDEV_UP): veth1: link is not ready
IPv6: ADDRCONF(NETDEV_CHANGE): veth1: link becomes ready
IPv6: ADDRCONF(NETDEV_CHANGE): veth0: link becomes ready
IPv6: ADDRCONF(NETDEV_UP): veth0: link is not ready
 sctp_outq_free+0x15/0x20 net/sctp/outqueue.c:291
 sctp_association_free+0x2d0/0x930 net/sctp/associola.c:356
 sctp_cmd_delete_tcb net/sctp/sm_sideeffect.c:939 [inline]
 sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1343 [inline]
 sctp_side_effects net/sctp/sm_sideeffect.c:1210 [inline]
 sctp_do_sm+0x32e3/0x6ed0 net/sctp/sm_sideeffect.c:1181
IPv6: ADDRCONF(NETDEV_UP): bond0: link is not ready
8021q: adding VLAN 0 to HW filter on device bond0
IPv6: ADDRCONF(NETDEV_UP): veth1: link is not ready
IPv6: ADDRCONF(NETDEV_CHANGE): veth1: link becomes ready
IPv6: ADDRCONF(NETDEV_CHANGE): veth0: link becomes ready
 sctp_primitive_ABORT+0xa0/0xd0 net/sctp/primitive.c:119
 sctp_close+0x266/0x9a0 net/sctp/socket.c:1539
IPv6: ADDRCONF(NETDEV_UP): veth0: link is not ready
 inet_release+0xed/0x1c0 net/ipv4/af_inet.c:427
 sock_release+0x8d/0x1e0 net/socket.c:595
 sock_close+0x16/0x20 net/socket.c:1149
 __fput+0x327/0x7e0 fs/file_table.c:209
IPv6: ADDRCONF(NETDEV_UP): veth1: link is not ready
 ____fput+0x15/0x20 fs/file_table.c:243
IPv6: ADDRCONF(NETDEV_CHANGE): veth1: link becomes ready
 task_work_run+0x199/0x270 kernel/task_work.c:113
IPv6: ADDRCONF(NETDEV_CHANGE): veth0: link becomes ready
 exit_task_work include/linux/task_work.h:22 [inline]
 do_exit+0x9bb/0x1ad0 kernel/exit.c:865
IPv6: ADDRCONF(NETDEV_UP): veth0: link is not ready
IPv6: ADDRCONF(NETDEV_UP): veth1: link is not ready
 do_group_exit+0x149/0x400 kernel/exit.c:968
IPv6: ADDRCONF(NETDEV_CHANGE): veth1: link becomes ready
IPv6: ADDRCONF(NETDEV_CHANGE): veth0: link becomes ready
 get_signal+0x73a/0x16d0 kernel/signal.c:2469
 do_signal+0x90/0x1e90 arch/x86/kernel/signal.c:809
 exit_to_usermode_loop+0x258/0x2f0 arch/x86/entry/common.c:162
 prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:265 [inline]
 do_syscall_64+0x6ec/0x940 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x453e69
RSP: 002b:00007f3c70044ce8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 000000000072bec8 RCX: 0000000000453e69
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000000072bec8
RBP: 000000000072bec8 R08: 0000000000000000 R09: 000000000072bea0
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000a3e8ef R14: 00007f3c700459c0 R15: 0000000000000000
Dumping ftrace buffer:
   (ftrace buffer empty)
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (24):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/03/08 09:08 upstream 851710a80961 d50edb7e .config console log report syz ci-upstream-kasan-gce
2018/02/20 18:45 upstream 79c0ef3e85c0 5abac192 .config console log report syz ci-upstream-kasan-gce
2018/05/29 03:58 upstream 786b71f5b754 f48c20b8 .config console log report syz ci-upstream-kasan-gce-386
2018/02/25 07:25 upstream 3664ce2d9309 5c1e0207 .config console log report syz ci-upstream-kasan-gce-386
2018/11/28 13:57 upstream ef78e5ec9214 4b6d14f2 .config console log report ci-upstream-kasan-gce-smack-root
2018/03/08 08:22 upstream 851710a80961 d50edb7e .config console log report ci-upstream-kasan-gce
2018/02/20 17:55 upstream 79c0ef3e85c0 5abac192 .config console log report ci-upstream-kasan-gce
2018/11/26 07:56 upstream d6d460b89378 3d3ec907 .config console log report ci-upstream-kasan-gce-386
2018/05/29 03:39 upstream 786b71f5b754 f48c20b8 .config console log report ci-upstream-kasan-gce-386
2018/02/25 06:06 upstream 3664ce2d9309 5c1e0207 .config console log report ci-upstream-kasan-gce-386
2018/11/25 19:40 net-old aba36930a35e 3d3ec907 .config console log report ci-upstream-net-this-kasan-gce
2018/11/24 21:20 net-old 07093b764769 ecc7c870 .config console log report ci-upstream-net-this-kasan-gce
2018/11/22 06:24 net-old b5dd186d10ba 9db828b5 .config console log report ci-upstream-net-this-kasan-gce
2018/11/22 04:25 net-old b5dd186d10ba 9db828b5 .config console log report ci-upstream-net-this-kasan-gce
2018/11/22 02:00 net-old b5dd186d10ba 9db828b5 .config console log report ci-upstream-net-this-kasan-gce
2018/11/21 02:31 net-old cadf9df27e7c 9aca6b52 .config console log report ci-upstream-net-this-kasan-gce
2018/11/20 14:30 net-old 1359f25106ca 9bc2a903 .config console log report ci-upstream-net-this-kasan-gce
2018/11/28 20:16 net-next-old 86d1d8b72caf 4b6d14f2 .config console log report ci-upstream-net-kasan-gce
2018/11/28 08:51 net-next-old 2c30aac50d92 4b6d14f2 .config console log report ci-upstream-net-kasan-gce
2018/11/26 20:42 net-next-old 4bffc669d624 ac912200 .config console log report ci-upstream-net-kasan-gce
2018/11/26 06:50 net-next-old 4bffc669d624 3d3ec907 .config console log report ci-upstream-net-kasan-gce
2018/11/26 01:30 net-next-old 358be656406d 3d3ec907 .config console log report ci-upstream-net-kasan-gce
2018/11/25 23:21 net-next-old 358be656406d 3d3ec907 .config console log report ci-upstream-net-kasan-gce
2018/11/25 19:14 net-next-old 358be656406d 3d3ec907 .config console log report ci-upstream-net-kasan-gce
* Struck through repros no longer work on HEAD.