R13: 00000000004bddd0 R14: 00000000004d7140 R15: 0000000000000004 ================================================================== BUG: KASAN: slab-out-of-bounds in string+0x298/0x2d0 lib/vsprintf.c:604 Read of size 1 at addr ffff8801cdaa5e3a by task syz-executor4/8665 CPU: 0 PID: 8665 Comm: syz-executor4 Not tainted 4.19.0-rc6-next-20181003+ #86 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+0x1d3/0x2c4 lib/dump_stack.c:113 print_address_description.cold.8+0x9/0x1ff mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.9+0x242/0x309 mm/kasan/report.c:412 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report.c:430 string+0x298/0x2d0 lib/vsprintf.c:604 vsnprintf+0x48e/0x1b60 lib/vsprintf.c:2298 vscnprintf+0x2d/0x80 lib/vsprintf.c:2401 vprintk_store+0x43/0x510 kernel/printk/printk.c:1846 vprintk_emit+0x1c1/0x930 kernel/printk/printk.c:1904 vprintk_default+0x28/0x30 kernel/printk/printk.c:1962 vprintk_func+0x7e/0x181 kernel/printk/printk_safe.c:398 printk+0xa7/0xcf kernel/printk/printk.c:1995 ovl_lookup_index.cold.14+0xe8/0x1f8 fs/overlayfs/namei.c:689 ovl_lookup+0x9f2/0x29c0 fs/overlayfs/namei.c:1022 __lookup_slow+0x2b5/0x540 fs/namei.c:1671 lookup_slow+0x57/0x80 fs/namei.c:1688 walk_component+0x92b/0x25b0 fs/namei.c:1810 lookup_last fs/namei.c:2273 [inline] path_lookupat.isra.43+0x212/0xc00 fs/namei.c:2318 filename_lookup+0x26a/0x520 fs/namei.c:2348 user_path_at_empty+0x40/0x50 fs/namei.c:2608 user_path_at include/linux/namei.h:57 [inline] path_setxattr+0xd6/0x230 fs/xattr.c:464 __do_sys_setxattr fs/xattr.c:484 [inline] __se_sys_setxattr fs/xattr.c:480 [inline] __x64_sys_setxattr+0xc4/0x150 fs/xattr.c:480 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x457579 Code: 1d b4 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 eb b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f6fa503bc78 EFLAGS: 00000246 ORIG_RAX: 00000000000000bc RAX: ffffffffffffffda RBX: 00007f6fa503bc90 RCX: 0000000000457579 RDX: 00000000200006c0 RSI: 0000000020000680 RDI: 0000000020000640 RBP: 000000000072bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000014 R11: 0000000000000246 R12: 00007f6fa503c6d4 R13: 00000000004bddd0 R14: 00000000004d7140 R15: 0000000000000004 Allocated by task 8665: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:553 __do_kmalloc mm/slab.c:3718 [inline] __kmalloc+0x14e/0x760 mm/slab.c:3727 kmalloc_array include/linux/slab.h:669 [inline] kcalloc include/linux/slab.h:680 [inline] ovl_get_index_name_fh+0x57/0x180 fs/overlayfs/namei.c:596 ovl_get_index_name+0x5c/0x80 fs/overlayfs/namei.c:631 ovl_lookup_index+0xe4/0x700 fs/overlayfs/namei.c:678 ovl_lookup+0x9f2/0x29c0 fs/overlayfs/namei.c:1022 __lookup_slow+0x2b5/0x540 fs/namei.c:1671 lookup_slow+0x57/0x80 fs/namei.c:1688 walk_component+0x92b/0x25b0 fs/namei.c:1810 lookup_last fs/namei.c:2273 [inline] path_lookupat.isra.43+0x212/0xc00 fs/namei.c:2318 filename_lookup+0x26a/0x520 fs/namei.c:2348 user_path_at_empty+0x40/0x50 fs/namei.c:2608 user_path_at include/linux/namei.h:57 [inline] path_setxattr+0xd6/0x230 fs/xattr.c:464 __do_sys_setxattr fs/xattr.c:484 [inline] __se_sys_setxattr fs/xattr.c:480 [inline] __x64_sys_setxattr+0xc4/0x150 fs/xattr.c:480 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 6103: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xcf/0x230 mm/slab.c:3813 __vunmap+0x335/0x460 mm/vmalloc.c:1532 vfree+0x8b/0x140 mm/vmalloc.c:1597 __do_replace+0x8c4/0xad0 net/ipv6/netfilter/ip6_tables.c:1113 do_replace net/ipv6/netfilter/ip6_tables.c:1160 [inline] do_ip6t_set_ctl+0x49c/0x64b net/ipv6/netfilter/ip6_tables.c:1684 nf_sockopt net/netfilter/nf_sockopt.c:106 [inline] nf_setsockopt+0x7d/0xd0 net/netfilter/nf_sockopt.c:115 ipv6_setsockopt+0x105/0x170 net/ipv6/ipv6_sockglue.c:945 tcp_setsockopt+0x93/0xe0 net/ipv4/tcp.c:3077 sock_common_setsockopt+0x9a/0xe0 net/core/sock.c:3038 __sys_setsockopt+0x1ba/0x3c0 net/socket.c:1903 __do_sys_setsockopt net/socket.c:1914 [inline] __se_sys_setsockopt net/socket.c:1911 [inline] __x64_sys_setsockopt+0xbe/0x150 net/socket.c:1911 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8801cdaa5e00 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 58 bytes inside of 64-byte region [ffff8801cdaa5e00, ffff8801cdaa5e40) The buggy address belongs to the page: page:ffffea000736a940 count:1 mapcount:0 mapping:ffff8801da800340 index:0x0 flags: 0x2fffc0000000200(slab) raw: 02fffc0000000200 ffffea0006eb5e88 ffffea0007369dc8 ffff8801da800340 raw: 0000000000000000 ffff8801cdaa5000 0000000100000020 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801cdaa5d00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8801cdaa5d80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8801cdaa5e00: 00 00 00 00 00 00 00 02 fc fc fc fc fc fc fc fc ^ ffff8801cdaa5e80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8801cdaa5f00: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================