================================================================== BUG: KASAN: use-after-free in _decode_session6+0xf56/0x1370 net/ipv6/xfrm6_policy.c:137 Read of size 1 at addr ffff88808cf50eb7 by task syz-executor.0/372 CPU: 0 PID: 372 Comm: syz-executor.0 Not tainted 4.19.211-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+0x1fc/0x2ef lib/dump_stack.c:118 print_address_description.cold+0x54/0x219 mm/kasan/report.c:256 kasan_report_error.cold+0x8a/0x1b9 mm/kasan/report.c:354 kasan_report mm/kasan/report.c:412 [inline] __asan_report_load1_noabort+0x88/0x90 mm/kasan/report.c:430 _decode_session6+0xf56/0x1370 net/ipv6/xfrm6_policy.c:137 __xfrm_decode_session+0x5a/0x130 net/xfrm/xfrm_policy.c:2299 xfrm_decode_session include/net/xfrm.h:1238 [inline] vti6_tnl_xmit+0x42b/0x1c80 net/ipv6/ip6_vti.c:569 __netdev_start_xmit include/linux/netdevice.h:4349 [inline] netdev_start_xmit include/linux/netdevice.h:4363 [inline] xmit_one net/core/dev.c:3256 [inline] dev_hard_start_xmit+0x1a8/0x920 net/core/dev.c:3272 sch_direct_xmit+0x2d6/0xf70 net/sched/sch_generic.c:332 qdisc_restart net/sched/sch_generic.c:395 [inline] __qdisc_run+0x4d0/0x1640 net/sched/sch_generic.c:403 __dev_xmit_skb net/core/dev.c:3500 [inline] __dev_queue_xmit+0x1518/0x2e00 net/core/dev.c:3807 neigh_output include/net/neighbour.h:501 [inline] ip6_finish_output2+0x113d/0x2290 net/ipv6/ip6_output.c:120 ip6_fragment+0x29bb/0x34e0 net/ipv6/ip6_output.c:761 ip6_finish_output+0x9da/0x10f0 net/ipv6/ip6_output.c:190 NF_HOOK_COND include/linux/netfilter.h:278 [inline] ip6_output+0x205/0x770 net/ipv6/ip6_output.c:209 dst_output include/net/dst.h:455 [inline] ip6_local_out+0xaf/0x170 net/ipv6/output_core.c:160 ip6_send_skb+0xb3/0x300 net/ipv6/ip6_output.c:1741 udp_v6_send_skb+0x7d7/0x1610 net/ipv6/udp.c:1114 udpv6_sendmsg+0x236b/0x2ae0 net/ipv6/udp.c:1411 inet_sendmsg+0x132/0x5a0 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xc3/0x120 net/socket.c:661 ___sys_sendmsg+0x3b3/0x8e0 net/socket.c:2227 __sys_sendmmsg+0x195/0x470 net/socket.c:2322 __do_sys_sendmmsg net/socket.c:2351 [inline] __se_sys_sendmmsg net/socket.c:2348 [inline] __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2348 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7fefe54bfe99 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fefe3e35168 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 00007fefe55d2f60 RCX: 00007fefe54bfe99 RDX: 0000000000000001 RSI: 00000000200030c0 RDI: 0000000000000003 RBP: 00007fefe5519ff1 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe7f8ba80f R14: 00007fefe3e35300 R15: 0000000000022000 Allocated by task 30931: __do_kmalloc_node mm/slab.c:3689 [inline] __kmalloc_node_track_caller+0x4c/0x70 mm/slab.c:3703 __kmalloc_reserve net/core/skbuff.c:137 [inline] __alloc_skb+0xae/0x560 net/core/skbuff.c:205 alloc_skb include/linux/skbuff.h:995 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1197 [inline] netlink_sendmsg+0x9f6/0xc50 net/netlink/af_netlink.c:1892 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xc3/0x120 net/socket.c:661 ___sys_sendmsg+0x3b3/0x8e0 net/socket.c:2227 __sys_sendmmsg+0x195/0x470 net/socket.c:2322 __do_sys_sendmmsg net/socket.c:2351 [inline] __se_sys_sendmmsg net/socket.c:2348 [inline] __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2348 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 30931: __cache_free mm/slab.c:3503 [inline] kfree+0xcc/0x210 mm/slab.c:3822 skb_free_head net/core/skbuff.c:563 [inline] skb_release_data+0x6de/0x920 net/core/skbuff.c:583 skb_release_all net/core/skbuff.c:640 [inline] __kfree_skb net/core/skbuff.c:654 [inline] consume_skb+0x113/0x3d0 net/core/skbuff.c:714 netlink_unicast_kernel net/netlink/af_netlink.c:1326 [inline] netlink_unicast+0x4dd/0x690 net/netlink/af_netlink.c:1351 netlink_sendmsg+0x6c3/0xc50 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xc3/0x120 net/socket.c:661 ___sys_sendmsg+0x3b3/0x8e0 net/socket.c:2227 __sys_sendmmsg+0x195/0x470 net/socket.c:2322 __do_sys_sendmmsg net/socket.c:2351 [inline] __se_sys_sendmmsg net/socket.c:2348 [inline] __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2348 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 kvm: vcpu 0: requested 128 ns lapic timer period limited to 200000 ns entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88808cf50cc0 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 503 bytes inside of 512-byte region [ffff88808cf50cc0, ffff88808cf50ec0) The buggy address belongs to the page: page:ffffea000233d400 count:1 mapcount:0 mapping:ffff88813bff0940 index:0xffff88808cf50cc0 flags: 0xfff00000000100(slab) raw: 00fff00000000100 ffffea000243cf88 ffffea00014ed048 ffff88813bff0940 raw: ffff88808cf50cc0 ffff88808cf50040 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808cf50d80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808cf50e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88808cf50e80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff88808cf50f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88808cf50f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================