================================================================== BUG: KASAN: use-after-free in ipv6_gso_pull_exthdrs+0x57a/0x5f0 net/ipv6/ip6_offload.c:45 Read of size 1 at addr ffff8801bcc1b369 by task syz-executor7/13421 CPU: 0 PID: 13421 Comm: syz-executor7 Not tainted 4.18.0-rc3+ #1 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+0x1c9/0x2b4 lib/dump_stack.c:113 print_address_description+0x6c/0x20b mm/kasan/report.c:256 syz-executor5 (13420) used greatest stack depth: 13832 bytes left kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:412 __asan_report_load1_noabort+0x14/0x20 mm/kasan/report.c:430 ipv6_gso_pull_exthdrs+0x57a/0x5f0 net/ipv6/ip6_offload.c:45 ipv6_gso_segment+0x37a/0x11e0 net/ipv6/ip6_offload.c:87 skb_mac_gso_segment+0x3b5/0x740 net/core/dev.c:2792 nsh_gso_segment+0x470/0xb40 net/nsh/nsh.c:111 skb_mac_gso_segment+0x3b5/0x740 net/core/dev.c:2792 __skb_gso_segment+0x3c3/0x880 net/core/dev.c:2865 skb_gso_segment include/linux/netdevice.h:4099 [inline] validate_xmit_skb+0x640/0xf30 net/core/dev.c:3104 __dev_queue_xmit+0xc14/0x3910 net/core/dev.c:3561 dev_queue_xmit+0x17/0x20 net/core/dev.c:3602 packet_snd net/packet/af_packet.c:2919 [inline] packet_sendmsg+0x428e/0x6130 net/packet/af_packet.c:2944 sock_sendmsg_nosec net/socket.c:641 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:651 __sys_sendto+0x3d7/0x670 net/socket.c:1797 __do_sys_sendto net/socket.c:1809 [inline] __se_sys_sendto net/socket.c:1805 [inline] __x64_sys_sendto+0xe1/0x1a0 net/socket.c:1805 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x455ba9 Code: 1d ba 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 b9 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f59aa917c68 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007f59aa9186d4 RCX: 0000000000455ba9 RDX: 0000000000000012 RSI: 0000000020000000 RDI: 0000000000000013 RBP: 000000000072bea0 R08: 00000000200000c0 R09: 000000000000001c R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000004c11b0 R14: 00000000004d1358 R15: 0000000000000000 Allocated by task 6653: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc4/0xe0 mm/kasan/kasan.c:553 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:490 kmem_cache_alloc+0x12e/0x760 mm/slab.c:3554 getname_flags+0xd0/0x5a0 fs/namei.c:140 getname+0x19/0x20 fs/namei.c:211 do_sys_open+0x3a2/0x760 fs/open.c:1095 __do_sys_open fs/open.c:1119 [inline] __se_sys_open fs/open.c:1114 [inline] __x64_sys_open+0x7e/0xc0 fs/open.c:1114 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 6653: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kmem_cache_free+0x86/0x2d0 mm/slab.c:3756 putname+0xf2/0x130 fs/namei.c:261 do_sys_open+0x569/0x760 fs/open.c:1110 __do_sys_open fs/open.c:1119 [inline] __se_sys_open fs/open.c:1114 [inline] __x64_sys_open+0x7e/0xc0 fs/open.c:1114 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 ffff8801bcc1aec0 which belongs to the cache names_cache of size 4096 The buggy address is located 1193 bytes inside of 4096-byte region [ffff8801bcc1aec0, ffff8801bcc1bec0) The buggy address belongs to the page: page:ffffea0006f30680 count:1 mapcount:0 mapping:ffff8801da987dc0 index:0x0 compound_mapcount: 0 flags: 0x2fffc0000008100(slab|head) raw: 02fffc0000008100 ffffea00065ef688 ffffea0006660f88 ffff8801da987dc0 raw: 0000000000000000 ffff8801bcc1aec0 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801bcc1b200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801bcc1b280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801bcc1b300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801bcc1b380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801bcc1b400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================