syzbot
KASAN: stack-out-of-bounds Read in xfrm_state_find (6)
Status:
fixed on 2026/08/08 19:10
Subsystems:
net
Labels:
prio:high
[Documentation on labels]
Reported-by: syzbot+0ac4d84afe1066a1f3e9@syzkaller.appspotmail.com
Fix commit:
ea528f18231e
xfrm: reject optional IPTFS templates in outbound policies
First crash: 48d, last: 48d
▶
▼
Similar bugs (20)
| Kernel |
Title |
Rank
🛈
|
Repro |
Cause bisect |
Fix bisect |
Count |
Last |
Reported |
Patched |
Status |
| upstream |
KASAN: stack-out-of-bounds Read in xfrm_state_find (3)
net
|
17 |
syz, C |
|
|
10353 |
3119d |
3186d
|
4/29 |
fixed on 2018/01/31 00:24
|
| android-44 |
KASAN: stack-out-of-bounds Read in xfrm_state_find
|
17 |
syz, C |
|
|
842 |
2446d |
2679d
|
0/2 |
public: reported C repro on 2019/04/12 00:00
|
| android-54 |
KASAN: stack-out-of-bounds Read in xfrm_state_find
|
17 |
syz, C |
|
|
1 |
1319d |
1319d
|
0/2 |
upstream: reported C repro on 2023/01/01 01:05
|
| android-5-15 |
KASAN: stack-out-of-bounds Read in xfrm_state_find
origin:upstream
missing-backport
|
17 |
syz, C |
error |
error |
2 |
833d |
1319d
|
0/2 |
upstream: reported C repro on 2023/01/01 00:40
|
| upstream |
KASAN: stack-out-of-bounds Read in xfrm_state_find (5)
net
|
17 |
syz, C |
|
done |
654 |
2751d |
3053d
|
13/29 |
fixed on 2019/11/11 16:48
|
| upstream |
KMSAN: uninit-value in xfrm_state_find
net
|
17 |
syz, C |
error |
done |
215 |
1180d |
2979d
|
22/29 |
fixed on 2023/07/01 16:05
|
| android-5-10 |
KASAN: stack-out-of-bounds Read in xfrm_state_find (2)
|
17 |
syz |
error |
error |
1 |
1319d |
1319d
|
0/2 |
auto-obsoleted due to no activity on 2023/05/14 02:28
|
| upstream |
KASAN: stack-out-of-bounds Read in xfrm_state_find
net
|
17 |
syz, C |
|
|
365 |
3214d |
3287d
|
0/29 |
closed as invalid on 2017/10/23 16:19
|
| android-5-10 |
KASAN: stack-out-of-bounds Read in xfrm_state_find
|
17 |
|
|
|
1 |
1738d |
1738d
|
0/2 |
closed as invalid on 2022/02/03 13:56
|
| android-49 |
KASAN: stack-out-of-bounds Read in xfrm_state_find
|
17 |
syz, C |
|
|
4151 |
2779d |
3290d
|
0/3 |
closed as invalid on 2019/01/01 20:10
|
| android-414 |
KASAN: stack-out-of-bounds Read in xfrm_state_find
|
17 |
syz, C |
|
|
137 |
2753d |
2680d
|
0/1 |
public: reported C repro on 2019/04/11 00:00
|
| upstream |
KASAN: stack-out-of-bounds Read in xfrm_state_find (2)
net
|
17 |
syz, C |
|
|
93 |
3197d |
3205d
|
3/29 |
fixed on 2017/11/18 01:42
|
| android-49 |
KASAN: stack-out-of-bounds Read in xfrm_state_find (2)
|
17 |
syz, C |
|
|
392 |
2443d |
2679d
|
0/3 |
public: reported C repro on 2019/04/11 08:44
|
| upstream |
KASAN: stack-out-of-bounds Read in xfrm_state_find (4)
net
|
17 |
syz, C |
|
|
102 |
3063d |
3114d
|
4/29 |
fixed on 2018/03/23 18:14
|
| upstream |
KMSAN: uninit-value in xfrm_state_find (2)
net
|
17 |
|
|
|
19 |
854d |
1013d
|
0/29 |
auto-obsoleted due to no activity on 2024/07/18 11:50
|
| upstream |
KMSAN: uninit-value in xfrm_state_find (3)
net
|
7 |
|
|
|
1 |
711d |
711d
|
0/29 |
closed as invalid on 2024/10/09 09:35
|
| upstream |
KASAN: slab-out-of-bounds Read in xfrm_state_find
net
|
17 |
|
|
|
10 |
469d |
623d
|
28/29 |
fixed on 2025/05/06 15:33
|
| upstream |
KASAN: slab-use-after-free Read in xfrm_state_find
net
|
19 |
|
|
|
1395 |
173d |
337d
|
29/29 |
fixed on 2026/05/06 16:40
|
| upstream |
KMSAN: uninit-value in xfrm_state_find (4)
net
|
19 |
|
|
|
2406 |
341d |
447d
|
29/29 |
fixed on 2025/09/04 16:57
|
| linux-6.6 |
KASAN: slab-use-after-free Read in xfrm_state_find
|
19 |
|
|
|
14 |
314d |
348d
|
0/2 |
auto-obsoleted due to no activity on 2025/12/10 17:12
|
Sample crash report:
==================================================================
BUG: KASAN: stack-out-of-bounds in jhash2 include/linux/jhash.h:138 [inline]
BUG: KASAN: stack-out-of-bounds in __xfrm6_addr_hash net/xfrm/xfrm_hash.h:16 [inline]
BUG: KASAN: stack-out-of-bounds in __xfrm6_daddr_saddr_hash net/xfrm/xfrm_hash.h:29 [inline]
BUG: KASAN: stack-out-of-bounds in __xfrm_dst_hash net/xfrm/xfrm_hash.h:95 [inline]
BUG: KASAN: stack-out-of-bounds in xfrm_state_find+0x590d/0x5ec0 net/xfrm/xfrm_state.c:1421
Read of size 4 at addr ffffc900061a7908 by task syz.8.4714/27393
CPU: 1 UID: 0 PID: 27393 Comm: syz.8.4714 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026
Call Trace:
<TASK>
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_address_description+0x55/0x1e0 mm/kasan/report.c:378
print_report+0x58/0x70 mm/kasan/report.c:482
kasan_report+0x117/0x150 mm/kasan/report.c:595
jhash2 include/linux/jhash.h:138 [inline]
__xfrm6_addr_hash net/xfrm/xfrm_hash.h:16 [inline]
__xfrm6_daddr_saddr_hash net/xfrm/xfrm_hash.h:29 [inline]
__xfrm_dst_hash net/xfrm/xfrm_hash.h:95 [inline]
xfrm_state_find+0x590d/0x5ec0 net/xfrm/xfrm_state.c:1421
xfrm_tmpl_resolve_one net/xfrm/xfrm_policy.c:2513 [inline]
xfrm_tmpl_resolve net/xfrm/xfrm_policy.c:2564 [inline]
xfrm_resolve_and_create_bundle+0x7f3/0x3070 net/xfrm/xfrm_policy.c:2862
xfrm_bundle_lookup net/xfrm/xfrm_policy.c:3097 [inline]
xfrm_lookup_with_ifid+0x576/0x1b40 net/xfrm/xfrm_policy.c:3228
xfrm_lookup net/xfrm/xfrm_policy.c:3327 [inline]
xfrm_lookup_route+0x3c/0x1c0 net/xfrm/xfrm_policy.c:3338
raw_sendmsg+0x110d/0x1a20 net/ipv4/raw.c:628
sock_sendmsg_nosec+0x10e/0x180 net/socket.c:776
__sock_sendmsg net/socket.c:790 [inline]
____sys_sendmsg+0x54e/0x850 net/socket.c:2684
___sys_sendmsg+0x2a5/0x360 net/socket.c:2738
__sys_sendmsg net/socket.c:2770 [inline]
__do_sys_sendmsg net/socket.c:2775 [inline]
__se_sys_sendmsg net/socket.c:2773 [inline]
__x64_sys_sendmsg+0x1b1/0x290 net/socket.c:2773
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7feeebb9ce59
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 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 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007feeeca26028 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007feeebe15fa0 RCX: 00007feeebb9ce59
RDX: 000000000400c894 RSI: 0000200000000900 RDI: 0000000000000007
RBP: 00007feeebc32e6f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007feeebe16038 R14: 00007feeebe15fa0 R15: 00007fff5f12fac8
</TASK>
The buggy address belongs to stack of task syz.8.4714/27393
and is located at offset 328 in frame:
raw_sendmsg+0x0/0x1a20 net/ipv4/raw.c:909
This frame has 5 objects:
[32, 104) 'opt_copy_u'
[144, 200) 'ipc'
[240, 248) 'rt'
[272, 328) 'fl4'
[368, 392) 'rfv'
The buggy address belongs to a 8-page vmalloc region starting at 0xffffc900061a0000 allocated at copy_process+0x81b/0x42e0 kernel/fork.c:2110
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x8b157
memcg:ffff88807cfe5e02
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff00000000000 0000000000000000 ffffea00022c55c8 0000000000000000
raw: 0000000000000000 0000000000000000 00000001ffffffff ffff88807cfe5e02
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x29c2(GFP_NOWAIT|__GFP_HIGHMEM|__GFP_IO|__GFP_FS|__GFP_ZERO), pid 27358, tgid 27357 (syz.3.4705), ts 776904415615, free_ts 773990322016
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1f9/0x250 mm/page_alloc.c:1859
prep_new_page mm/page_alloc.c:1867 [inline]
get_page_from_freelist+0x21fa/0x2270 mm/page_alloc.c:3946
__alloc_frozen_pages_noprof+0x18d/0x380 mm/page_alloc.c:5304
alloc_pages_mpol+0x212/0x380 mm/mempolicy.c:2490
alloc_frozen_pages_noprof mm/mempolicy.c:2561 [inline]
alloc_pages_noprof+0xac/0x2a0 mm/mempolicy.c:2581
vm_area_alloc_pages mm/vmalloc.c:3667 [inline]
__vmalloc_area_node mm/vmalloc.c:3892 [inline]
__vmalloc_node_range_noprof+0x795/0x1730 mm/vmalloc.c:4082
__vmalloc_node_noprof+0xc2/0x100 mm/vmalloc.c:4143
alloc_thread_stack_node kernel/fork.c:359 [inline]
dup_task_struct+0x28e/0x850 kernel/fork.c:929
copy_process+0x81b/0x42e0 kernel/fork.c:2110
kernel_clone+0x2d7/0x940 kernel/fork.c:2746
__do_sys_clone kernel/fork.c:2887 [inline]
__se_sys_clone kernel/fork.c:2871 [inline]
__x64_sys_clone+0x1b6/0x230 kernel/fork.c:2871
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 27224 tgid 27224 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1406 [inline]
__free_frozen_pages+0xc1f/0xd10 mm/page_alloc.c:2950
__slab_free+0x274/0x2c0 mm/slub.c:5672
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x99/0x100 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:350
kasan_slab_alloc include/linux/kasan.h:253 [inline]
slab_post_alloc_hook mm/slub.c:4610 [inline]
slab_alloc_node mm/slub.c:4939 [inline]
__do_kmalloc_node mm/slub.c:5333 [inline]
__kmalloc_noprof+0x312/0x750 mm/slub.c:5347
_kmalloc_noprof include/linux/slab.h:973 [inline]
tomoyo_realpath_from_path+0xef/0x640 security/tomoyo/realpath.c:251
tomoyo_get_realpath security/tomoyo/file.c:151 [inline]
tomoyo_check_open_permission+0x229/0x470 security/tomoyo/file.c:776
security_file_open+0xa9/0x240 security/security.c:2739
do_dentry_open+0x4a0/0x1380 fs/open.c:924
vfs_open+0x3b/0x340 fs/open.c:1079
do_open fs/namei.c:4700 [inline]
path_openat+0x2e44/0x3830 fs/namei.c:4859
do_file_open+0x23e/0x4a0 fs/namei.c:4888
do_sys_openat2+0x115/0x200 fs/open.c:1395
do_sys_open fs/open.c:1401 [inline]
__do_sys_openat fs/open.c:1417 [inline]
__se_sys_openat fs/open.c:1412 [inline]
__x64_sys_openat+0x138/0x170 fs/open.c:1412
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94
Memory state around the buggy address:
ffffc900061a7800: 00 00 00 00 00 f2 f2 f2 f2 f2 00 00 00 00 00 00
ffffc900061a7880: 00 f2 f2 f2 f2 f2 00 f2 f2 f2 00 00 00 00 00 00
>ffffc900061a7900: 00 f2 f2 f2 f2 f2 00 00 00 f3 f3 f3 f3 f3 f3 f3
^
ffffc900061a7980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc900061a7a00: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
==================================================================
* Struck through repros no longer work on HEAD.