syzbot


KASAN: slab-out-of-bounds Read in rxrpc_send_keepalive

Status: closed as dup on 2019/09/05 14:01
Subsystems: afs net
[Documentation on labels]
Reported-by: syzbot+9793cab84a94fab264ea@syzkaller.appspotmail.com
First crash: 1935d, last: 1891d
Duplicate of
Title Repro Cause bisect Fix bisect Count Last Reported
KASAN: use-after-free Read in rxrpc_send_keepalive afs net C error 694 1889d 1961d

Sample crash report:
==================================================================
BUG: KASAN: slab-out-of-bounds in rxrpc_send_keepalive+0xe2/0x3c0 net/rxrpc/output.c:634
Read of size 8 at addr ffff88808d575818 by task kworker/1:2/3015

CPU: 1 PID: 3015 Comm: kworker/1:2 Not tainted 5.4.0-rc3+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: krxrpcd rxrpc_peer_keepalive_worker
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x1d8/0x2f8 lib/dump_stack.c:113
 print_address_description+0x75/0x5c0 mm/kasan/report.c:374
 __kasan_report+0x14b/0x1c0 mm/kasan/report.c:506
 kasan_report+0x26/0x50 mm/kasan/common.c:634
 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132
 rxrpc_send_keepalive+0xe2/0x3c0 net/rxrpc/output.c:634
 rxrpc_peer_keepalive_dispatch net/rxrpc/peer_event.c:369 [inline]
 rxrpc_peer_keepalive_worker+0x76e/0xb40 net/rxrpc/peer_event.c:430
 process_one_work+0x7ef/0x10e0 kernel/workqueue.c:2269
 worker_thread+0xc01/0x1630 kernel/workqueue.c:2415
 kthread+0x332/0x350 kernel/kthread.c:255
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352

Allocated by task 7944:
 save_stack mm/kasan/common.c:69 [inline]
 set_track mm/kasan/common.c:77 [inline]
 __kasan_kmalloc+0x11c/0x1b0 mm/kasan/common.c:510
 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:518
 slab_post_alloc_hook mm/slab.h:584 [inline]
 slab_alloc mm/slab.c:3319 [inline]
 kmem_cache_alloc+0x1f5/0x2e0 mm/slab.c:3483
 getname_flags+0xba/0x640 fs/namei.c:138
 user_path_at_empty+0x2d/0x50 fs/namei.c:2598
 user_path_at include/linux/namei.h:49 [inline]
 vfs_statx fs/stat.c:187 [inline]
 vfs_lstat include/linux/fs.h:3247 [inline]
 __do_sys_newlstat fs/stat.c:354 [inline]
 __se_sys_newlstat+0x45/0x150 fs/stat.c:348
 __x64_sys_newlstat+0x5b/0x70 fs/stat.c:348
 do_syscall_64+0xf7/0x1c0 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

Freed by task 7944:
 save_stack mm/kasan/common.c:69 [inline]
 set_track mm/kasan/common.c:77 [inline]
 kasan_set_free_info mm/kasan/common.c:332 [inline]
 __kasan_slab_free+0x12a/0x1e0 mm/kasan/common.c:471
 kasan_slab_free+0xe/0x10 mm/kasan/common.c:480
 __cache_free mm/slab.c:3425 [inline]
 kmem_cache_free+0x81/0xf0 mm/slab.c:3693
 putname fs/namei.c:259 [inline]
 filename_lookup+0x4b0/0x690 fs/namei.c:2347
 user_path_at_empty+0x40/0x50 fs/namei.c:2598
 user_path_at include/linux/namei.h:49 [inline]
 vfs_statx fs/stat.c:187 [inline]
 vfs_lstat include/linux/fs.h:3247 [inline]
 __do_sys_newlstat fs/stat.c:354 [inline]
 __se_sys_newlstat+0x45/0x150 fs/stat.c:348
 __x64_sys_newlstat+0x5b/0x70 fs/stat.c:348
 do_syscall_64+0xf7/0x1c0 arch/x86/entry/common.c:290
 entry_SYSCALL_64_after_hwframe+0x49/0xbe

The buggy address belongs to the object at ffff88808d574140
 which belongs to the cache names_cache of size 4096
The buggy address is located 1752 bytes to the right of
 4096-byte region [ffff88808d574140, ffff88808d575140)
The buggy address belongs to the page:
page:ffffea0002355d00 refcount:1 mapcount:0 mapping:ffff88821bc548c0 index:0x0 compound_mapcount: 0
flags: 0x1fffc0000010200(slab|head)
raw: 01fffc0000010200 ffffea000181cc88 ffffea00027a7488 ffff88821bc548c0
raw: 0000000000000000 ffff88808d574140 0000000100000001 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff88808d575700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88808d575780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88808d575800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
                            ^
 ffff88808d575880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88808d575900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/10/18 21:27 upstream 0e2adab6cf28 8c88c9c1 .config console log report ci-upstream-kasan-gce-smack-root
2019/09/16 01:07 upstream 1609d7604b84 32d59357 .config console log report ci-upstream-kasan-gce
2019/09/05 23:16 upstream 3b47fd5ca9ea 040fda58 .config console log report ci-upstream-kasan-gce
2019/09/04 09:22 upstream 089cf7f6ecb2 12381952 .config console log report ci-upstream-kasan-gce
2019/09/23 14:02 net-next-old b41dae061bbd 1e9788a0 .config console log report ci-upstream-net-kasan-gce
* Struck through repros no longer work on HEAD.