================================================================== BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:199 [inline] BUG: KASAN: use-after-free in arch_atomic_read arch/x86/include/asm/atomic.h:31 [inline] BUG: KASAN: use-after-free in atomic_read include/asm-generic/atomic-instrumented.h:27 [inline] BUG: KASAN: use-after-free in blk_cgroup_congested include/linux/blk-cgroup.h:288 [inline] BUG: KASAN: use-after-free in mem_cgroup_throttle_swaprate+0x5d1/0x64b mm/swapfile.c:3755 Read of size 4 at addr ffff88809390ccd8 by task syz-executor.3/9935 CPU: 0 PID: 9935 Comm: syz-executor.3 Not tainted 5.7.0-rc1-syzkaller #0 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+0x188/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd3/0x315 mm/kasan/report.c:382 __kasan_report.cold+0x35/0x4d mm/kasan/report.c:511 kasan_report+0x33/0x50 mm/kasan/common.c:625 __read_once_size include/linux/compiler.h:199 [inline] arch_atomic_read arch/x86/include/asm/atomic.h:31 [inline] atomic_read include/asm-generic/atomic-instrumented.h:27 [inline] blk_cgroup_congested include/linux/blk-cgroup.h:288 [inline] mem_cgroup_throttle_swaprate+0x5d1/0x64b mm/swapfile.c:3755 mem_cgroup_try_charge_delay+0x67/0xa0 mm/memcontrol.c:6502 shmem_getpage_gfp+0x7f4/0x2a10 mm/shmem.c:1862 shmem_fault+0x204/0x820 mm/shmem.c:2062 __do_fault+0x10d/0x520 mm/memory.c:3450 do_read_fault mm/memory.c:3846 [inline] do_fault mm/memory.c:3975 [inline] handle_pte_fault mm/memory.c:4215 [inline] __handle_mm_fault+0x28a7/0x3c90 mm/memory.c:4345 handle_mm_fault+0x1a5/0x660 mm/memory.c:4382 faultin_page mm/gup.c:879 [inline] __get_user_pages+0x7ab/0x1870 mm/gup.c:1098 populate_vma_page_range+0x1fd/0x290 mm/gup.c:1430 __mm_populate+0x1e8/0x350 mm/gup.c:1478 mm_populate include/linux/mm.h:2562 [inline] vm_mmap_pgoff+0x1e2/0x200 mm/util.c:511 ksys_mmap_pgoff+0x457/0x5b0 mm/mmap.c:1595 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 RIP: 0033:0x45c889 Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fa3bd0bfc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 00007fa3bd0c06d4 RCX: 000000000045c889 RDX: 000000000000a601 RSI: 0000000000400000 RDI: 0000000020200000 RBP: 000000000076bf00 R08: 0000000000000003 R09: 0000000000000000 R10: 0000000000002012 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000738 R14: 00000000004c9fcd R15: 000000000076bf0c Allocated by task 1: save_stack+0x1b/0x40 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] __kasan_kmalloc mm/kasan/common.c:495 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:468 kmem_cache_alloc_trace+0x153/0x7d0 mm/slab.c:3551 kmalloc include/linux/slab.h:555 [inline] kzalloc include/linux/slab.h:669 [inline] cgroup1_root_to_use kernel/cgroup/cgroup-v1.c:1183 [inline] cgroup1_get_tree+0xcfd/0x13b6 kernel/cgroup/cgroup-v1.c:1207 vfs_get_tree+0x89/0x2f0 fs/super.c:1547 do_new_mount fs/namespace.c:2816 [inline] do_mount+0x1306/0x1b30 fs/namespace.c:3141 __do_sys_mount fs/namespace.c:3350 [inline] __se_sys_mount fs/namespace.c:3327 [inline] __x64_sys_mount+0x18f/0x230 fs/namespace.c:3327 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 Freed by task 2683: save_stack+0x1b/0x40 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] kasan_set_free_info mm/kasan/common.c:317 [inline] __kasan_slab_free+0xf7/0x140 mm/kasan/common.c:456 __cache_free mm/slab.c:3426 [inline] kfree+0x109/0x2b0 mm/slab.c:3757 cgroup_free_root kernel/cgroup/cgroup.c:1311 [inline] cgroup_destroy_root kernel/cgroup/cgroup.c:1353 [inline] css_free_rwork_fn+0x8e6/0xce0 kernel/cgroup/cgroup.c:4980 process_one_work+0x965/0x16a0 kernel/workqueue.c:2268 worker_thread+0x96/0xe20 kernel/workqueue.c:2414 kthread+0x388/0x470 kernel/kthread.c:268 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 The buggy address belongs to the object at ffff88809390c000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 3288 bytes inside of 8192-byte region [ffff88809390c000, ffff88809390e000) The buggy address belongs to the page: page:ffffea00024e4300 refcount:1 mapcount:0 mapping:0000000030911156 index:0x0 head:ffffea00024e4300 order:2 compound_mapcount:0 compound_pincount:0 flags: 0xfffe0000010200(slab|head) raw: 00fffe0000010200 ffffea00024e3608 ffffea00024e4d08 ffff8880aa0021c0 raw: 0000000000000000 ffff88809390c000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809390cb80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809390cc00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88809390cc80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88809390cd00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88809390cd80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================