BUG: using __this_cpu_read() in preemptible [00000000] code: syz-executor2/8768 caller is __this_cpu_preempt_check+0x1c/0x20 lib/smp_processor_id.c:62 CPU: 1 PID: 8768 Comm: syz-executor2 Not tainted 4.9.71-g2506378 #113 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801cd9f76c8 ffffffff81d922b9 0000000000000001 ffffffff83c17a00 ffffffff83f43a80 ffff8801cd74e000 0000000000000003 ffff8801cd9f7708 ffffffff81df9294 ffff8801cd9f7720 ffffffff83f43a80 dffffc0000000000 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] check_preemption_disabled+0x1d4/0x200 lib/smp_processor_id.c:46 [] __this_cpu_preempt_check+0x1c/0x20 lib/smp_processor_id.c:62 ================================================================== BUG: KASAN: stack-out-of-bounds in xfrm_state_find+0x2453/0x2830 net/xfrm/xfrm_state.c:822 Read of size 4 at addr ffff8801cbc6f8b0 by task syz-executor3/8782 [] ipcomp_alloc_tfms net/xfrm/xfrm_ipcomp.c:286 [inline] [] ipcomp_init_state+0x188/0x930 net/xfrm/xfrm_ipcomp.c:363 [] ipcomp6_init_state+0xb5/0x820 net/ipv6/ipcomp6.c:165 [] __xfrm_init_state+0x3e7/0xb30 net/xfrm/xfrm_state.c:2096 [] xfrm_init_state+0x1a/0x20 net/xfrm/xfrm_state.c:2122 [] pfkey_msg2xfrm_state net/key/af_key.c:1281 [inline] [] pfkey_add+0x1fb9/0x3470 net/key/af_key.c:1498 [] pfkey_process+0x61e/0x730 net/key/af_key.c:2826 [] pfkey_sendmsg+0x3a9/0x760 net/key/af_key.c:3670 [] sock_sendmsg_nosec net/socket.c:635 [inline] [] sock_sendmsg+0xca/0x110 net/socket.c:645 [] ___sys_sendmsg+0x6d1/0x7e0 net/socket.c:1969 [] __sys_sendmsg+0xd6/0x190 net/socket.c:2003 [] SYSC_sendmsg net/socket.c:2014 [inline] [] SyS_sendmsg+0x2d/0x50 net/socket.c:2010 [] entry_SYSCALL_64_fastpath+0x23/0xc6 CPU: 0 PID: 8782 Comm: syz-executor3 Not tainted 4.9.71-g2506378 #113 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 ffff8801cbc6ef00 ffffffff81d922b9 ffffea00072f1bc0 ffff8801cbc6f8b0 0000000000000000 ffff8801cbc6f8b0 ffff8801cbdc8720 ffff8801cbc6ef38 ffffffff8153bab3 ffff8801cbc6f8b0 0000000000000004 0000000000000000 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x128 lib/dump_stack.c:51 [] print_address_description+0x73/0x280 mm/kasan/report.c:252 [] kasan_report_error mm/kasan/report.c:351 [inline] [] kasan_report+0x275/0x360 mm/kasan/report.c:408 [] __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:428 [] xfrm_state_find+0x2453/0x2830 net/xfrm/xfrm_state.c:822 [] xfrm_tmpl_resolve_one net/xfrm/xfrm_policy.c:1476 [inline] [] xfrm_tmpl_resolve+0x298/0xa90 net/xfrm/xfrm_policy.c:1520 [] xfrm_resolve_and_create_bundle+0xd7/0x1d90 net/xfrm/xfrm_policy.c:1868 [] xfrm_lookup+0x984/0xbf0 net/xfrm/xfrm_policy.c:2222 [] xfrm_lookup_route+0x39/0x1a0 net/xfrm/xfrm_policy.c:2344 [] ip_route_output_flow+0x7f/0xa0 net/ipv4/route.c:2435 [] udp_sendmsg+0xe36/0x1c10 net/ipv4/udp.c:1023 [] udpv6_sendmsg+0x588/0x2540 net/ipv6/udp.c:1086 [] inet_sendmsg+0x2bc/0x4c0 net/ipv4/af_inet.c:770 [] sock_sendmsg_nosec net/socket.c:635 [inline] [] sock_sendmsg+0xca/0x110 net/socket.c:645 [] SYSC_sendto+0x2c8/0x340 net/socket.c:1670 [] SyS_sendto+0x40/0x50 net/socket.c:1638 [] entry_SYSCALL_64_fastpath+0x23/0xc6 The buggy address belongs to the page: page:ffffea00072f1bc0 count:0 mapcount:0 mapping: (null) index:0x0 flags: 0x8000000000000000() page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801cbc6f780: 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 ffff8801cbc6f800: f2 f2 f2 f2 f2 f2 f2 00 00 00 00 f2 f2 f2 f2 00 >ffff8801cbc6f880: 00 00 00 00 00 00 f2 f2 f2 f2 f2 00 00 00 00 00 ^ ffff8801cbc6f900: 00 00 00 00 f2 f2 f2 00 00 00 00 00 00 00 00 00 ffff8801cbc6f980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================