syzbot


bpf-next test error: KASAN: use-after-free Write in afs_wake_up_async_call

Status: closed as dup on 2020/06/19 22:04
Reported-by: syzbot+39eaecb9eee28d41da93@syzkaller.appspotmail.com
First crash: 781d, last: 765d
Duplicate of (1):
Title Repro Cause bisect Fix bisect Count Last Reported
net-next test error: KASAN: use-after-free Write in afs_wake_up_async_call 60 772d 781d

Sample crash report:
tipc: TX() has been purged, node left!
==================================================================
BUG: KASAN: use-after-free in afs_wake_up_async_call+0x430/0x4a0 fs/afs/rxrpc.c:707
Write of size 1 at addr ffff88809fd2e9e4 by task kworker/u4:4/2485

CPU: 0 PID: 2485 Comm: kworker/u4:4 Not tainted 5.8.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: netns cleanup_net
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x18f/0x20d lib/dump_stack.c:118
 print_address_description.constprop.0.cold+0xae/0x436 mm/kasan/report.c:383
 __kasan_report mm/kasan/report.c:513 [inline]
 kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530
 afs_wake_up_async_call+0x430/0x4a0 fs/afs/rxrpc.c:707
 rxrpc_notify_socket+0x1db/0x5d0 net/rxrpc/recvmsg.c:40
 __rxrpc_set_call_completion.part.0+0x172/0x410 net/rxrpc/recvmsg.c:76
 __rxrpc_set_call_completion net/rxrpc/recvmsg.c:112 [inline]
 __rxrpc_call_completed net/rxrpc/recvmsg.c:102 [inline]
 __rxrpc_call_completed net/rxrpc/recvmsg.c:100 [inline]
 rxrpc_call_completed+0xd0/0xf0 net/rxrpc/recvmsg.c:111
 rxrpc_discard_prealloc+0x777/0xab0 net/rxrpc/call_accept.c:233
 rxrpc_listen+0x11c/0x330 net/rxrpc/af_rxrpc.c:245
 afs_close_socket+0x95/0x320 fs/afs/rxrpc.c:110
 afs_net_exit+0x1bc/0x310 fs/afs/main.c:155
 ops_exit_list+0xb0/0x160 net/core/net_namespace.c:186
 cleanup_net+0x4ea/0xa00 net/core/net_namespace.c:603
 process_one_work+0x94c/0x1670 kernel/workqueue.c:2269
 worker_thread+0x64c/0x1120 kernel/workqueue.c:2415
 kthread+0x3b5/0x4a0 kernel/kthread.c:291
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:293

Allocated by task 6822:
 save_stack+0x1b/0x40 mm/kasan/common.c:48
 set_track mm/kasan/common.c:56 [inline]
 __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:494
 kmem_cache_alloc_trace+0x14f/0x2d0 mm/slab.c:3551
 kmalloc include/linux/slab.h:555 [inline]
 kzalloc include/linux/slab.h:669 [inline]
 afs_alloc_call+0x4f/0x360 fs/afs/rxrpc.c:141
 afs_charge_preallocation+0xe9/0x2d0 fs/afs/rxrpc.c:757
 afs_open_socket+0x294/0x360 fs/afs/rxrpc.c:92
 afs_net_init+0xa6c/0xe30 fs/afs/main.c:125
 ops_init+0xaf/0x470 net/core/net_namespace.c:151
 setup_net+0x2d8/0x850 net/core/net_namespace.c:341
 copy_net_ns+0x2cf/0x5e0 net/core/net_namespace.c:482
 create_new_namespaces+0x3f6/0xb10 kernel/nsproxy.c:110
 unshare_nsproxy_namespaces+0xbd/0x1f0 kernel/nsproxy.c:231
 ksys_unshare+0x36c/0x9a0 kernel/fork.c:2983
 __do_sys_unshare kernel/fork.c:3051 [inline]
 __se_sys_unshare kernel/fork.c:3049 [inline]
 __x64_sys_unshare+0x2d/0x40 kernel/fork.c:3049
 do_syscall_64+0x60/0xe0 arch/x86/entry/common.c:359
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Freed by task 2485:
 save_stack+0x1b/0x40 mm/kasan/common.c:48
 set_track mm/kasan/common.c:56 [inline]
 kasan_set_free_info mm/kasan/common.c:316 [inline]
 __kasan_slab_free+0xf5/0x140 mm/kasan/common.c:455
 __cache_free mm/slab.c:3426 [inline]
 kfree+0x103/0x2c0 mm/slab.c:3757
 afs_put_call+0x345/0x440 fs/afs/rxrpc.c:190
 rxrpc_discard_prealloc+0x75a/0xab0 net/rxrpc/call_accept.c:230
 rxrpc_listen+0x11c/0x330 net/rxrpc/af_rxrpc.c:245
 afs_close_socket+0x95/0x320 fs/afs/rxrpc.c:110
 afs_net_exit+0x1bc/0x310 fs/afs/main.c:155
 ops_exit_list+0xb0/0x160 net/core/net_namespace.c:186
 cleanup_net+0x4ea/0xa00 net/core/net_namespace.c:603
 process_one_work+0x94c/0x1670 kernel/workqueue.c:2269
 worker_thread+0x64c/0x1120 kernel/workqueue.c:2415
 kthread+0x3b5/0x4a0 kernel/kthread.c:291
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:293

