================================================================== BUG: KASAN: use-after-free in ipv6_gso_pull_exthdrs+0x57a/0x5f0 net/ipv6/ip6_offload.c:45 Read of size 1 at addr ffff8801cf344189 by task syz-executor4/14330 CPU: 1 PID: 14330 Comm: syz-executor4 Not tainted 4.18.0-rc3+ #58 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 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:2965 nsh_gso_segment+0x470/0xb40 net/nsh/nsh.c:111 skb_mac_gso_segment+0x3b5/0x740 net/core/dev.c:2965 __skb_gso_segment+0x3c3/0x880 net/core/dev.c:3038 skb_gso_segment include/linux/netdevice.h:4227 [inline] validate_xmit_skb+0x640/0xf30 net/core/dev.c:3277 validate_xmit_skb_list+0xbf/0x120 net/core/dev.c:3327 sch_direct_xmit+0x30e/0x1140 net/sched/sch_generic.c:312 qdisc_restart net/sched/sch_generic.c:390 [inline] __qdisc_run+0x619/0x19f0 net/sched/sch_generic.c:398 qdisc_run include/net/pkt_sched.h:120 [inline] __dev_xmit_skb net/core/dev.c:3402 [inline] __dev_queue_xmit+0x1419/0x3790 net/core/dev.c:3761 dev_queue_xmit+0x17/0x20 net/core/dev.c:3826 packet_snd net/packet/af_packet.c:2923 [inline] packet_sendmsg+0x4404/0x6300 net/packet/af_packet.c:2948 sock_sendmsg_nosec net/socket.c:641 [inline] sock_sendmsg+0xd5/0x120 net/socket.c:651 ___sys_sendmsg+0x7fd/0x930 net/socket.c:2125 __sys_sendmsg+0x11d/0x290 net/socket.c:2163 __do_sys_sendmsg net/socket.c:2172 [inline] __se_sys_sendmsg net/socket.c:2170 [inline] __x64_sys_sendmsg+0x78/0xb0 net/socket.c:2170 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x455ab9 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:00007f4c86befc68 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f4c86bf06d4 RCX: 0000000000455ab9 RDX: 0000000000000000 RSI: 0000000020000480 RDI: 0000000000000014 RBP: 000000000072bea0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000004c1066 R14: 00000000004d16c8 R15: 0000000000000000 Allocated by task 6598: 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 dup_mmap kernel/fork.c:458 [inline] dup_mm kernel/fork.c:1243 [inline] copy_mm kernel/fork.c:1297 [inline] copy_process.part.40+0x4581/0x7220 kernel/fork.c:1803 copy_process kernel/fork.c:1616 [inline] _do_fork+0x291/0x12a0 kernel/fork.c:2099 __do_sys_clone kernel/fork.c:2206 [inline] __se_sys_clone kernel/fork.c:2200 [inline] __x64_sys_clone+0xbf/0x150 kernel/fork.c:2200 do_syscall_64+0x1b9/0x820 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 13838: 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 remove_vma+0x164/0x1b0 mm/mmap.c:185 exit_mmap+0x365/0x5b0 mm/mmap.c:3116 __mmput kernel/fork.c:970 [inline] mmput+0x265/0x620 kernel/fork.c:991 exec_mmap fs/exec.c:1044 [inline] flush_old_exec+0xbaf/0x2100 fs/exec.c:1276 load_elf_binary+0xa33/0x5610 fs/binfmt_elf.c:869 search_binary_handler+0x17d/0x570 fs/exec.c:1653 exec_binprm fs/exec.c:1695 [inline] __do_execve_file.isra.36+0x171d/0x2730 fs/exec.c:1819 do_execveat_common fs/exec.c:1866 [inline] do_execve fs/exec.c:1883 [inline] __do_sys_execve fs/exec.c:1964 [inline] __se_sys_execve fs/exec.c:1959 [inline] __x64_sys_execve+0x8f/0xc0 fs/exec.c:1959 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 ffff8801cf344108 which belongs to the cache vm_area_struct of size 200 The buggy address is located 129 bytes inside of 200-byte region [ffff8801cf344108, ffff8801cf3441d0) The buggy address belongs to the page: page:ffffea00073cd100 count:1 mapcount:0 mapping:ffff8801da97b840 index:0xffff8801cf344318 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffffea0006b5f388 ffffea00074b4c88 ffff8801da97b840 raw: ffff8801cf344318 ffff8801cf344000 000000010000000b 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801cf344080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc ffff8801cf344100: fc fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8801cf344180: fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc fc ^ ffff8801cf344200: fc fc fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8801cf344280: fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc fc ==================================================================