================================================================== 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 ffff8880a2e5b1bf by task syz-executor.1/19246 CPU: 0 PID: 19246 Comm: syz-executor.1 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+0x991/0xcd0 fs/xfs/xfs_super.c:1127 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:00007f2aa7e2ca68 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f2aa7e2d6d4 RCX: 000000000045ddea RDX: 00007f2aa7e2cae0 RSI: 0000000020000040 RDI: 00007f2aa7e2cb00 RBP: 000000000075bf20 R08: 00007f2aa7e2cb40 R09: 00007f2aa7e2cae0 R10: 0000000000000000 R11: 0000000000000202 R12: 00000000ffffffff R13: 0000000000000bb5 R14: 00000000004cc92a R15: 000000000075bf2c Allocated by task 9729: 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 __do_kmalloc mm/slab.c:3656 [inline] __kmalloc_track_caller+0x15f/0x760 mm/slab.c:3671 kstrdup+0x3a/0x70 mm/util.c:60 kstrdup_const+0x66/0x80 mm/util.c:82 __kernfs_new_node+0xb1/0x6e0 fs/kernfs/dir.c:623 kernfs_new_node+0x96/0x120 fs/kernfs/dir.c:689 kernfs_create_dir_ns+0x52/0x160 fs/kernfs/dir.c:1026 sysfs_create_dir_ns+0x131/0x2a0 fs/sysfs/dir.c:59 create_dir lib/kobject.c:89 [inline] kobject_add_internal+0x2d8/0x9a0 lib/kobject.c:255 kobject_add_varg lib/kobject.c:390 [inline] kobject_init_and_add+0x101/0x160 lib/kobject.c:473 rx_queue_add_kobject net/core/net-sysfs.c:928 [inline] net_rx_queue_update_kobjects+0x1b5/0x440 net/core/net-sysfs.c:961 register_queue_kobjects net/core/net-sysfs.c:1536 [inline] netdev_register_kobject+0x278/0x3b0 net/core/net-sysfs.c:1759 register_netdevice+0x4f4/0x1070 net/core/dev.c:9380 team_newlink+0x45/0x120 drivers/net/team/team.c:2184 __rtnl_newlink+0x109d/0x1790 net/core/rtnetlink.c:3319 rtnl_newlink+0x69/0xa0 net/core/rtnetlink.c:3377 rtnetlink_rcv_msg+0x45e/0xaf0 net/core/rtnetlink.c:5438 netlink_rcv_skb+0x177/0x450 net/netlink/af_netlink.c:2477 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:5456 netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline] netlink_unicast+0x59e/0x7e0 net/netlink/af_netlink.c:1328 netlink_sendmsg+0x91c/0xea0 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:672 __sys_sendto+0x262/0x380 net/socket.c:1998 __do_sys_sendto net/socket.c:2010 [inline] __se_sys_sendto net/socket.c:2006 [inline] __x64_sys_sendto+0xe1/0x1a0 net/socket.c:2006 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 5063: 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_check_open_permission+0x19e/0x3e0 security/tomoyo/file.c:786 tomoyo_file_open security/tomoyo/tomoyo.c:319 [inline] tomoyo_file_open+0xa9/0xd0 security/tomoyo/tomoyo.c:314 security_file_open+0x71/0x300 security/security.c:1529 do_dentry_open+0x365/0x1350 fs/open.c:784 vfs_open+0xa0/0xd0 fs/open.c:914 do_last fs/namei.c:3490 [inline] path_openat+0x12ee/0x33f0 fs/namei.c:3607 do_filp_open+0x192/0x260 fs/namei.c:3637 do_sys_openat2+0x5eb/0x7e0 fs/open.c:1149 do_sys_open+0xf2/0x180 fs/open.c:1165 ksys_open include/linux/syscalls.h:1386 [inline] __do_sys_open fs/open.c:1171 [inline] __se_sys_open fs/open.c:1169 [inline] __x64_sys_open+0x7e/0xc0 fs/open.c:1169 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 ffff8880a2e5b180 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 31 bytes to the right of 32-byte region [ffff8880a2e5b180, ffff8880a2e5b1a0) The buggy address belongs to the page: page:ffffea00028b96c0 refcount:1 mapcount:0 mapping:ffff8880aa4001c0 index:0xffff8880a2e5bfc1 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea000284a0c8 ffffea0002796a48 ffff8880aa4001c0 raw: ffff8880a2e5bfc1 ffff8880a2e5b000 000000010000003f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a2e5b080: 05 fc fc fc fc fc fc fc 05 fc fc fc fc fc fc fc ffff8880a2e5b100: 06 fc fc fc fc fc fc fc 05 fc fc fc fc fc fc fc >ffff8880a2e5b180: 05 fc fc fc fc fc fc fc 01 fc fc fc fc fc fc fc ^ ffff8880a2e5b200: 05 fc fc fc fc fc fc fc 05 fc fc fc fc fc fc fc ffff8880a2e5b280: 00 00 04 fc fc fc fc fc 05 fc fc fc fc fc fc fc ==================================================================