x86/PAT: syz-executor.4:12986 map pfn RAM range req write-combining for [mem 0x1e2800000-0x1e2802fff], got write-back ================================================================== BUG: KASAN: use-after-free in _decode_session6+0xd2d/0x13d0 net/ipv6/xfrm6_policy.c:136 Read of size 1 at addr ffff88809fbe7812 by task syz-executor.5/12991 CPU: 1 PID: 12991 Comm: syz-executor.5 Not tainted 4.14.180-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x13e/0x194 lib/dump_stack.c:58 x86/PAT: syz-executor.4:12994 map pfn RAM range req write-combining for [mem 0x1e0700000-0x1e0702fff], got write-back print_address_description.cold+0x7c/0x1e2 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report mm/kasan/report.c:409 [inline] kasan_report.cold+0xa9/0x2ae mm/kasan/report.c:393 _decode_session6+0xd2d/0x13d0 net/ipv6/xfrm6_policy.c:136 __xfrm_decode_session+0x5a/0x110 net/xfrm/xfrm_policy.c:2247 xfrm_decode_session include/net/xfrm.h:1174 [inline] vti_tunnel_xmit+0x135/0x16c0 net/ipv4/ip_vti.c:327 __netdev_start_xmit include/linux/netdevice.h:4039 [inline] netdev_start_xmit include/linux/netdevice.h:4048 [inline] xmit_one net/core/dev.c:3009 [inline] dev_hard_start_xmit+0x186/0x890 net/core/dev.c:3025 sch_direct_xmit+0x25f/0x510 net/sched/sch_generic.c:186 qdisc_restart net/sched/sch_generic.c:249 [inline] __qdisc_run+0x1b6/0xde0 net/sched/sch_generic.c:257 __dev_xmit_skb net/core/dev.c:3235 [inline] __dev_queue_xmit+0x1573/0x25c0 net/core/dev.c:3493 neigh_output include/net/neighbour.h:500 [inline] ip6_finish_output2+0x992/0x2150 net/ipv6/ip6_output.c:120 ip6_finish_output+0x4d9/0xaf0 net/ipv6/ip6_output.c:154 NF_HOOK_COND include/linux/netfilter.h:239 [inline] ip6_output+0x1c9/0x650 net/ipv6/ip6_output.c:171 dst_output include/net/dst.h:462 [inline] ip6_local_out+0x93/0x170 net/ipv6/output_core.c:178 ip6_send_skb+0x9b/0x2f0 net/ipv6/ip6_output.c:1688 udp_v6_send_skb+0x4f3/0xf20 net/ipv6/udp.c:1081 udpv6_sendmsg+0x1eb9/0x2610 net/ipv6/udp.c:1353 inet_sendmsg+0x116/0x4d0 net/ipv4/af_inet.c:762 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xc5/0x100 net/socket.c:656 ___sys_sendmsg+0x349/0x840 net/socket.c:2062 __sys_sendmmsg+0x129/0x330 net/socket.c:2152 SYSC_sendmmsg net/socket.c:2183 [inline] SyS_sendmmsg+0x2f/0x50 net/socket.c:2178 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x45c829 RSP: 002b:00007f8e6e013c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 00000000004fc3a0 RCX: 000000000045c829 RDX: 00000000000001b1 RSI: 00000000200010c0 RDI: 0000000000000006 RBP: 000000000078c0e0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000008df R14: 00000000004cb835 R15: 00007f8e6e0146d4 Allocated by task 6840: save_stack+0x32/0xa0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc mm/kasan/kasan.c:551 [inline] kasan_kmalloc+0xbf/0xe0 mm/kasan/kasan.c:529 __do_kmalloc mm/slab.c:3720 [inline] __kmalloc+0x15b/0x7c0 mm/slab.c:3729 kmalloc include/linux/slab.h:493 [inline] sock_kmalloc net/core/sock.c:1982 [inline] sock_kmalloc+0x75/0xc0 net/core/sock.c:1973 hash_alloc_result.part.0+0x94/0x110 crypto/algif_hash.c:46 hash_alloc_result crypto/algif_hash.c:65 [inline] hash_recvmsg+0x50e/0x880 crypto/algif_hash.c:206 ___sys_recvmsg+0x21f/0x4d0 net/socket.c:2221 __sys_recvmmsg+0x1f3/0x620 net/socket.c:2329 SYSC_recvmmsg net/socket.c:2405 [inline] SyS_recvmmsg+0x125/0x140 net/socket.c:2394 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 6840: save_stack+0x32/0xa0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x75/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kfree+0xcb/0x260 mm/slab.c:3815 __sock_kfree_s net/core/sock.c:2001 [inline] sock_kzfree_s+0x24/0x50 net/core/sock.c:2015 hash_free_result crypto/algif_hash.c:64 [inline] hash_recvmsg+0x3c8/0x880 crypto/algif_hash.c:231 ___sys_recvmsg+0x21f/0x4d0 net/socket.c:2221 __sys_recvmmsg+0x1f3/0x620 net/socket.c:2329 SYSC_recvmmsg net/socket.c:2405 [inline] SyS_recvmmsg+0x125/0x140 net/socket.c:2394 do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 The buggy address belongs to the object at ffff88809fbe7800 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 18 bytes inside of 32-byte region [ffff88809fbe7800, ffff88809fbe7820) The buggy address belongs to the page: page:ffffea00027ef9c0 count:1 mapcount:0 mapping:ffff88809fbe7000 index:0xffff88809fbe7fc1 flags: 0xfffe0000000100(slab) raw: 00fffe0000000100 ffff88809fbe7000 ffff88809fbe7fc1 0000000100000028 raw: ffffea0002a10c60 ffffea000241b4a0 ffff88812fe541c0 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809fbe7700: 05 fc fc fc fc fc fc fc 00 01 fc fc fc fc fc fc ffff88809fbe7780: fb fb fb fb fc fc fc fc 00 00 01 fc fc fc fc fc >ffff88809fbe7800: fb fb fb fb fc fc fc fc 00 00 01 fc fc fc fc fc ^ ffff88809fbe7880: fb fb fb fb fc fc fc fc 05 fc fc fc fc fc fc fc ffff88809fbe7900: 00 00 00 00 fc fc fc fc fb fb fb fb fc fc fc fc ==================================================================