The buggy address belongs to the object at ffff88809fd2e800
 which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 484 bytes inside of
 1024-byte region [ffff88809fd2e800, ffff88809fd2ec00)
The buggy address belongs to the page:
page:ffffea00027f4b80 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0
flags: 0xfffe0000000200(slab)
raw: 00fffe0000000200 ffffea0002809548 ffffea0002a4b648 ffff8880aa000c40
raw: 0000000000000000 ffff88809fd2e000 0000000100000002 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff88809fd2e880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88809fd2e900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff88809fd2e980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                                       ^
 ffff88809fd2ea00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88809fd2ea80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================

Crashes (96):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-bpf-next-kasan-gce 2020/07/03 21:23 bpf-next 046cc3dd9a25 51095195 .config log report
ci-upstream-bpf-next-kasan-gce 2020/07/03 19:54 bpf-next 811d7e375d08 bed10395 .config log report
ci-upstream-bpf-next-kasan-gce 2020/07/02 01:14 bpf-next 91f77560e473 39acb39d .config log report
ci-upstream-bpf-next-kasan-gce 2020/07/01 23:15 bpf-next 6b207d66aa9f 39acb39d .config log report
ci-upstream-bpf-next-kasan-gce 2020/07/01 17:11 bpf-next bba1dc0b55ac 39acb39d .config log report
ci-upstream-bpf-next-kasan-gce 2020/07/01 17:11 bpf-next bba1dc0b55ac 39acb39d .config log report
ci-upstream-bpf-next-kasan-gce 2020/07/01 12:10 bpf-next 8c18311067d0 39acb39d .config log report
ci-upstream-bpf-next-kasan-gce 2020/07/01 10:53 bpf-next ca4db6389d61 917afeaa .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/30 18:46 bpf-next 0c508241e032 a2cdad9d .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/30 17:23 bpf-next afa12644c877 a2cdad9d .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/28 13:52 bpf-next 16d37ee3d2b1 a2cdad9d .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/27 04:04 bpf-next 16d37ee3d2b1 ffec44b5 .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/26 01:55 bpf-next 16d37ee3d2b1 aea82c00 .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/25 23:46 bpf-next 16d37ee3d2b1 aea82c00 .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/25 22:20 bpf-next 16d37ee3d2b1 f9147b08 .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/25 20:09 bpf-next 16d37ee3d2b1 f9147b08 .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/25 18:42 bpf-next 16d37ee3d2b1 adb7d9e6 .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/25 16:15 bpf-next 16d37ee3d2b1 c7b4497a .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/25 16:15 bpf-next 16d37ee3d2b1 c7b4497a .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/25 15:06 bpf-next 9d9d8cc21e38 54566aff .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/25 15:06 bpf-next 9d9d8cc21e38 54566aff .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/25 15:06 bpf-next 9d9d8cc21e38 54566aff .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/19 18:22 bpf-next 7c7982cbadbb 81abc331 .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/19 18:22 bpf-next 7c7982cbadbb 81abc331 .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/19 18:22 bpf-next 7c7982cbadbb 81abc331 .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/19 08:28 bpf-next 7c7982cbadbb bc258b50 .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/19 08:28 bpf-next 7c7982cbadbb bc258b50 .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/19 08:28 bpf-next 7c7982cbadbb bc258b50 .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/19 07:14 bpf-next 7c7982cbadbb bc258b50 .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/19 07:14 bpf-next 7c7982cbadbb bc258b50 .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/19 07:14 bpf-next 7c7982cbadbb bc258b50 .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/19 05:41 bpf-next 7c7982cbadbb bc258b50 .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/19 05:41 bpf-next 7c7982cbadbb bc258b50 .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/19 05:41 bpf-next 7c7982cbadbb bc258b50 .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/19 04:02 bpf-next 7c7982cbadbb bc258b50 .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/19 04:02 bpf-next 7c7982cbadbb bc258b50 .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/19 04:02 bpf-next 7c7982cbadbb bc258b50 .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/19 02:39 bpf-next 7c7982cbadbb bc258b50 .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/19 02:39 bpf-next 7c7982cbadbb bc258b50 .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/19 02:39 bpf-next 7c7982cbadbb bc258b50 .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/19 01:13 bpf-next 7c7982cbadbb bc258b50 .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/19 01:13 bpf-next 7c7982cbadbb bc258b50 .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/18 09:11 bpf-next 7bd3a33ae6d2 d45a4d69 .config log report
ci-upstream-bpf-next-kasan-gce 2020/06/17 18:43 bpf-next 69119673bd50 b9f3810b .config log report