syzbot


KASAN: null-ptr-deref Write in rxrpc_unuse_local

Status: fixed on 2019/09/06 20:45
Reported-by: syzbot+20dee719a2e090427b5f@syzkaller.appspotmail.com
Fix commit: 68553f1a6f74 rxrpc: Fix local refcounting
First crash: 1709d, last: 1705d
Cause bisection: introduced by (bisect log) :
commit 5c2833938bf50d502586e16b9dad1e3cf88fda6f
Author: David Howells <dhowells@redhat.com>
Date: Wed Jul 31 15:26:05 2019 +0000

  rxrpc: Fix local endpoint refcounting

Crash: KASAN: null-ptr-deref Write in rxrpc_unuse_local (log)
Repro: C syz .config
  
Discussions (2)
Title Replies (including bot) Last reply
[PATCH net] rxrpc: Fix local refcounting 3 (3) 2019/08/12 04:29
KASAN: null-ptr-deref Write in rxrpc_unuse_local 0 (2) 2019/08/09 18:09

Sample crash report:
==================================================================
BUG: KASAN: null-ptr-deref in atomic_sub_return include/asm-generic/atomic-instrumented.h:159 [inline]
BUG: KASAN: null-ptr-deref in atomic_dec_return include/linux/atomic-fallback.h:455 [inline]
BUG: KASAN: null-ptr-deref in rxrpc_unuse_local+0x23/0x70 net/rxrpc/local_object.c:405
Write of size 4 at addr 0000000000000010 by task syz-executor422/10219

CPU: 0 PID: 10219 Comm: syz-executor422 Not tainted 5.3.0-rc3+ #158
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+0x172/0x1f0 lib/dump_stack.c:113
 __kasan_report.cold+0x5/0x36 mm/kasan/report.c:486
 kasan_report+0x12/0x17 mm/kasan/common.c:612
 check_memory_region_inline mm/kasan/generic.c:185 [inline]
 check_memory_region+0x134/0x1a0 mm/kasan/generic.c:192
 __kasan_check_write+0x14/0x20 mm/kasan/common.c:98
 atomic_sub_return include/asm-generic/atomic-instrumented.h:159 [inline]
 atomic_dec_return include/linux/atomic-fallback.h:455 [inline]
 rxrpc_unuse_local+0x23/0x70 net/rxrpc/local_object.c:405
 rxrpc_release_sock net/rxrpc/af_rxrpc.c:904 [inline]
 rxrpc_release+0x47d/0x840 net/rxrpc/af_rxrpc.c:930
 __sock_release+0xce/0x280 net/socket.c:590
 sock_close+0x1e/0x30 net/socket.c:1268
 __fput+0x2ff/0x890 fs/file_table.c:280
 ____fput+0x16/0x20 fs/file_table.c:313
 task_work_run+0x145/0x1c0 kernel/task_work.c:113
 exit_task_work include/linux/task_work.h:22 [inline]
 do_exit+0x92f/0x2e50 kernel/exit.c:879
 do_group_exit+0x135/0x360 kernel/exit.c:983
 __do_sys_exit_group kernel/exit.c:994 [inline]
 __se_sys_exit_group kernel/exit.c:992 [inline]
 __x64_sys_exit_group+0x44/0x50 kernel/exit.c:992
 do_syscall_64+0xfd/0x6a0 arch/x86/entry/common.c:296
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x43ed68
Code: Bad RIP value.
RSP: 002b:00007ffc60935ce8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000043ed68
RDX: 0000000000000000 RSI: 000000000000003c RDI: 0000000000000000
RBP: 00000000004be568 R08: 00000000000000e7 R09: ffffffffffffffd0
R10: 00000000ffffffff R11: 0000000000000246 R12: 0000000000000001
R13: 00000000006d0180 R14: 0000000000000000 R15: 0000000000000000
==================================================================

