RBP: 000000000072bfa0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fe5b5b446d4 R13: 00000000004c5632 R14: 00000000004d8fb8 R15: 00000000ffffffff ip6_tunnel: ip6tnl1 xmit: Local address not yet configured! ================================================================== BUG: KASAN: slab-out-of-bounds in _copy_to_user+0x9a/0xc0 lib/usercopy.c:27 Read of size 337 at addr ffff8801c6677ffd by task syz-executor1/12424 CPU: 0 PID: 12424 Comm: syz-executor1 Not tainted 4.14.77+ #21 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xb9/0x11b lib/dump_stack.c:53 print_address_description+0x60/0x22b mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report.cold.6+0x11b/0x2dd mm/kasan/report.c:409 _copy_to_user+0x9a/0xc0 lib/usercopy.c:27 copy_to_user include/linux/uaccess.h:155 [inline] bpf_test_finish.isra.0+0xc8/0x190 net/bpf/test_run.c:59 bpf_prog_test_run_skb+0x4d0/0x8c0 net/bpf/test_run.c:144 bpf_prog_test_run kernel/bpf/syscall.c:1330 [inline] SYSC_bpf kernel/bpf/syscall.c:1602 [inline] SyS_bpf+0x79d/0x3640 kernel/bpf/syscall.c:1547 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x457569 RSP: 002b:00007f8f0d7e9c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457569 RDX: 0000000000000028 RSI: 0000000020000180 RDI: 000000000000000a RBP: 000000000072bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007f8f0d7ea6d4 R13: 00000000004bd892 R14: 00000000004cc208 R15: 00000000ffffffff Allocated by task 11654: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc.part.1+0x4f/0xd0 mm/kasan/kasan.c:551 slab_post_alloc_hook mm/slab.h:442 [inline] slab_alloc_node mm/slub.c:2723 [inline] slab_alloc mm/slub.c:2731 [inline] kmem_cache_alloc+0xe4/0x2b0 mm/slub.c:2736 getname_flags+0xc4/0x540 fs/namei.c:138 getname fs/namei.c:209 [inline] user_path_create fs/namei.c:3713 [inline] SYSC_symlinkat fs/namei.c:4187 [inline] SyS_symlinkat+0xb0/0x1e0 fs/namei.c:4174 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 11654: save_stack mm/kasan/kasan.c:447 [inline] set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0xac/0x190 mm/kasan/kasan.c:524 slab_free_hook mm/slub.c:1389 [inline] slab_free_freelist_hook mm/slub.c:1410 [inline] slab_free mm/slub.c:2966 [inline] kmem_cache_free+0x12d/0x350 mm/slub.c:2988 putname+0xcf/0x100 fs/namei.c:259 filename_create+0x1f5/0x450 fs/namei.c:3678 user_path_create fs/namei.c:3713 [inline] SYSC_symlinkat fs/namei.c:4187 [inline] SyS_symlinkat+0xc2/0x1e0 fs/namei.c:4174 warn_alloc_show_mem: 1 callbacks suppressed Mem-Info: active_anon:112257 inactive_anon:47302 isolated_anon:0 active_file:32575 inactive_file:17971 isolated_file:0 unevictable:0 dirty:243 writeback:0 unstable:0 slab_reclaimable:8632 slab_unreclaimable:63732 mapped:55358 shmem:3889 pagetables:11637 bounce:0 free:1279822 free_pcp:474 free_cma:0 Node 0 active_anon:449028kB inactive_anon:189208kB active_file:130300kB inactive_file:71884kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:221432kB dirty:972kB writeback:0kB shmem:15556kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no DMA32 free:3011420kB min:4684kB low:7692kB high:10700kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3145324kB managed:3012148kB mlocked:0kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:728kB local_pcp:700kB free_cma:0kB lowmem_reserve[]: 0 3505 3505 Normal free:2107868kB min:5588kB low:9176kB high:12764kB active_anon:449028kB inactive_anon:189208kB active_file:130300kB inactive_file:71884kB unevictable:0kB writepending:972kB present:4718592kB managed:3589240kB mlocked:0kB kernel_stack:18592kB pagetables:46548kB bounce:0kB free_pcp:1168kB local_pcp:724kB free_cma:0kB lowmem_reserve[]: 0 0 0 DMA32: 5*4kB (UM) 3*8kB (M) 3*16kB (M) 2*32kB (UM) 5*64kB (UM) 3*128kB (UM) 4*256kB (UM) 2*512kB (M) 2*1024kB (UM) 4*2048kB (UM) 732*4096kB (M) = 3011420kB Normal: 337*4kB (ME) 269*8kB (UME) 294*16kB (UME) 203*32kB (UME) 180*64kB (UME) 163*128kB (UME) 200*256kB (UME) 145*512kB (UE) 42*1024kB (U) 62*2048kB (UE) 431*4096kB (UM) = 2107884kB 54428 total pagecache pages 0 pages in swap cache Swap cache stats: add 0, delete 0, find 0/0 Free swap = 0kB Total swap = 0kB 1965979 pages RAM 0 pages HighMem/MovableOnly 315632 pages reserved SELinux: policydb magic number 0xa does not match expected magic number 0xf97cff8c SELinux: failed to load policy do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff8801c6676600 which belongs to the cache names_cache of size 4096 The buggy address is located 2557 bytes to the right of 4096-byte region [ffff8801c6676600, ffff8801c6677600) The buggy address belongs to the page: page:ffffea0007199c00 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 flags: 0x4000000000008100(slab|head) raw: 4000000000008100 0000000000000000 0000000000000000 0000000100070007 raw: dead000000000100 dead000000000200 ffff8801da97e000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801c6677e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc syz-executor4: vmalloc: allocation failure: 0 bytes, mode:0x14000c0(GFP_KERNEL), nodemask=(null) CPU: 1 PID: 12414 Comm: syz-executor4 Not tainted 4.14.77+ #21 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xb9/0x11b lib/dump_stack.c:53 warn_alloc.cold.35+0x9d/0x1b7 mm/page_alloc.c:3260 __vmalloc_node_range+0x390/0x680 mm/vmalloc.c:1776 __vmalloc_node mm/vmalloc.c:1805 [inline] __vmalloc_node_flags mm/vmalloc.c:1819 [inline] vmalloc+0x63/0x80 mm/vmalloc.c:1841 sel_write_load+0x1b5/0x1000 security/selinux/selinuxfs.c:495 __vfs_write+0xf4/0x5c0 fs/read_write.c:482 vfs_write+0x17f/0x4d0 fs/read_write.c:546 SYSC_write fs/read_write.c:593 [inline] SyS_write+0xc2/0x1a0 fs/read_write.c:585 do_syscall_64+0x19b/0x4b0 arch/x86/entry/common.c:289 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x457569 RSP: 002b:00007fe5b5b43c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000457569 RDX: 0000000000000000 RSI: 00000000200001c0 RDI: 000000000000000b RBP: 000000000072bfa0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fe5b5b446d4 R13: 00000000004c5632 R14: 00000000004d8fb8 R15: 00000000ffffffff ffff8801c6677f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8801c6677f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8801c6678000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801c6678080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== ip6_tunnel: ip6tnl1 xmit: Local address not yet configured!