================================================================== BUG: KASAN: slab-out-of-bounds in find_first_bit+0xf7/0x100 lib/find_bit.c:107 ------------[ cut here ]------------ Read of size 8 at addr ffff8801c5307cd0 by task kswapd0/1535 kernel BUG at mm/vmscan.c:593! invalid opcode: 0000 [#1] SMP KASAN CPU: 1 PID: 1535 Comm: kswapd0 Not tainted 4.18.0-rc4-next-20180710+ #3 CPU: 0 PID: 18215 Comm: syz-executor6 Not tainted 4.18.0-rc4-next-20180710+ #3 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: RIP: 0010:shrink_slab_memcg mm/vmscan.c:593 [inline] RIP: 0010:shrink_slab+0xb3e/0xdb0 mm/vmscan.c:672 __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1c9/0x2b4 lib/dump_stack.c:113 Code: 8d a8 fd ff ff print_address_description+0x6c/0x20b mm/kasan/report.c:256 f0 48 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0x242/0x30d mm/kasan/report.c:412 0f __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 b3 find_first_bit+0xf7/0x100 lib/find_bit.c:107 08 shrink_slab_memcg mm/vmscan.c:580 [inline] shrink_slab+0x5d0/0xdb0 mm/vmscan.c:672 e8 3d ab da ff 48 shrink_node+0x429/0x16a0 mm/vmscan.c:2736 8b 85 c0 fd ff ff c7 00 f8 kswapd_shrink_node mm/vmscan.c:3458 [inline] balance_pgdat+0x7ca/0x1010 mm/vmscan.c:3568 f8 f8 f8 c6 kswapd+0x82e/0x12f0 mm/vmscan.c:3790 40 04 f8 e9 5d fb ff ff e8 22 ab kthread+0x345/0x410 kernel/kthread.c:246 da ff <0f> ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:415 0b e8 1b Allocated by task 7654: ab save_stack+0x43/0xd0 mm/kasan/kasan.c:448 da set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc4/0xe0 mm/kasan/kasan.c:553 ff __do_kmalloc_node mm/slab.c:3682 [inline] __kmalloc_node+0x47/0x70 mm/slab.c:3689 48 kmalloc_node include/linux/slab.h:555 [inline] kvmalloc_node+0x65/0xf0 mm/util.c:423 8b kvmalloc include/linux/mm.h:557 [inline] memcg_expand_one_shrinker_map mm/memcontrol.c:341 [inline] memcg_expand_shrinker_maps+0x1b1/0x3c0 mm/memcontrol.c:416 9d prealloc_memcg_shrinker mm/vmscan.c:185 [inline] prealloc_shrinker+0x29e/0x450 mm/vmscan.c:366 d8 register_shrinker+0x17/0x40 mm/vmscan.c:413 fd sget_fc+0x76f/0x950 fs/super.c:554 ff vfs_get_super+0x6e/0x270 fs/super.c:1255 ff proc_get_tree+0x88/0xb0 fs/proc/root.c:159 31 vfs_get_tree+0x1cb/0x5c0 fs/super.c:1743 ff do_new_mount fs/namespace.c:2567 [inline] do_mount+0x6c1/0x1fb0 fs/namespace.c:2889 48 ksys_mount+0x12d/0x140 fs/namespace.c:3105 89 __do_sys_mount fs/namespace.c:3119 [inline] __se_sys_mount fs/namespace.c:3116 [inline] __x64_sys_mount+0xbe/0x150 fs/namespace.c:3116 de do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 e8 entry_SYSCALL_64_after_hwframe+0x49/0xbe 3a ac Freed by task 2536: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 RSP: 0018:ffff88012793ec60 EFLAGS: 00010246 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 RAX: 0000000000040000 RBX: ffff88012793eeb0 RCX: ffffc90005e3c000 __cache_free mm/slab.c:3498 [inline] kfree+0xd9/0x260 mm/slab.c:3813 RDX: 0000000000040000 RSI: ffffffff81a1d04e RDI: 0000000000000007 signalfd_release+0x37/0x50 fs/signalfd.c:57 RBP: ffff88012793eed8 R08: ffff8801d866a240 R09: ffffed00398355e8 __fput+0x35d/0x930 fs/file_table.c:252 R10: ffffed00398355e8 R11: ffff8801cc1aaf47 R12: dffffc0000000000 ____fput+0x15/0x20 fs/file_table.c:288 R13: ffff8801cc32d2b0 R14: 0000000000000000 R15: ffff88012793ecf0 task_work_run+0x1ec/0x2a0 kernel/task_work.c:113 FS: 00007fb7117fa700(0000) GS:ffff8801dae00000(0000) knlGS:0000000000000000 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x318/0x380 arch/x86/entry/common.c:166 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 prepare_exit_to_usermode arch/x86/entry/common.c:197 [inline] syscall_return_slowpath arch/x86/entry/common.c:268 [inline] do_syscall_64+0x6be/0x820 arch/x86/entry/common.c:293 CR2: 00007ffc398fb938 CR3: 00000001cd545000 CR4: 00000000001406f0 entry_SYSCALL_64_after_hwframe+0x49/0xbe DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 The buggy address belongs to the object at ffff8801c5307cc0 which belongs to the cache kmalloc-32 of size 32 Call Trace: The buggy address is located 16 bytes inside of 32-byte region [ffff8801c5307cc0, ffff8801c5307ce0) The buggy address belongs to the page: page:ffffea000714c1c0 count:1 mapcount:0 mapping:ffff8801da8001c0 index:0xffff8801c5307fc1 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffffea000735cc08 ffffea0006464088 ffff8801da8001c0 raw: ffff8801c5307fc1 ffff8801c5307000 0000000100000014 0000000000000000 shrink_node+0x429/0x16a0 mm/vmscan.c:2736 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801c5307b80: 07 fc fc fc fc fc fc fc 00 00 06 fc fc fc fc fc ffff8801c5307c00: 00 00 06 fc fc fc fc fc 00 00 06 fc fc fc fc fc >ffff8801c5307c80: 00 00 06 fc fc fc fc fc 00 00 06 fc fc fc fc fc ^ ffff8801c5307d00: 00 00 06 fc fc fc fc fc fb fb fb fb fc fc fc fc ffff8801c5307d80: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc shrink_zones mm/vmscan.c:2965 [inline] do_try_to_free_pages+0x3e7/0x1290 mm/vmscan.c:3027 ==================================================================