syzbot


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

Status: public: reported C repro on 2019/04/14 08:51
Reported-by: syzbot+a8301a34c4e4b180ae62@syzkaller.appspotmail.com
First crash: 2294d, last: 2294d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KASAN: slab-out-of-bounds Read in _autofs_dev_ioctl autofs C 5 2289d 2290d 8/28 fixed on 2018/08/28 17:48

Sample crash report:
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
random: sshd: uninitialized urandom read (32 bytes read)
==================================================================
BUG: KASAN: slab-out-of-bounds in _autofs_dev_ioctl+0x687/0x690 fs/autofs4/dev-ioctl.c:681
Read of size 4 at addr ffff8801b78a8948 by task syz-executor567/3799

CPU: 0 PID: 3799 Comm: syz-executor567 Not tainted 4.9.119-g9dc978d #23
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
 ffff8801b6d5fba0 ffffffff81eb4be9 ffffea0006de2a00 ffff8801b78a8948
 0000000000000000 ffff8801b78a8948 ffff8801b78a8948 ffff8801b6d5fbd8
 ffffffff81567f89 ffff8801b78a8948 0000000000000004 0000000000000000
Call Trace:
 [<ffffffff81eb4be9>] __dump_stack lib/dump_stack.c:15 [inline]
 [<ffffffff81eb4be9>] dump_stack+0xc1/0x128 lib/dump_stack.c:51
 [<ffffffff81567f89>] print_address_description+0x6c/0x234 mm/kasan/report.c:256
 [<ffffffff81568393>] kasan_report_error mm/kasan/report.c:355 [inline]
 [<ffffffff81568393>] kasan_report.cold.6+0x242/0x2fe mm/kasan/report.c:412
 [<ffffffff8153bef4>] __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:432
 [<ffffffff81905967>] _autofs_dev_ioctl+0x687/0x690 fs/autofs4/dev-ioctl.c:681
 [<ffffffff8190598b>] autofs_dev_ioctl+0x1b/0x30 fs/autofs4/dev-ioctl.c:714
 [<ffffffff815b309c>] vfs_ioctl fs/ioctl.c:43 [inline]
 [<ffffffff815b309c>] file_ioctl fs/ioctl.c:493 [inline]
 [<ffffffff815b309c>] do_vfs_ioctl+0x1ac/0x11a0 fs/ioctl.c:677
 [<ffffffff815b411f>] SYSC_ioctl fs/ioctl.c:694 [inline]
 [<ffffffff815b411f>] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:685
 [<ffffffff81006316>] do_syscall_64+0x1a6/0x490 arch/x86/entry/common.c:282
 [<ffffffff839fccd3>] entry_SYSCALL_64_after_swapgs+0x5d/0xdb

Allocated by task 3799:
 save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:57
 save_stack+0x43/0xd0 mm/kasan/kasan.c:505
 set_track mm/kasan/kasan.c:517 [inline]
 kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:609
 kmem_cache_alloc_trace+0xfd/0x2b0 mm/slub.c:2742
 kmalloc include/linux/slab.h:490 [inline]
 kzalloc include/linux/slab.h:636 [inline]
 ramfs_fill_super+0xcc/0x490 fs/ramfs/inode.c:216
 mount_nodev+0x5b/0x100 fs/super.c:1146
 ramfs_mount+0x2c/0x40 fs/ramfs/inode.c:243
 mount_fs+0x28c/0x370 fs/super.c:1206
 vfs_kern_mount.part.29+0xd1/0x3d0 fs/namespace.c:991
 vfs_kern_mount fs/namespace.c:973 [inline]
 do_new_mount fs/namespace.c:2513 [inline]
 do_mount+0x3c9/0x2740 fs/namespace.c:2835
 SYSC_mount fs/namespace.c:3051 [inline]
 SyS_mount+0xfe/0x110 fs/namespace.c:3028
 do_syscall_64+0x1a6/0x490 arch/x86/entry/common.c:282
 entry_SYSCALL_64_after_swapgs+0x5d/0xdb

Freed by task 0:
(stack is not available)

The buggy address belongs to the object at ffff8801b78a8948
 which belongs to the cache kmalloc-8 of size 8
The buggy address is located 0 bytes inside of
 8-byte region [ffff8801b78a8948, ffff8801b78a8950)
The buggy address belongs to the page:
page:ffffea0006de2a00 count:1 mapcount:0 mapping:          (null) index:0xffff8801b78a82a0
flags: 0x8000000000000080(slab)
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff8801b78a8800: fc fc fb fc fc fb fc fc fb fc fc fb fc fc fb fc
 ffff8801b78a8880: fc fb fc fc fb fc fc fb fc fc fb fc fc fb fc fc
>ffff8801b78a8900: 00 fc fc 00 fc fc 00 fc fc 02 fc fc fc fc fc fc
                                              ^
 ffff8801b78a8980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff8801b78a8a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2018/08/11 09:14 https://android.googlesource.com/kernel/common android-4.9 9dc978d43ec7 7a88b141 .config console log report syz C ci-android-49-kasan-gce-root
* Struck through repros no longer work on HEAD.