syzbot


bpf test error: KASAN: null-ptr-deref Write in x25_disconnect

Status: fixed on 2020/07/17 17:58
Subsystems: x25
[Documentation on labels]
Reported-by: syzbot+6b89cf96299c875daf8a@syzkaller.appspotmail.com
Fix commit: 8999dc89497a net/x25: Fix null-ptr-deref in x25_disconnect
First crash: 1627d, last: 1614d
Discussions (1)
Title Replies (including bot) Last reply
bpf test error: KASAN: null-ptr-deref Write in x25_disconnect 0 (1) 2020/04/28 04:58

Sample crash report:
can: request_module (can-proto-0) failed.
can: request_module (can-proto-0) failed.
can: request_module (can-proto-0) failed.
==================================================================
BUG: KASAN: null-ptr-deref in atomic_fetch_sub include/asm-generic/atomic-instrumented.h:199 [inline]
BUG: KASAN: null-ptr-deref in refcount_sub_and_test include/linux/refcount.h:266 [inline]
BUG: KASAN: null-ptr-deref in refcount_dec_and_test include/linux/refcount.h:294 [inline]
BUG: KASAN: null-ptr-deref in x25_neigh_put include/net/x25.h:253 [inline]
BUG: KASAN: null-ptr-deref in x25_disconnect+0x253/0x370 net/x25/x25_subr.c:361
Write of size 4 at addr 00000000000000d8 by task syz-fuzzer/7019

CPU: 1 PID: 7019 Comm: syz-fuzzer Not tainted 5.7.0-rc2-syzkaller #0
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+0x188/0x20d lib/dump_stack.c:118
 __kasan_report.cold+0x5/0x4d mm/kasan/report.c:515
 kasan_report+0x33/0x50 mm/kasan/common.c:625
 check_memory_region_inline mm/kasan/generic.c:187 [inline]
 check_memory_region+0x141/0x190 mm/kasan/generic.c:193
 atomic_fetch_sub include/asm-generic/atomic-instrumented.h:199 [inline]
 refcount_sub_and_test include/linux/refcount.h:266 [inline]
 refcount_dec_and_test include/linux/refcount.h:294 [inline]
 x25_neigh_put include/net/x25.h:253 [inline]
 x25_disconnect+0x253/0x370 net/x25/x25_subr.c:361
 x25_release+0x345/0x420 net/x25/af_x25.c:665
 __sock_release+0xcd/0x280 net/socket.c:605
 sock_close+0x18/0x20 net/socket.c:1283
 __fput+0x33e/0x880 fs/file_table.c:280
 task_work_run+0xf4/0x1b0 kernel/task_work.c:123
 tracehook_notify_resume include/linux/tracehook.h:188 [inline]
 exit_to_usermode_loop+0x2fa/0x360 arch/x86/entry/common.c:165
 prepare_exit_to_usermode arch/x86/entry/common.c:196 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:279 [inline]
 do_syscall_64+0x6b1/0x7d0 arch/x86/entry/common.c:305
 entry_SYSCALL_64_after_hwframe+0x49/0xb3
RIP: 0033:0x4afb40
Code: 8b 7c 24 10 48 8b 74 24 18 48 8b 54 24 20 49 c7 c2 00 00 00 00 49 c7 c0 00 00 00 00 49 c7 c1 00 00 00 00 48 8b 44 24 08 0f 05 <48> 3d 01 f0 ff ff 76 20 48 c7 44 24 28 ff ff ff ff 48 c7 44 24 30
RSP: 002b:000000c0001e9478 EFLAGS: 00000212 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 000000c00002c000 RCX: 00000000004afb40
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 000000c0001e94b8 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000212 R12: ffffffffffffffff
R13: 0000000000000160 R14: 000000000000015f R15: 0000000000000200
==================================================================

