syzbot


WARNING: refcount bug in llc_sap_find

Status: fixed on 2018/08/28 17:48
Subsystems: net
[Documentation on labels]
Reported-by: syzbot+278893f3f7803871f7ce@syzkaller.appspotmail.com
Fix commit: 0dcb82254d65 llc: use refcount_inc_not_zero() for llc_sap_find()
First crash: 2093d, last: 2088d
Discussions (7)
Title Replies (including bot) Last reply
[PATCH 3.18 00/56] 3.18.120-stable review 58 (58) 2018/08/27 19:30
[PATCH 4.4 00/22] 4.4.151-stable review 26 (26) 2018/08/21 22:01
[PATCH 4.9 00/25] 4.9.123-stable review 31 (31) 2018/08/21 22:00
[PATCH 4.14 00/29] 4.14.66-stable review 33 (33) 2018/08/21 19:49
[PATCH 4.17 00/42] 4.17.18-stable review 46 (46) 2018/08/21 19:44
[Patch net] llc: use refcount_inc_not_zero() for llc_sap_find() 2 (2) 2018/08/07 22:54
WARNING: refcount bug in llc_sap_find 0 (1) 2018/08/07 14:59

Sample crash report:
------------[ cut here ]------------
refcount_t: increment on 0; use-after-free.
WARNING: CPU: 0 PID: 25217 at lib/refcount.c:153 refcount_inc+0x5d/0x70 lib/refcount.c:153
Kernel panic - not syncing: panic_on_warn set ...

CPU: 0 PID: 25217 Comm: syz-executor271 Not tainted 4.18.0-rc7+ #175
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1c9/0x2b4 lib/dump_stack.c:113
 panic+0x238/0x4e7 kernel/panic.c:184
 __warn.cold.8+0x163/0x1ba kernel/panic.c:536
 report_bug+0x252/0x2d0 lib/bug.c:186
 fixup_bug arch/x86/kernel/traps.c:178 [inline]
 do_error_trap+0x1fc/0x4d0 arch/x86/kernel/traps.c:296
 do_invalid_op+0x1b/0x20 arch/x86/kernel/traps.c:316
 invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:992
RIP: 0010:refcount_inc+0x5d/0x70 lib/refcount.c:153
Code: 1d 9c ef 25 05 31 ff 89 de e8 6f b0 1c fe 84 db 75 df e8 96 af 1c fe 48 c7 c7 40 4b 3a 87 c6 05 7c ef 25 05 01 e8 93 c8 e7 fd <0f> 0b eb c3 0f 1f 44 00 00 66 2e 0f 1f 84 00 00 00 00 00 55 48 89 
RSP: 0018:ffff8801d6cd7af8 EFLAGS: 00010286
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff81632481 RDI: ffff8801d6cd77d0
RBP: ffff8801d6cd7b00 R08: ffff8801bfbf65c0 R09: 0000000000000002
R10: ffff8801bfbf65c0 R11: 0000000000000000 R12: 00000000000000ff
R13: dffffc0000000000 R14: 00000000000000ff R15: ffff8801d6cd7d17
 llc_sap_hold include/net/llc.h:116 [inline]
 llc_sap_find+0x1ec/0x2a0 net/llc/llc_core.c:77
 llc_ui_bind+0x6c7/0xf10 net/llc/af_llc.c:362
 __sys_bind+0x331/0x440 net/socket.c:1493
 __do_sys_bind net/socket.c:1504 [inline]
 __se_sys_bind net/socket.c:1502 [inline]
 __x64_sys_bind+0x73/0xb0 net/socket.c:1502
 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x445ca9
Code: e8 ac e7 ff ff 48 83 c4 18 c3 0f 1f 80 00 00 00 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 0f 83 fb 0d fc ff c3 66 2e 0f 1f 84 00 00 00 00 
RSP: 002b:00007ff435ebcdb8 EFLAGS: 00000246 ORIG_RAX: 0000000000000031
RAX: ffffffffffffffda RBX: 00000000006dac28 RCX: 0000000000445ca9
RDX: 0000000000000010 RSI: 00000000200000c0 RDI: 0000000000000003
RBP: 00000000006dac20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000006dac2c
R13: 00007ffe0636e23f R14: 00007ff435ebd9c0 R15: 00000000006dac20
Dumping ftrace buffer:
   (ftrace buffer empty)
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (18):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/08/03 14:50 upstream 0585df468e8f cc4f6d0a .config console log report syz C ci-upstream-kasan-gce-root
2018/08/03 14:48 net-old afb41bb03965 cc4f6d0a .config console log report syz C ci-upstream-net-this-kasan-gce
2018/08/03 14:29 net-next-old 6534770d6f17 cc4f6d0a .config console log report syz C ci-upstream-net-kasan-gce
2018/08/09 10:45 upstream fedb8da96355 2eeda842 .config console log report ci-upstream-kasan-gce-root
2018/08/09 09:07 upstream fedb8da96355 2eeda842 .config console log report ci-upstream-kasan-gce-root
2018/08/04 06:02 upstream 0b5b1f9a78b5 df7f6947 .config console log report ci-upstream-kasan-gce-root
2018/08/08 08:53 net-old 455f05ecd2b2 1beb8136 .config console log report ci-upstream-net-this-kasan-gce
2018/08/08 04:29 net-old 455f05ecd2b2 1beb8136 .config console log report ci-upstream-net-this-kasan-gce
2018/08/06 20:40 net-old 82a40777de12 1beb8136 .config console log report ci-upstream-net-this-kasan-gce
2018/08/05 20:50 net-old 91874ecf32e4 1beb8136 .config console log report ci-upstream-net-this-kasan-gce
2018/08/05 00:52 net-old 5607016cd1bb 3476a2df .config console log report ci-upstream-net-this-kasan-gce
2018/08/04 07:11 net-old f664e37dcc52 df7f6947 .config console log report ci-upstream-net-this-kasan-gce
2018/08/03 18:15 net-old afb41bb03965 cc4f6d0a .config console log report ci-upstream-net-this-kasan-gce
2018/08/03 16:40 net-old afb41bb03965 cc4f6d0a .config console log report ci-upstream-net-this-kasan-gce
2018/08/09 01:04 net-next-old 9c2956d2ad9e 2eeda842 .config console log report ci-upstream-net-kasan-gce
2018/08/07 09:53 net-next-old de7de576eca2 1beb8136 .config console log report ci-upstream-net-kasan-gce
2018/08/03 13:54 net-next-old 6534770d6f17 cc4f6d0a .config console log report ci-upstream-net-kasan-gce
2018/08/04 02:58 linux-next 116b181bb646 df7f6947 .config console log report ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.