================================================================== BUG: KASAN: invalid-access in __xfrm_state_insert+0x5c8/0x7dc net/xfrm/xfrm_state.c:1743 Read at addr f6f0000009d80608 by task syz.0.1570/7693 Pointer tag: [f6], memory tag: [fe] CPU: 0 UID: 0 PID: 7693 Comm: syz.0.1570 Not tainted 6.16.0-syzkaller-12016-gbec077162bd0 #0 PREEMPT Hardware name: linux,dummy-virt (DT) Call trace: show_stack+0x18/0x24 arch/arm64/kernel/stacktrace.c:499 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x78/0x90 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:378 [inline] print_report+0x108/0x61c mm/kasan/report.c:482 kasan_report+0x88/0xac mm/kasan/report.c:595 report_tag_fault arch/arm64/mm/fault.c:326 [inline] do_tag_recovery arch/arm64/mm/fault.c:338 [inline] __do_kernel_fault+0x170/0x1c8 arch/arm64/mm/fault.c:380 do_bad_area+0x68/0x78 arch/arm64/mm/fault.c:480 do_tag_check_fault+0x34/0x44 arch/arm64/mm/fault.c:853 do_mem_abort+0x44/0x94 arch/arm64/mm/fault.c:929 el1_abort+0x40/0x60 arch/arm64/kernel/entry-common.c:481 el1h_64_sync_handler+0x50/0xac arch/arm64/kernel/entry-common.c:597 el1h_64_sync+0x6c/0x70 arch/arm64/kernel/entry.S:591 __xfrm_state_insert+0x5c8/0x7dc net/xfrm/xfrm_state.c:1743 (P) xfrm_state_insert+0x30/0x48 net/xfrm/xfrm_state.c:1795 ipcomp6_tunnel_attach net/ipv6/ipcomp6.c:131 [inline] ipcomp6_init_state net/ipv6/ipcomp6.c:163 [inline] ipcomp6_init_state+0x1c4/0x2d8 net/ipv6/ipcomp6.c:141 __xfrm_init_state+0x238/0x540 net/xfrm/xfrm_state.c:3188 xfrm_init_state+0x1c/0x58 net/xfrm/xfrm_state.c:3231 pfkey_msg2xfrm_state net/key/af_key.c:1286 [inline] pfkey_add+0x490/0x85c net/key/af_key.c:1504 pfkey_process+0x22c/0x250 net/key/af_key.c:2848 pfkey_sendmsg+0x134/0x294 net/key/af_key.c:3699 sock_sendmsg_nosec net/socket.c:714 [inline] __sock_sendmsg+0x54/0x60 net/socket.c:729 ____sys_sendmsg+0x190/0x29c net/socket.c:2614 ___sys_sendmsg+0xac/0x100 net/socket.c:2668 __sys_sendmmsg+0x104/0x258 net/socket.c:2757 __do_sys_sendmmsg net/socket.c:2784 [inline] __se_sys_sendmmsg net/socket.c:2781 [inline] __arm64_sys_sendmmsg+0x28/0x38 net/socket.c:2781 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x48/0x110 arch/arm64/kernel/syscall.c:49 el0_svc_common.constprop.0+0x40/0xe0 arch/arm64/kernel/syscall.c:132 do_el0_svc+0x1c/0x28 arch/arm64/kernel/syscall.c:151 el0_svc+0x34/0x10c arch/arm64/kernel/entry-common.c:879 el0t_64_sync_handler+0xa0/0xe4 arch/arm64/kernel/entry-common.c:898 el0t_64_sync+0x1a4/0x1a8 arch/arm64/kernel/entry.S:596 The buggy address belongs to the object at fff0000009d80340 which belongs to the cache xfrm_state of size 824 The buggy address is located 712 bytes inside of 824-byte region [fff0000009d80340, fff0000009d80678) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xf2f0000009d80000 pfn:0x49d80 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x1ffc00000000040(head|node=0|zone=0|lastcpupid=0x7ff|kasantag=0x0) page_type: f5(slab) raw: 01ffc00000000040 f3f00000039fa300 dead000000000122 0000000000000000 raw: f2f0000009d80000 0000000080130012 00000000f5000000 0000000000000000 head: 01ffc00000000040 f3f00000039fa300 dead000000000122 0000000000000000 head: f2f0000009d80000 0000000080130012 00000000f5000000 0000000000000000 head: 01ffc00000000002 ffffc1ffc0276001 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004 page dumped because: kasan: bad access detected Memory state around the buggy address: fff0000009d80400: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fff0000009d80500: fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe fe >fff0000009d80600: fe fe fe fe fe fe fe fe f0 f0 f0 f0 f0 f0 f0 f0 ^ fff0000009d80700: f0 f0 f0 f0 f0 f0 f0 f0 f0 f0 f0 f0 f0 f0 f0 f0 fff0000009d80800: f0 f0 f0 f0 f0 f0 f0 f0 f0 f0 f0 f0 f0 f0 f0 f0 ==================================================================