================================================================== BUG: KASAN: slab-out-of-bounds in decode_session6 net/xfrm/xfrm_policy.c:3394 [inline] BUG: KASAN: slab-out-of-bounds in __xfrm_decode_session+0x1cfb/0x2e90 net/xfrm/xfrm_policy.c:3486 Read of size 1 at addr ffff888050ec7dbf by task syz-executor.3/1539 CPU: 0 PID: 1539 Comm: syz-executor.3 Not tainted 5.7.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+0x188/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd3/0x413 mm/kasan/report.c:382 __kasan_report.cold+0x20/0x38 mm/kasan/report.c:511 kasan_report+0x33/0x50 mm/kasan/common.c:625 decode_session6 net/xfrm/xfrm_policy.c:3394 [inline] __xfrm_decode_session+0x1cfb/0x2e90 net/xfrm/xfrm_policy.c:3486 xfrm_decode_session include/net/xfrm.h:1138 [inline] vti_tunnel_xmit+0x25c/0x19a0 net/ipv4/ip_vti.c:300 __netdev_start_xmit include/linux/netdevice.h:4533 [inline] netdev_start_xmit include/linux/netdevice.h:4547 [inline] xmit_one net/core/dev.c:3477 [inline] dev_hard_start_xmit+0x1a4/0x9b0 net/core/dev.c:3493 sch_direct_xmit+0x345/0xc20 net/sched/sch_generic.c:313 qdisc_restart net/sched/sch_generic.c:376 [inline] __qdisc_run+0x4d1/0x17b0 net/sched/sch_generic.c:384 __dev_xmit_skb net/core/dev.c:3716 [inline] __dev_queue_xmit+0x165b/0x30a0 net/core/dev.c:4021 neigh_output include/net/neighbour.h:510 [inline] ip6_finish_output2+0x1091/0x25b0 net/ipv6/ip6_output.c:117 __ip6_finish_output+0x442/0xab0 net/ipv6/ip6_output.c:143 ip6_finish_output+0x34/0x1f0 net/ipv6/ip6_output.c:153 NF_HOOK_COND include/linux/netfilter.h:296 [inline] ip6_output+0x239/0x810 net/ipv6/ip6_output.c:176 dst_output include/net/dst.h:435 [inline] NF_HOOK include/linux/netfilter.h:307 [inline] ndisc_send_skb+0xf40/0x14b0 net/ipv6/ndisc.c:506 ndisc_send_rs+0x12e/0x6f0 net/ipv6/ndisc.c:700 addrconf_rs_timer+0x30f/0x6e0 net/ipv6/addrconf.c:3889 call_timer_fn+0x1ac/0x780 kernel/time/timer.c:1405 expire_timers kernel/time/timer.c:1450 [inline] __run_timers kernel/time/timer.c:1774 [inline] __run_timers kernel/time/timer.c:1741 [inline] run_timer_softirq+0x623/0x1600 kernel/time/timer.c:1787 __do_softirq+0x26c/0x9f7 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:373 [inline] irq_exit+0x192/0x1d0 kernel/softirq.c:413 exiting_irq arch/x86/include/asm/apic.h:546 [inline] smp_apic_timer_interrupt+0x19e/0x600 arch/x86/kernel/apic/apic.c:1140 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:829 RIP: 0010:lock_acquire+0x7/0x8f0 kernel/locking/lockdep.c:4906 Code: fb ff ff 4c 89 ff e8 78 7e 57 00 e9 25 fd ff ff 48 c7 c7 d0 8b 89 8a e8 57 7e 57 00 e9 5c fe ff ff 66 90 41 57 4d 89 cf 41 56 <41> 89 d6 41 55 49 89 fd 41 54 41 89 cc 48 b9 00 00 00 00 00 fc ff RSP: 0018:ffffc90007d6f2a8 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13 RAX: 0000000000040000 RBX: ffff88804ac17110 RCX: 0000000000000002 RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff899bea80 RBP: ffff88804ac17108 R08: 0000000000000000 R09: 0000000000000000 R10: ffff88802ee522c7 R11: ffffed1005dca458 R12: 0000000000000000 R13: ffff88804ac16ee0 R14: dffffc0000000000 R15: 0000000000000000 rcu_lock_acquire include/linux/rcupdate.h:208 [inline] rcu_read_lock include/linux/rcupdate.h:601 [inline] find_get_entry+0xdc/0x730 mm/filemap.c:1508 find_lock_entry+0x2e/0x610 mm/filemap.c:1561 shmem_getpage_gfp+0x22c/0x2a10 mm/shmem.c:1758 shmem_getpage mm/shmem.c:154 [inline] shmem_write_begin+0x102/0x1e0 mm/shmem.c:2486 generic_perform_write+0x20a/0x4e0 mm/filemap.c:3302 __generic_file_write_iter+0x24c/0x610 mm/filemap.c:3431 generic_file_write_iter+0x3f3/0x630 mm/filemap.c:3463 call_write_iter include/linux/fs.h:1907 [inline] do_iter_readv_writev+0x5a8/0x850 fs/read_write.c:694 do_iter_write fs/read_write.c:999 [inline] do_iter_write+0x18b/0x600 fs/read_write.c:980 vfs_iter_write+0x70/0xa0 fs/read_write.c:1040 iter_file_splice_write+0x684/0xb00 fs/splice.c:760 do_splice_from fs/splice.c:863 [inline] direct_splice_actor+0x115/0x160 fs/splice.c:1037 splice_direct_to_actor+0x38c/0x980 fs/splice.c:992 do_splice_direct+0x1b4/0x280 fs/splice.c:1080 do_sendfile+0x555/0xc50 fs/read_write.c:1521 __do_sys_sendfile64 fs/read_write.c:1576 [inline] __se_sys_sendfile64 fs/read_write.c:1568 [inline] __x64_sys_sendfile64+0x149/0x210 fs/read_write.c:1568 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 RIP: 0033:0x45ca29 Code: 0d b7 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 db b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f92fee7cc78 EFLAGS: 00000246 ORIG_RAX: 0000000000000028 RAX: ffffffffffffffda RBX: 00000000004fc540 RCX: 000000000045ca29 RDX: 00000000200001c0 RSI: 0000000000000003 RDI: 0000000000000003 RBP: 000000000078bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 00008080fffffffe R11: 0000000000000246 R12: 00000000ffffffff R13: 00000000000008dc R14: 00000000004cba16 R15: 00007f92fee7d6d4 Allocated by task 15806: save_stack+0x1b/0x40 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] __kasan_kmalloc mm/kasan/common.c:495 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:468 __kmalloc_reserve.isra.0+0x39/0xe0 net/core/skbuff.c:142 __alloc_skb+0xef/0x5a0 net/core/skbuff.c:210 alloc_skb include/linux/skbuff.h:1083 [inline] nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:492 [inline] nsim_dev_trap_report drivers/net/netdevsim/dev.c:549 [inline] nsim_dev_trap_report_work+0x2bb/0xbc0 drivers/net/netdevsim/dev.c:590 process_one_work+0x965/0x16a0 kernel/workqueue.c:2268 worker_thread+0x96/0xe20 kernel/workqueue.c:2414 kthread+0x388/0x470 kernel/kthread.c:268 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:351 Freed by task 15806: save_stack+0x1b/0x40 mm/kasan/common.c:49 set_track mm/kasan/common.c:57 [inline] kasan_set_free_info mm/kasan/common.c:317 [inline] __kasan_slab_free+0xf7/0x140 mm/kasan/common.c:456 __cache_free mm/slab.c:3426 [inline] kfree+0x109/0x2b0 mm/slab.c:3757 skb_free_head+0x8b/0xa0 net/core/skbuff.c:590 skb_release_data+0x42e/0x8b0 net/core/skbuff.c:610 skb_release_all+0x46/0x60 net/core/skbuff.c:664 __kfree_skb net/core/skbuff.c:678 [inline] consume_skb net/core/skbuff.c:837 [inline] consume_skb+0xf3/0x400 net/core/skbuff.c:831 nsim_dev_trap_report drivers/net/netdevsim/dev.c:565 [inline] nsim_dev_trap_report_work+0x86d/0xbc0 drivers/net/netdevsim/dev.c:590 process_one_work+0x965/0x16a0 kernel/workqueue.c:2268 worker_thread+0x96/0xe20 kernel/workqueue.c:2414 kthread+0x388/0x470 kernel/kthread.c:268 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:351 The buggy address belongs to the object at ffff888050ec6000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 3519 bytes to the right of 4096-byte region [ffff888050ec6000, ffff888050ec7000) The buggy address belongs to the page: page:ffffea000143b180 refcount:1 mapcount:0 mapping:00000000c6afeac9 index:0x0 head:ffffea000143b180 order:1 compound_mapcount:0 flags: 0xfffe0000010200(slab|head) raw: 00fffe0000010200 ffffea000143b108 ffffea0002860108 ffff8880aa002000 raw: 0000000000000000 ffff888050ec6000 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888050ec7c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888050ec7d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888050ec7d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888050ec7e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888050ec7e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================