================================================================== BUG: KASAN: slab-out-of-bounds in decode_session6 net/xfrm/xfrm_policy.c:3390 [inline] BUG: KASAN: slab-out-of-bounds in __xfrm_decode_session+0x1cfb/0x2e90 net/xfrm/xfrm_policy.c:3482 Read of size 1 at addr ffff88804e364cb3 by task syz-executor.3/27504 CPU: 0 PID: 27504 Comm: syz-executor.3 Not tainted 5.5.0-rc6-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+0x197/0x210 lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd4/0x30b mm/kasan/report.c:374 __kasan_report.cold+0x1b/0x41 mm/kasan/report.c:506 kasan_report+0x12/0x20 mm/kasan/common.c:639 __asan_report_load1_noabort+0x14/0x20 mm/kasan/generic_report.c:132 decode_session6 net/xfrm/xfrm_policy.c:3390 [inline] __xfrm_decode_session+0x1cfb/0x2e90 net/xfrm/xfrm_policy.c:3482 xfrm_decode_session include/net/xfrm.h:1137 [inline] vti_tunnel_xmit+0x277/0x18a0 net/ipv4/ip_vti.c:278 __netdev_start_xmit include/linux/netdevice.h:4449 [inline] netdev_start_xmit include/linux/netdevice.h:4463 [inline] xmit_one net/core/dev.c:3420 [inline] dev_hard_start_xmit+0x1a3/0x9b0 net/core/dev.c:3436 sch_direct_xmit+0x372/0xd30 net/sched/sch_generic.c:313 qdisc_restart net/sched/sch_generic.c:376 [inline] __qdisc_run+0x4bf/0x1770 net/sched/sch_generic.c:384 __dev_xmit_skb net/core/dev.c:3677 [inline] __dev_queue_xmit+0x163f/0x35c0 net/core/dev.c:3982 dev_queue_xmit+0x18/0x20 net/core/dev.c:4046 neigh_direct_output+0x16/0x20 net/core/neighbour.c:1527 neigh_output include/net/neighbour.h:510 [inline] ip6_finish_output2+0x109a/0x25c0 net/ipv6/ip6_output.c:116 __ip6_finish_output+0x444/0xaa0 net/ipv6/ip6_output.c:142 ip6_finish_output+0x38/0x1f0 net/ipv6/ip6_output.c:152 NF_HOOK_COND include/linux/netfilter.h:296 [inline] ip6_output+0x25e/0x880 net/ipv6/ip6_output.c:175 dst_output include/net/dst.h:436 [inline] NF_HOOK include/linux/netfilter.h:307 [inline] ndisc_send_skb+0xf1f/0x1490 net/ipv6/ndisc.c:505 ndisc_send_rs+0x134/0x720 net/ipv6/ndisc.c:699 addrconf_rs_timer+0x30f/0x6e0 net/ipv6/addrconf.c:3879 call_timer_fn+0x1ac/0x780 kernel/time/timer.c:1404 expire_timers kernel/time/timer.c:1449 [inline] __run_timers kernel/time/timer.c:1773 [inline] __run_timers kernel/time/timer.c:1740 [inline] run_timer_softirq+0x6c3/0x1790 kernel/time/timer.c:1786 __do_softirq+0x262/0x98c kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x19b/0x1e0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:536 [inline] smp_apic_timer_interrupt+0x1a3/0x610 arch/x86/kernel/apic/apic.c:1137 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829 RIP: 0010:get_current arch/x86/include/asm/current.h:15 [inline] RIP: 0010:write_comp_data+0x0/0x70 kernel/kcov.c:207 Code: 83 fa 02 75 20 48 8b 88 88 13 00 00 8b 80 84 13 00 00 48 8b 11 48 83 c2 01 48 39 d0 76 07 48 89 34 d1 48 89 11 5d c3 0f 1f 00 <65> 4c 8b 04 25 c0 1e 02 00 65 8b 05 08 29 8d 7e a9 00 01 1f 00 75 RSP: 0018:ffffc900015479a8 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff83646c72 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001 RBP: ffffc900015479b0 R08: ffff888049b96280 R09: fffff520002a8f4d R10: fffff520002a8f4c R11: 0000000000000000 R12: ffff8880a8399a00 R13: 0000000000000010 R14: 000000000000029c R15: 0000000000000000 tomoyo_domain_quota_is_ok+0x152/0x540 security/tomoyo/util.c:1037 tomoyo_supervisor+0x2e8/0xef0 security/tomoyo/common.c:2089 tomoyo_audit_path_number_log security/tomoyo/file.c:235 [inline] tomoyo_path_number_perm+0x42a/0x520 security/tomoyo/file.c:734 tomoyo_file_ioctl+0x23/0x30 security/tomoyo/tomoyo.c:335 security_file_ioctl+0x77/0xc0 security/security.c:1409 ksys_ioctl+0x57/0xd0 fs/ioctl.c:747 __do_sys_ioctl fs/ioctl.c:756 [inline] __se_sys_ioctl fs/ioctl.c:754 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:754 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45b349 Code: ad b6 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 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f1ff5958c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f1ff59596d4 RCX: 000000000045b349 RDX: 00000000200001c0 RSI: 0000001000008912 RDI: 0000000000000008 RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000001fe R14: 00000000004c2cfa R15: 000000000075bf2c Allocated by task 27319: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc mm/kasan/common.c:513 [inline] __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:486 kasan_slab_alloc+0xf/0x20 mm/kasan/common.c:521 slab_post_alloc_hook mm/slab.h:584 [inline] slab_alloc_node mm/slab.c:3263 [inline] kmem_cache_alloc_node+0x138/0x740 mm/slab.c:3575 __alloc_skb+0xd5/0x5e0 net/core/skbuff.c:197 alloc_skb include/linux/skbuff.h:1049 [inline] alloc_skb_with_frags+0x93/0x590 net/core/skbuff.c:5664 sock_alloc_send_pskb+0x7ad/0x920 net/core/sock.c:2242 unix_dgram_sendmsg+0x410/0x14e0 net/unix/af_unix.c:1635 sock_sendmsg_nosec net/socket.c:639 [inline] sock_sendmsg+0xd7/0x130 net/socket.c:659 ____sys_sendmsg+0x358/0x880 net/socket.c:2330 ___sys_sendmsg+0x100/0x170 net/socket.c:2384 __sys_sendmmsg+0x1bf/0x4d0 net/socket.c:2474 __do_sys_sendmmsg net/socket.c:2503 [inline] __se_sys_sendmmsg net/socket.c:2500 [inline] __x64_sys_sendmmsg+0x9d/0x100 net/socket.c:2500 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 27316: save_stack+0x23/0x90 mm/kasan/common.c:72 set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:335 [inline] __kasan_slab_free+0x102/0x150 mm/kasan/common.c:474 kasan_slab_free+0xe/0x10 mm/kasan/common.c:483 __cache_free mm/slab.c:3426 [inline] kmem_cache_free+0x86/0x320 mm/slab.c:3694 kfree_skbmem net/core/skbuff.c:623 [inline] kfree_skbmem+0xfb/0x1c0 net/core/skbuff.c:617 __kfree_skb net/core/skbuff.c:680 [inline] kfree_skb net/core/skbuff.c:697 [inline] kfree_skb+0x109/0x420 net/core/skbuff.c:691 unix_release_sock+0x5d2/0xc80 net/unix/af_unix.c:562 unix_release+0x44/0x90 net/unix/af_unix.c:842 __sock_release+0xce/0x280 net/socket.c:592 sock_close+0x1e/0x30 net/socket.c:1270 __fput+0x2ff/0x890 fs/file_table.c:280 ____fput+0x16/0x20 fs/file_table.c:313 task_work_run+0x145/0x1c0 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:188 [inline] exit_to_usermode_loop+0x316/0x380 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:195 [inline] syscall_return_slowpath arch/x86/entry/common.c:278 [inline] do_syscall_64+0x676/0x790 arch/x86/entry/common.c:304 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff88804e364bc0 which belongs to the cache skbuff_head_cache(17:syz0) of size 224 The buggy address is located 19 bytes to the right of 224-byte region [ffff88804e364bc0, ffff88804e364ca0) The buggy address belongs to the page: page:ffffea000138d900 refcount:1 mapcount:0 mapping:ffff888094f89380 index:0x0 raw: 00fffe0000000200 ffffea00027b5508 ffffea000153d608 ffff888094f89380 raw: 0000000000000000 ffff88804e364080 000000010000000c 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88804e364b80: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff88804e364c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88804e364c80: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88804e364d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88804e364d80: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc ==================================================================