Crashes (78):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/05/11 08:39 bpf 81aabbb9fb7b f8f57555 .config console log report ci-upstream-bpf-kasan-gce
2020/05/10 02:02 bpf 81aabbb9fb7b 8742a2b9 .config console log report ci-upstream-bpf-kasan-gce
2020/05/09 14:13 bpf 81aabbb9fb7b 88cb3e92 .config console log report ci-upstream-bpf-kasan-gce
2020/05/08 23:12 bpf 81aabbb9fb7b e97b06d3 .config console log report ci-upstream-bpf-kasan-gce
2020/05/08 11:22 bpf 81aabbb9fb7b 2b98fdbc .config console log report ci-upstream-bpf-kasan-gce
2020/05/07 23:07 bpf 81aabbb9fb7b 6c70a1c2 .config console log report ci-upstream-bpf-kasan-gce
2020/05/07 09:45 bpf 81aabbb9fb7b 98cbd87b .config console log report ci-upstream-bpf-kasan-gce
2020/05/06 12:32 bpf 81aabbb9fb7b 4618eb2d .config console log report ci-upstream-bpf-kasan-gce
2020/05/06 00:19 bpf 81aabbb9fb7b 35b8eb30 .config console log report ci-upstream-bpf-kasan-gce
2020/05/05 22:32 bpf 81aabbb9fb7b 4b76dd25 .config console log report ci-upstream-bpf-kasan-gce
2020/05/05 12:12 bpf 7f645462ca01 4b76dd25 .config console log report ci-upstream-bpf-kasan-gce
2020/05/04 19:08 bpf 7f645462ca01 9941337c .config console log report ci-upstream-bpf-kasan-gce
2020/05/03 14:34 bpf 7f645462ca01 58ae5e18 .config console log report ci-upstream-bpf-kasan-gce
2020/05/03 14:34 bpf 7f645462ca01 58ae5e18 .config console log report ci-upstream-bpf-kasan-gce
2020/05/02 23:14 bpf 7f645462ca01 5457883a .config console log report ci-upstream-bpf-kasan-gce
2020/05/02 23:14 bpf 7f645462ca01 5457883a .config console log report ci-upstream-bpf-kasan-gce
2020/05/02 23:14 bpf 7f645462ca01 5457883a .config console log report ci-upstream-bpf-kasan-gce
2020/05/02 11:11 bpf 7f645462ca01 58da4c35 .config console log report ci-upstream-bpf-kasan-gce
2020/05/02 11:11 bpf 7f645462ca01 58da4c35 .config console log report ci-upstream-bpf-kasan-gce
2020/05/02 11:11 bpf 7f645462ca01 58da4c35 .config console log report ci-upstream-bpf-kasan-gce
2020/05/01 19:57 bpf 7f645462ca01 bc734e7a .config console log report ci-upstream-bpf-kasan-gce
2020/05/01 19:57 bpf 7f645462ca01 bc734e7a .config console log report ci-upstream-bpf-kasan-gce
2020/05/01 19:57 bpf 7f645462ca01 bc734e7a .config console log report ci-upstream-bpf-kasan-gce
2020/05/01 19:27 bpf c0414e6309ac bc734e7a .config console log report ci-upstream-bpf-kasan-gce
2020/05/01 19:27 bpf c0414e6309ac bc734e7a .config console log report ci-upstream-bpf-kasan-gce
2020/05/01 19:27 bpf c0414e6309ac bc734e7a .config console log report ci-upstream-bpf-kasan-gce
2020/05/01 18:02 bpf 7f645462ca01 bc734e7a .config console log report ci-upstream-bpf-kasan-gce
2020/05/01 18:02 bpf 7f645462ca01 bc734e7a .config console log report ci-upstream-bpf-kasan-gce
2020/05/01 18:02 bpf 7f645462ca01 bc734e7a .config console log report ci-upstream-bpf-kasan-gce
2020/05/01 05:45 bpf 7f645462ca01 a4d01b80 .config console log report ci-upstream-bpf-kasan-gce
2020/05/01 05:45 bpf 7f645462ca01 a4d01b80 .config console log report ci-upstream-bpf-kasan-gce
2020/05/01 05:45 bpf 7f645462ca01 a4d01b80 .config console log report ci-upstream-bpf-kasan-gce
2020/04/30 14:34 bpf 7f645462ca01 3698959a .config console log report ci-upstream-bpf-kasan-gce
2020/04/30 14:34 bpf 7f645462ca01 3698959a .config console log report ci-upstream-bpf-kasan-gce
2020/04/30 14:34 bpf 7f645462ca01 3698959a .config console log report ci-upstream-bpf-kasan-gce
2020/04/30 13:56 bpf 18f02ad19e2c 3698959a .config console log report ci-upstream-bpf-kasan-gce
2020/04/30 13:56 bpf 18f02ad19e2c 3698959a .config console log report ci-upstream-bpf-kasan-gce
2020/04/30 13:56 bpf 18f02ad19e2c 3698959a .config console log report ci-upstream-bpf-kasan-gce
2020/04/30 01:49 bpf 18f02ad19e2c 2dd552a5 .config console log report ci-upstream-bpf-kasan-gce
2020/04/30 01:49 bpf 18f02ad19e2c 2dd552a5 .config console log report ci-upstream-bpf-kasan-gce
2020/04/30 01:49 bpf 18f02ad19e2c 2dd552a5 .config console log report ci-upstream-bpf-kasan-gce
2020/04/29 13:23 bpf 18f02ad19e2c 496a08ae .config console log report ci-upstream-bpf-kasan-gce
2020/04/29 13:23 bpf 18f02ad19e2c 496a08ae .config console log report ci-upstream-bpf-kasan-gce
2020/04/29 13:23 bpf 18f02ad19e2c 496a08ae .config console log report ci-upstream-bpf-kasan-gce
2020/04/28 12:07 bpf 18f02ad19e2c e3ecea2e .config console log report ci-upstream-bpf-kasan-gce
2020/04/28 12:06 bpf 18f02ad19e2c e3ecea2e .config console log report ci-upstream-bpf-kasan-gce
2020/04/28 12:06 bpf 18f02ad19e2c e3ecea2e .config console log report ci-upstream-bpf-kasan-gce
2020/04/28 10:55 bpf 18f02ad19e2c e3ecea2e .config console log report ci-upstream-bpf-kasan-gce
2020/04/28 10:55 bpf 18f02ad19e2c e3ecea2e .config console log report ci-upstream-bpf-kasan-gce
2020/04/28 10:55 bpf 18f02ad19e2c e3ecea2e .config console log report ci-upstream-bpf-kasan-gce
2020/04/27 21:49 bpf 18f02ad19e2c 0ce7569e .config console log report ci-upstream-bpf-kasan-gce
2020/04/27 21:49 bpf 18f02ad19e2c 0ce7569e .config console log report ci-upstream-bpf-kasan-gce
2020/04/27 21:49 bpf 18f02ad19e2c 0ce7569e .config console log report ci-upstream-bpf-kasan-gce
* Struck through repros no longer work on HEAD.