================================================================== BUG: KASAN: slab-out-of-bounds in suffix_kstrtoint.constprop.0+0x214/0x250 fs/xfs/xfs_super.c:1083 Read of size 1 at addr ffff88809a7112ff by task syz-executor.2/15983 CPU: 1 PID: 15983 Comm: syz-executor.2 Not tainted 5.5.0-next-20200207-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/0x32 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:641 __asan_report_load1_noabort+0x14/0x20 mm/kasan/generic_report.c:132 suffix_kstrtoint.constprop.0+0x214/0x250 fs/xfs/xfs_super.c:1083 xfs_fc_parse_param+0x133/0xcd0 fs/xfs/xfs_super.c:1143 vfs_parse_fs_param+0x2b4/0x610 fs/fs_context.c:147 vfs_parse_fs_string+0x10a/0x170 fs/fs_context.c:191 generic_parse_monolithic+0x181/0x200 fs/fs_context.c:231 parse_monolithic_mount_data+0x69/0x90 fs/fs_context.c:679 do_new_mount fs/namespace.c:2818 [inline] do_mount+0x1310/0x1b50 fs/namespace.c:3107 __do_sys_mount fs/namespace.c:3316 [inline] __se_sys_mount fs/namespace.c:3293 [inline] __x64_sys_mount+0x192/0x230 fs/namespace.c:3293 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45ddea Code: b8 a6 00 00 00 0f 05 48 3d 01 f0 ff ff 0f 83 4d 8c 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 2a 8c fb ff c3 66 0f 1f 84 00 00 00 00 00 RSP: 002b:00007f4321cf0a68 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f4321cf16d4 RCX: 000000000045ddea RDX: 00007f4321cf0ae0 RSI: 0000000020000080 RDI: 00007f4321cf0b00 RBP: 000000000075bf20 R08: 00007f4321cf0b40 R09: 00007f4321cf0ae0 R10: 0000000000000000 R11: 0000000000000202 R12: 00000000ffffffff R13: 0000000000000bb5 R14: 00000000004cc92a R15: 000000000075bf2c Allocated by task 2809: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc mm/kasan/common.c:515 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:488 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:529 kmem_cache_alloc_trace+0x158/0x790 mm/slab.c:3551 kmalloc include/linux/slab.h:555 [inline] kzalloc include/linux/slab.h:669 [inline] nsim_fib6_rt_nh_add+0x51/0x2a0 drivers/net/netdevsim/fib.c:430 nsim_fib6_rt_create drivers/net/netdevsim/fib.c:482 [inline] nsim_fib6_rt_insert drivers/net/netdevsim/fib.c:652 [inline] nsim_fib6_event drivers/net/netdevsim/fib.c:719 [inline] nsim_fib_event drivers/net/netdevsim/fib.c:744 [inline] nsim_fib_event_nb+0x99f/0x2670 drivers/net/netdevsim/fib.c:772 notifier_call_chain+0xc2/0x230 kernel/notifier.c:83 __atomic_notifier_call_chain+0xa6/0x1a0 kernel/notifier.c:173 atomic_notifier_call_chain+0x2e/0x40 kernel/notifier.c:183 call_fib_notifiers+0x173/0x2a0 net/core/fib_notifier.c:35 call_fib6_notifiers+0x4b/0x60 net/ipv6/fib6_notifier.c:22 call_fib6_entry_notifiers+0xfb/0x150 net/ipv6/ip6_fib.c:399 fib6_add_rt2node net/ipv6/ip6_fib.c:1216 [inline] fib6_add+0x20cd/0x3ec0 net/ipv6/ip6_fib.c:1471 __ip6_ins_rt+0x54/0x80 net/ipv6/route.c:1315 ip6_ins_rt+0x96/0xd0 net/ipv6/route.c:1325 __ipv6_ifa_notify+0x6f1/0xb80 net/ipv6/addrconf.c:5974 ipv6_ifa_notify+0xf7/0x200 net/ipv6/addrconf.c:6014 addrconf_dad_completed+0xeb/0xbb0 net/ipv6/addrconf.c:4158 addrconf_dad_work+0x7cc/0x11d0 net/ipv6/addrconf.c:4107 process_one_work+0xa05/0x17a0 kernel/workqueue.c:2264 worker_thread+0x98/0xe40 kernel/workqueue.c:2410 kthread+0x361/0x430 kernel/kthread.c:255 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352 Freed by task 9455: 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:337 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:476 kasan_slab_free+0xe/0x10 mm/kasan/common.c:485 __cache_free mm/slab.c:3426 [inline] kfree+0x10a/0x2c0 mm/slab.c:3757 tomoyo_init_log+0x15a9/0x2070 security/tomoyo/audit.c:292 tomoyo_supervisor+0x2dd/0xe60 security/tomoyo/common.c:2097 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:816 search_binary_handler+0x71/0x570 fs/exec.c:1649 exec_binprm fs/exec.c:1705 [inline] __do_execve_file.isra.0+0x12fc/0x2270 fs/exec.c:1825 do_execveat_common fs/exec.c:1871 [inline] do_execve fs/exec.c:1888 [inline] __do_sys_execve fs/exec.c:1964 [inline] __se_sys_execve fs/exec.c:1959 [inline] __x64_sys_execve+0x8f/0xc0 fs/exec.c:1959 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 ffff88809a7112c0 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 31 bytes to the right of 32-byte region [ffff88809a7112c0, ffff88809a7112e0) The buggy address belongs to the page: page:ffffea000269c440 refcount:1 mapcount:0 mapping:ffff8880aa4001c0 index:0xffff88809a711fc1 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea00028a7688 ffffea0002916c08 ffff8880aa4001c0 raw: ffff88809a711fc1 ffff88809a711000 000000010000003f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809a711180: 00 04 fc fc fc fc fc fc fb fb fb fb fc fc fc fc ffff88809a711200: 00 00 00 fc fc fc fc fc fb fb fb fb fc fc fc fc >ffff88809a711280: 00 00 fc fc fc fc fc fc 00 00 00 fc fc fc fc fc ^ ffff88809a711300: 01 fc fc fc fc fc fc fc fb fb fb fb fc fc fc fc ffff88809a711380: 00 01 fc fc fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================