================================================================== 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 ffff8880a69223bf by task syz-executor.5/11688 CPU: 1 PID: 11688 Comm: syz-executor.5 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:00007fce83c8fa68 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007fce83c906d4 RCX: 000000000045ddea RDX: 00007fce83c8fae0 RSI: 00000000200002c0 RDI: 00007fce83c8fb00 RBP: 000000000075bf20 R08: 00007fce83c8fb40 R09: 00007fce83c8fae0 R10: 0000000000000000 R11: 0000000000000202 R12: 00000000ffffffff R13: 0000000000000bb5 R14: 00000000004cc92a R15: 000000000075bf2c Allocated by task 10218: 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] apparmor_sk_alloc_security+0x87/0x110 security/apparmor/lsm.c:776 security_sk_alloc+0x77/0xc0 security/security.c:2124 sk_prot_alloc+0xb8/0x310 net/core/sock.c:1606 sk_alloc+0x39/0xfd0 net/core/sock.c:1657 inet_create net/ipv4/af_inet.c:321 [inline] inet_create+0x363/0xe10 net/ipv4/af_inet.c:247 __sock_create+0x3ce/0x730 net/socket.c:1433 sock_create net/socket.c:1484 [inline] __sys_socket+0x103/0x220 net/socket.c:1526 __do_sys_socket net/socket.c:1535 [inline] __se_sys_socket net/socket.c:1533 [inline] __x64_sys_socket+0x73/0xb0 net/socket.c:1533 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 10218: 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 apparmor_sk_free_security+0x155/0x1d0 security/apparmor/lsm.c:795 security_sk_free+0x41/0x80 security/security.c:2129 sk_prot_free net/core/sock.c:1636 [inline] __sk_destruct+0x4cd/0x7f0 net/core/sock.c:1724 sk_destruct+0xd5/0x110 net/core/sock.c:1739 __sk_free+0xfb/0x3f0 net/core/sock.c:1750 sk_free+0x83/0xb0 net/core/sock.c:1761 sock_put include/net/sock.h:1719 [inline] tcp_close+0xc55/0x12b0 net/ipv4/tcp.c:2511 inet_release+0xed/0x200 net/ipv4/af_inet.c:427 __sock_release+0xce/0x280 net/socket.c:605 sock_close+0x1e/0x30 net/socket.c:1283 __fput+0x2ff/0x890 fs/file_table.c:280 ____fput+0x16/0x20 fs/file_table.c:313 task_work_run+0x145/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x316/0x380 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:195 [inline] syscall_return_slowpath arch/x86/entry/common.c:278 [inline] do_syscall_64+0x676/0x790 arch/x86/entry/common.c:304 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880a6922380 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 31 bytes to the right of 32-byte region [ffff8880a6922380, ffff8880a69223a0) The buggy address belongs to the page: page:ffffea00029a4880 refcount:1 mapcount:0 mapping:ffff8880aa4001c0 index:0xffff8880a6922fc1 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea000277f308 ffffea0002721308 ffff8880aa4001c0 raw: ffff8880a6922fc1 ffff8880a6922000 000000010000003f 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a6922280: 00 03 fc fc fc fc fc fc 00 03 fc fc fc fc fc fc ffff8880a6922300: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc >ffff8880a6922380: fb fb fb fb fc fc fc fc 01 fc fc fc fc fc fc fc ^ ffff8880a6922400: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ffff8880a6922480: fb fb fb fb fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================