================================================================== BUG: KASAN: slab-out-of-bounds in mpol_parse_str+0x87b/0xa50 mm/mempolicy.c:2922 Write of size 1 at addr ffff88809fae80bf by task syz-executor264/10393 CPU: 1 PID: 10393 Comm: syz-executor264 Not tainted 5.5.0-rc5-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+0x197/0x210 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 __kasan_report.cold+0x1b/0x41 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:639 __asan_report_store1_noabort+0x17/0x20 mm/kasan/generic_report.c:137 mpol_parse_str+0x87b/0xa50 mm/mempolicy.c:2922 shmem_parse_one+0x71e/0xa40 mm/shmem.c:3472 vfs_parse_fs_param+0x2ca/0x540 fs/fs_context.c:145 vfs_parse_fs_string+0x105/0x170 fs/fs_context.c:188 shmem_parse_options+0x168/0x250 mm/shmem.c:3522 parse_monolithic_mount_data+0x69/0x90 fs/fs_context.c:704 do_new_mount fs/namespace.c:2818 [inline] do_mount+0x1310/0x1b50 fs/namespace.c:3142 __do_sys_mount fs/namespace.c:3351 [inline] __se_sys_mount fs/namespace.c:3328 [inline] __x64_sys_mount+0x192/0x230 fs/namespace.c:3328 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x446a9a Code: b8 08 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 7d ae fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 5a ae fb ff c3 66 0f 1f 84 00 00 00 00 00 RSP: 002b:00007ffc02294f68 EFLAGS: 00000297 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007ffc02294f70 RCX: 0000000000446a9a RDX: 00007ffc02294f70 RSI: 00000000200000c0 RDI: 00007ffc02294f90 RBP: 0000000000000003 R08: 00007ffc02294fd0 R09: 000000000000000a R10: 0000000000000000 R11: 0000000000000297 R12: 00007ffc02294fd0 R13: 0000000000000004 R14: 0000000000000000 R15: 0000000000000000 Allocated by task 10225: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:486 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:527 __do_kmalloc mm/slab.c:3656 [inline] __kmalloc+0x163/0x770 mm/slab.c:3665 kmalloc include/linux/slab.h:561 [inline] tomoyo_add_entry security/tomoyo/common.c:2031 [inline] tomoyo_supervisor+0xb6b/0xef0 security/tomoyo/common.c:2103 tomoyo_audit_env_log security/tomoyo/environ.c:36 [inline] tomoyo_env_perm+0x18e/0x210 security/tomoyo/environ.c:63 tomoyo_environ security/tomoyo/domain.c:674 [inline] tomoyo_find_next_domain+0x1354/0x1f6c security/tomoyo/domain.c:881 tomoyo_bprm_check_security security/tomoyo/tomoyo.c:107 [inline] tomoyo_bprm_check_security+0x124/0x1a0 security/tomoyo/tomoyo.c:97 security_bprm_check+0x63/0xb0 security/security.c:784 search_binary_handler+0x71/0x570 fs/exec.c:1645 exec_binprm fs/exec.c:1701 [inline] __do_execve_file.isra.0+0x1329/0x22b0 fs/exec.c:1821 do_execveat_common fs/exec.c:1867 [inline] do_execve fs/exec.c:1884 [inline] __do_sys_execve fs/exec.c:1960 [inline] __se_sys_execve fs/exec.c:1955 [inline] __x64_sys_execve+0x8f/0xc0 fs/exec.c:1955 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 10225: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:335 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:474 kasan_slab_free+0xe/0x10 mm/kasan/common.c:483 __cache_free mm/slab.c:3426 [inline] kfree+0x10a/0x2c0 mm/slab.c:3757 tomoyo_add_entry security/tomoyo/common.c:2045 [inline] tomoyo_supervisor+0xc2c/0xef0 security/tomoyo/common.c:2103 tomoyo_audit_env_log security/tomoyo/environ.c:36 [inline] tomoyo_env_perm+0x18e/0x210 security/tomoyo/environ.c:63 tomoyo_environ security/tomoyo/domain.c:674 [inline] tomoyo_find_next_domain+0x1354/0x1f6c security/tomoyo/domain.c:881 tomoyo_bprm_check_security security/tomoyo/tomoyo.c:107 [inline] tomoyo_bprm_check_security+0x124/0x1a0 security/tomoyo/tomoyo.c:97 security_bprm_check+0x63/0xb0 security/security.c:784 search_binary_handler+0x71/0x570 fs/exec.c:1645 exec_binprm fs/exec.c:1701 [inline] __do_execve_file.isra.0+0x1329/0x22b0 fs/exec.c:1821 do_execveat_common fs/exec.c:1867 [inline] do_execve fs/exec.c:1884 [inline] __do_sys_execve fs/exec.c:1960 [inline] __se_sys_execve fs/exec.c:1955 [inline] __x64_sys_execve+0x8f/0xc0 fs/exec.c:1955 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88809fae8080 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 31 bytes to the right of 32-byte region [ffff88809fae8080, ffff88809fae80a0) The buggy address belongs to the page: page:ffffea00027eba00 refcount:1 mapcount:0 mapping:ffff8880aa4001c0 index:0xffff88809fae8fc1 raw: 00fffe0000000200 ffffea00029d8f08 ffffea00027e15c8 ffff8880aa4001c0 raw: ffff88809fae8fc1 ffff88809fae8000 0000000100000035 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809fae7f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88809fae8000: 00 00 fc fc fc fc fc fc fb fb fb fb fc fc fc fc >ffff88809fae8080: fb fb fb fb fc fc fc fc 00 05 fc fc fc fc fc fc ^ ffff88809fae8100: 00 00 00 fc fc fc fc fc fb fb fb fb fc fc fc fc ffff88809fae8180: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================