================================================================== BUG: KASAN: slab-out-of-bounds in cgroup_file_notify+0x11b/0x160 kernel/cgroup/cgroup.c:4088 Read of size 8 at addr ffff88808f65f4c8 by task syz-executor.1/8396 CPU: 0 PID: 8396 Comm: syz-executor.1 Not tainted 5.6.0-rc2-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+0x12d/0x187 lib/dump_stack.c:118 print_address_description.constprop.8.cold.10+0x9/0x31d mm/kasan/report.c:374 __kasan_report.cold.11+0x1b/0x32 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:641 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:135 cgroup_file_notify+0x11b/0x160 kernel/cgroup/cgroup.c:4088 hugetlb_event mm/hugetlb_cgroup.c:224 [inline] __hugetlb_cgroup_charge_cgroup+0x487/0xa70 mm/hugetlb_cgroup.c:262 hugetlb_cgroup_charge_cgroup_rsvd+0xe/0x10 mm/hugetlb_cgroup.c:286 hugetlb_reserve_pages+0x24b/0xb00 mm/hugetlb.c:4779 hugetlb_file_setup+0x22d/0x5a2 fs/hugetlbfs/inode.c:1423 newseg+0x392/0xd90 ipc/shm.c:652 ipcget_new ipc/util.c:344 [inline] ipcget+0xf6/0xb10 ipc/util.c:643 ksys_shmget ipc/shm.c:742 [inline] __do_sys_shmget ipc/shm.c:747 [inline] __se_sys_shmget ipc/shm.c:745 [inline] __x64_sys_shmget+0x13b/0x1c0 ipc/shm.c:745 do_syscall_64+0xca/0x5f0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45c479 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:00007f19780cdc78 EFLAGS: 00000246 ORIG_RAX: 000000000000001d RAX: ffffffffffffffda RBX: 00007f19780ce6d4 RCX: 000000000045c479 RDX: 0000000000004800 RSI: fffffffffeffffff RDI: 0000000000000000 RBP: 000000000076bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000020ffc000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000b5a R14: 00000000004cd4ef R15: 000000000076bf2c Allocated by task 8358: save_stack+0x21/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc.constprop.17+0xc7/0xd0 mm/kasan/common.c:515 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:529 kmem_cache_alloc_trace+0x15b/0x780 mm/slab.c:3551 kmalloc include/linux/slab.h:555 [inline] kzalloc include/linux/slab.h:669 [inline] hugetlb_cgroup_css_alloc+0x51/0x2d0 mm/hugetlb_cgroup.c:138 css_create kernel/cgroup/cgroup.c:5093 [inline] cgroup_apply_control_enable+0x334/0xbc0 kernel/cgroup/cgroup.c:3057 cgroup_mkdir+0x4bd/0xef0 kernel/cgroup/cgroup.c:5323 kernfs_iop_mkdir+0x13a/0x1c0 fs/kernfs/dir.c:1127 vfs_mkdir+0x37f/0x5f0 fs/namei.c:3889 do_mkdirat+0x1c2/0x220 fs/namei.c:3912 __do_sys_mkdir fs/namei.c:3928 [inline] __se_sys_mkdir fs/namei.c:3926 [inline] __x64_sys_mkdir+0x57/0x80 fs/namei.c:3926 do_syscall_64+0xca/0x5f0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff88808f65f000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 1224 bytes inside of 2048-byte region [ffff88808f65f000, ffff88808f65f800) The buggy address belongs to the page: page:ffffea00023d97c0 refcount:1 mapcount:0 mapping:0000000097cd2b7e index:0x0 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea00027f2d88 ffffea00023abd48 ffff8880aa400e00 raw: 0000000000000000 ffff88808f65f000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808f65f380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88808f65f400: 00 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc >ffff88808f65f480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88808f65f500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808f65f580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================