Crashes (4422):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/08/12 07:17 net-old 9481382b36fe acb51638 .config console log report syz C ci-upstream-net-this-kasan-gce
2019/08/12 06:06 net-old 9481382b36fe acb51638 .config console log report syz C ci-upstream-net-this-kasan-gce
2019/08/12 05:27 net-old 9481382b36fe acb51638 .config console log report syz C ci-upstream-net-this-kasan-gce
2019/08/12 03:33 net-old 9481382b36fe acb51638 .config console log report syz C ci-upstream-net-this-kasan-gce
2019/08/12 01:44 net-old 9481382b36fe acb51638 .config console log report syz C ci-upstream-net-this-kasan-gce
2019/08/12 01:23 net-old 9481382b36fe acb51638 .config console log report syz C ci-upstream-net-this-kasan-gce
2019/08/12 01:06 net-old 9481382b36fe acb51638 .config console log report syz C ci-upstream-net-this-kasan-gce
2019/08/12 00:48 net-old 9481382b36fe acb51638 .config console log report syz C ci-upstream-net-this-kasan-gce
2019/08/11 23:39 net-old 57c722e932cf acb51638 .config console log report syz C ci-upstream-net-this-kasan-gce
2019/08/11 21:33 net-old 57c722e932cf acb51638 .config console log report syz C ci-upstream-net-this-kasan-gce
2019/08/11 20:25 net-old 57c722e932cf acb51638 .config console log report syz C ci-upstream-net-this-kasan-gce
2019/08/11 18:46 net-old 57c722e932cf acb51638 .config console log report syz C ci-upstream-net-this-kasan-gce
2019/08/11 18:29 net-old 57c722e932cf acb51638 .config console log report syz C ci-upstream-net-this-kasan-gce
2019/08/11 18:09 net-old 57c722e932cf acb51638 .config console log report syz C ci-upstream-net-this-kasan-gce
2019/08/11 16:40 net-old 57c722e932cf acb51638 .config console log report syz C ci-upstream-net-this-kasan-gce
2019/08/11 15:52 net-old 57c722e932cf acb51638 .config console log report syz C ci-upstream-net-this-kasan-gce
2019/08/11 15:12 net-old 57c722e932cf acb51638 .config console log report syz C ci-upstream-net-this-kasan-gce
2019/08/11 13:38 net-old 57c722e932cf acb51638 .config console log report syz C ci-upstream-net-this-kasan-gce
2019/08/11 13:22 net-old 57c722e932cf acb51638 .config console log report syz C ci-upstream-net-this-kasan-gce
2019/08/11 12:04 net-old 57c722e932cf acb51638 .config console log report syz C ci-upstream-net-this-kasan-gce
2019/08/11 11:38 net-old 57c722e932cf acb51638 .config console log report syz C ci-upstream-net-this-kasan-gce
2019/08/11 07:50 net-old 57c722e932cf acb51638 .config console log report syz C ci-upstream-net-this-kasan-gce
2019/08/13 08:57 linux-next 8e72ac275c63 8620c2c2 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/08/12 15:51 linux-next 8e72ac275c63 acb51638 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/08/12 11:14 linux-next 87b983f55b8c acb51638 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/08/12 10:44 linux-next 87b983f55b8c acb51638 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/08/12 09:39 linux-next 87b983f55b8c acb51638 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/08/12 07:21 linux-next 87b983f55b8c acb51638 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/08/12 06:52 linux-next 87b983f55b8c acb51638 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/08/12 06:33 linux-next 87b983f55b8c acb51638 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/08/12 06:18 linux-next 87b983f55b8c acb51638 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/08/12 06:10 linux-next 87b983f55b8c acb51638 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/08/12 00:35 linux-next 87b983f55b8c acb51638 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/08/12 00:11 linux-next 87b983f55b8c acb51638 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/08/11 23:38 linux-next 87b983f55b8c acb51638 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/08/11 23:08 linux-next 87b983f55b8c acb51638 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/08/11 20:08 linux-next 87b983f55b8c acb51638 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/08/11 13:47 linux-next 87b983f55b8c acb51638 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/08/11 12:03 linux-next 87b983f55b8c acb51638 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/08/11 11:42 linux-next 87b983f55b8c acb51638 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/08/11 10:24 linux-next 87b983f55b8c acb51638 .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/08/09 10:14 linux-next 87b983f55b8c ede31a9b .config console log report syz C ci-upstream-linux-next-kasan-gce-root
2019/08/13 11:51 linux-next 8e72ac275c63 8620c2c2 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/13 11:32 linux-next 8e72ac275c63 8620c2c2 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/13 10:30 linux-next 8e72ac275c63 8620c2c2 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/13 09:32 linux-next 8e72ac275c63 8620c2c2 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/13 08:42 linux-next 8e72ac275c63 8620c2c2 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/13 07:55 linux-next 8e72ac275c63 8620c2c2 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/13 07:24 linux-next 8e72ac275c63 8620c2c2 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/13 06:49 linux-next 8e72ac275c63 8620c2c2 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/13 06:09 linux-next 8e72ac275c63 8620c2c2 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/13 05:40 linux-next 8e72ac275c63 8620c2c2 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/13 04:53 linux-next 8e72ac275c63 8620c2c2 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/13 04:11 linux-next 8e72ac275c63 8620c2c2 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/13 03:27 linux-next 8e72ac275c63 8620c2c2 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/13 02:36 linux-next 8e72ac275c63 8620c2c2 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/13 01:45 linux-next 8e72ac275c63 8620c2c2 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/13 00:50 linux-next 8e72ac275c63 8620c2c2 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/13 00:25 linux-next 8e72ac275c63 8620c2c2 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/13 00:19 linux-next 8e72ac275c63 8620c2c2 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/12 22:47 linux-next 8e72ac275c63 acb51638 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/12 22:17 linux-next 8e72ac275c63 acb51638 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/12 21:25 linux-next 8e72ac275c63 acb51638 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/12 20:47 linux-next 8e72ac275c63 acb51638 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/12 20:05 linux-next 8e72ac275c63 acb51638 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/12 19:12 linux-next 8e72ac275c63 acb51638 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/12 18:44 linux-next 8e72ac275c63 acb51638 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/12 18:20 linux-next 8e72ac275c63 acb51638 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/12 17:58 linux-next 8e72ac275c63 acb51638 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/12 16:57 linux-next 8e72ac275c63 acb51638 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/12 16:17 linux-next 8e72ac275c63 acb51638 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/12 15:38 linux-next 8e72ac275c63 acb51638 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/12 15:02 linux-next 8e72ac275c63 acb51638 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/12 14:42 linux-next 8e72ac275c63 acb51638 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/12 14:27 linux-next 8e72ac275c63 acb51638 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/12 13:03 linux-next 87b983f55b8c acb51638 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/12 12:20 linux-next 87b983f55b8c acb51638 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/12 11:21 linux-next 87b983f55b8c acb51638 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/12 10:21 linux-next 87b983f55b8c acb51638 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/12 09:42 linux-next 87b983f55b8c acb51638 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/12 08:46 linux-next 87b983f55b8c acb51638 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/12 08:35 linux-next 87b983f55b8c acb51638 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/12 07:27 linux-next 87b983f55b8c acb51638 .config console log report ci-upstream-linux-next-kasan-gce-root
2019/08/09 09:40 linux-next 87b983f55b8c ede31a9b .config console log report ci-upstream-linux-next-kasan-gce-root
* Struck through repros no longer work on HEAD.