================================================================== BUG: KASAN: slab-out-of-bounds in decode_session6 net/xfrm/xfrm_policy.c:3393 [inline] BUG: KASAN: slab-out-of-bounds in __xfrm_decode_session+0x1b92/0x2710 net/xfrm/xfrm_policy.c:3485 Read of size 1 at addr ffff88809b9ca67b by task syz-executor.5/15179 CPU: 0 PID: 15179 Comm: syz-executor.5 Not tainted 5.9.0-rc4-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+0x1d6/0x29e lib/dump_stack.c:118 print_address_description+0x66/0x620 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report+0x132/0x1d0 mm/kasan/report.c:530 decode_session6 net/xfrm/xfrm_policy.c:3393 [inline] __xfrm_decode_session+0x1b92/0x2710 net/xfrm/xfrm_policy.c:3485 xfrm_decode_session_reverse include/net/xfrm.h:1144 [inline] icmpv6_route_lookup net/ipv6/icmp.c:388 [inline] icmp6_send+0x1d6a/0x28d0 net/ipv6/icmp.c:588 icmpv6_send include/linux/icmpv6.h:24 [inline] ip6_link_failure+0x33/0x460 net/ipv6/route.c:2669 dst_link_failure include/net/dst.h:426 [inline] ipip6_tunnel_xmit net/ipv6/sit.c:1042 [inline] sit_tunnel_xmit+0xca9/0x2ae0 net/ipv6/sit.c:1079 __netdev_start_xmit include/linux/netdevice.h:4634 [inline] netdev_start_xmit include/linux/netdevice.h:4648 [inline] xmit_one net/core/dev.c:3561 [inline] dev_hard_start_xmit+0x1bd/0x3d0 net/core/dev.c:3577 sch_direct_xmit+0x1f0/0xd40 net/sched/sch_generic.c:313 qdisc_restart net/sched/sch_generic.c:376 [inline] __qdisc_run+0x9ed/0x19f0 net/sched/sch_generic.c:384 __dev_xmit_skb net/core/dev.c:3800 [inline] __dev_queue_xmit+0x141b/0x2940 net/core/dev.c:4105 neigh_output include/net/neighbour.h:509 [inline] ip6_finish_output2+0x106e/0x13f0 net/ipv6/ip6_output.c:117 dst_output include/net/dst.h:443 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ip6_xmit+0xdd9/0x1760 net/ipv6/ip6_output.c:280 sctp_v6_xmit+0x436/0x5d0 net/sctp/ipv6.c:217 sctp_packet_transmit+0x22ba/0x2b60 net/sctp/output.c:629 sctp_packet_singleton net/sctp/outqueue.c:773 [inline] sctp_outq_flush_ctrl net/sctp/outqueue.c:904 [inline] sctp_outq_flush+0x633/0x32f0 net/sctp/outqueue.c:1186 sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1801 [inline] sctp_side_effects net/sctp/sm_sideeffect.c:1185 [inline] sctp_do_sm+0x51e7/0x55a0 net/sctp/sm_sideeffect.c:1156 sctp_primitive_ASSOCIATE+0x90/0xc0 net/sctp/primitive.c:73 sctp_sendmsg_to_asoc+0x7e4/0x1510 net/sctp/socket.c:1823 sctp_sendmsg+0x1db7/0x3620 net/sctp/socket.c:2013 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg net/socket.c:671 [inline] ____sys_sendmsg+0x519/0x800 net/socket.c:2353 ___sys_sendmsg net/socket.c:2407 [inline] __sys_sendmsg+0x2b1/0x360 net/socket.c:2440 do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45d5b9 Code: 5d b4 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 2b b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f33cb2f4c78 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000000002ccc0 RCX: 000000000045d5b9 RDX: 0000000000000000 RSI: 00000000200014c0 RDI: 0000000000000003 RBP: 000000000118cf80 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118cf4c R13: 00007fff20a5cb4f R14: 00007f33cb2f59c0 R15: 000000000118cf4c Allocated by task 0: kasan_save_stack mm/kasan/common.c:48 [inline] kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc+0x100/0x130 mm/kasan/common.c:461 __do_kmalloc mm/slab.c:3655 [inline] __kmalloc+0x205/0x300 mm/slab.c:3664 kmalloc include/linux/slab.h:559 [inline] kzalloc+0x1d/0x40 include/linux/slab.h:666 neigh_alloc net/core/neighbour.c:399 [inline] ___neigh_create+0x54c/0x1c50 net/core/neighbour.c:577 ip6_finish_output2+0x95b/0x13f0 net/ipv6/ip6_output.c:114 dst_output include/net/dst.h:443 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] ndisc_send_skb+0x92d/0xd20 net/ipv6/ndisc.c:506 addrconf_rs_timer+0x226/0x680 net/ipv6/addrconf.c:3873 call_timer_fn+0x91/0x160 kernel/time/timer.c:1413 expire_timers kernel/time/timer.c:1458 [inline] __run_timers+0x65e/0x830 kernel/time/timer.c:1755 run_timer_softirq+0x46/0x80 kernel/time/timer.c:1768 __do_softirq+0x256/0x6d5 kernel/softirq.c:298 The buggy address belongs to the object at ffff88809b9ca000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 635 bytes to the right of 1024-byte region [ffff88809b9ca000, ffff88809b9ca400) The buggy address belongs to the page: page:0000000011e2575d refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x9b9ca flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea00026d3348 ffffea0001396dc8 ffff8880aa440700 raw: 0000000000000000 ffff88809b9ca000 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88809b9ca500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88809b9ca580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88809b9ca600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88809b9ca680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88809b9ca700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================