==================================================================
BUG: KASAN: stack-out-of-bounds in __get_unaligned_cpu32 include/linux/unaligned/packed_struct.h:19 [inline]
BUG: KASAN: stack-out-of-bounds in jhash include/linux/jhash.h:82 [inline]
BUG: KASAN: stack-out-of-bounds in hash+0x465/0xc20 kernel/bpf/bloom_filter.c:39
Read of size 4 at addr ffffc90005ebf840 by task syz.3.9048/31991
CPU: 1 PID: 31991 Comm: syz.3.9048 Not tainted 6.1.84-syzkaller-00005-g96d66062d076 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x151/0x1b7 lib/dump_stack.c:106
print_address_description mm/kasan/report.c:316 [inline]
print_report+0x158/0x4e0 mm/kasan/report.c:427
kasan_report+0x13c/0x170 mm/kasan/report.c:531
__asan_report_load_n_noabort+0xf/0x20 mm/kasan/report_generic.c:361
__get_unaligned_cpu32 include/linux/unaligned/packed_struct.h:19 [inline]
jhash include/linux/jhash.h:82 [inline]
hash+0x465/0xc20 kernel/bpf/bloom_filter.c:39
bloom_map_push_elem+0xce/0x180 kernel/bpf/bloom_filter.c:69
bpf_prog_216c997a1f42e404+0x37/0x3b
bpf_dispatcher_nop_func include/linux/bpf.h:987 [inline]
__bpf_prog_run include/linux/filter.h:603 [inline]
bpf_prog_run include/linux/filter.h:610 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline]
bpf_trace_run4+0x18d/0x2f0 kernel/trace/bpf_trace.c:2314
__bpf_trace_sched_switch+0xe/0x10 include/trace/events/sched.h:222
__traceiter_sched_switch+0x91/0xc0 include/trace/events/sched.h:222
trace_sched_switch include/trace/events/sched.h:222 [inline]
__schedule+0x1305/0x1550 kernel/sched/core.c:6741
schedule+0xc3/0x180 kernel/sched/core.c:6820
futex_wait_queue+0xf2/0x250 kernel/futex/waitwake.c:361
futex_wait+0x212/0x7e0 kernel/futex/waitwake.c:664
do_futex+0x55a/0x9a0 kernel/futex/syscalls.c:108
__do_sys_futex kernel/futex/syscalls.c:185 [inline]
__se_sys_futex+0x35e/0x3c0 kernel/futex/syscalls.c:166
__x64_sys_futex+0xe5/0x100 kernel/futex/syscalls.c:166
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f3e71175bd9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f3e71f510f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: ffffffffffffffda RBX: 00007f3e71303f68 RCX: 00007f3e71175bd9
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f3e71303f68
RBP: 00007f3e71303f60 R08: 00007f3e71f516c0 R09: 00007f3e71f516c0
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f3e71303f6c
R13: 000000000000000b R14: 00007ffebd7b0f50 R15: 00007ffebd7b1038
The buggy address belongs to stack of task syz.3.9048/31991
and is located at offset 0 in frame:
bpf_trace_run4+0x0/0x2f0
This frame has 1 object:
[32, 64) 'args'
The buggy address belongs to the virtual mapping at
[ffffc90005eb8000, ffffc90005ec1000) created by:
copy_process+0x5c3/0x3530 kernel/fork.c:2199
The buggy address belongs to the physical page:
page:ffffea0004644340 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11910d
flags: 0x4000000000000000(zone=1)
raw: 4000000000000000 0000000000000000 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000000000 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x102dc2(GFP_HIGHUSER|__GFP_NOWARN|__GFP_ZERO), pid 31949, tgid 31949 (syz.3.9041), ts 1754533980486, free_ts 1754413554351
set_page_owner include/linux/page_owner.h:33 [inline]
post_alloc_hook+0x213/0x220 mm/page_alloc.c:2590
prep_new_page+0x1b/0x110 mm/page_alloc.c:2597
get_page_from_freelist+0x27ea/0x2870 mm/page_alloc.c:4425
__alloc_pages+0x3a1/0x780 mm/page_alloc.c:5714
__vmalloc_area_node mm/vmalloc.c:3062 [inline]
__vmalloc_node_range+0x89b/0x1540 mm/vmalloc.c:3234
alloc_thread_stack_node kernel/fork.c:318 [inline]
dup_task_struct+0x3d6/0x7d0 kernel/fork.c:1080
copy_process+0x5c3/0x3530 kernel/fork.c:2199
kernel_clone+0x229/0x890 kernel/fork.c:2786
__do_sys_clone3 kernel/fork.c:3087 [inline]
__se_sys_clone3 kernel/fork.c:3071 [inline]
__x64_sys_clone3+0x35c/0x390 kernel/fork.c:3071
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x63/0xcd
page last free stack trace:
reset_page_owner include/linux/page_owner.h:26 [inline]
free_pages_prepare mm/page_alloc.c:1498 [inline]
free_pcp_prepare mm/page_alloc.c:1572 [inline]
free_unref_page_prepare+0x83d/0x850 mm/page_alloc.c:3498
free_unref_page+0xb2/0x5c0 mm/page_alloc.c:3594
free_the_page mm/page_alloc.c:798 [inline]
__free_pages+0x61/0xf0 mm/page_alloc.c:5803
__free_slab+0xce/0x1a0 mm/slub.c:2039
free_slab mm/slub.c:2054 [inline]
discard_slab mm/slub.c:2060 [inline]
__unfreeze_partials+0x165/0x1a0 mm/slub.c:2609
put_cpu_partial+0xa9/0x100 mm/slub.c:2685
__slab_free+0x1c8/0x280 mm/slub.c:3561
do_slab_free mm/slub.c:3638 [inline]
___cache_free+0xc6/0xd0 mm/slub.c:3691
qlink_free mm/kasan/quarantine.c:168 [inline]
qlist_free_all+0xc5/0x140 mm/kasan/quarantine.c:187
kasan_quarantine_reduce+0x15a/0x180 mm/kasan/quarantine.c:294
__kasan_slab_alloc+0x24/0x80 mm/kasan/common.c:310
kasan_slab_alloc include/linux/kasan.h:202 [inline]
slab_post_alloc_hook+0x53/0x2c0 mm/slab.h:768
slab_alloc_node mm/slub.c:3421 [inline]
slab_alloc mm/slub.c:3429 [inline]
__kmem_cache_alloc_lru mm/slub.c:3436 [inline]
kmem_cache_alloc+0x175/0x2c0 mm/slub.c:3445
getname_flags+0xba/0x520 fs/namei.c:139
getname fs/namei.c:218 [inline]
__do_sys_unlink fs/namei.c:4439 [inline]
__se_sys_unlink fs/namei.c:4437 [inline]
__x64_sys_unlink+0x3c/0x50 fs/namei.c:4437
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
Memory state around the buggy address:
ffffc90005ebf700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc90005ebf780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffc90005ebf800: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00
^
ffffc90005ebf880: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
ffffc90005ebf900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
BUG: unable to handle page fault for address: ffffc90005ec0000
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 100000067 P4D 100000067 PUD 100154067 PMD 125a9b067 PTE 0
Oops: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 31991 Comm: syz.3.9048 Tainted: G B 6.1.84-syzkaller-00005-g96d66062d076 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
RIP: 0010:jhash include/linux/jhash.h:80 [inline]
RIP: 0010:hash+0x2a4/0xc20 kernel/bpf/bloom_filter.c:39
Code: 00 00 00 fc ff df 0f b6 04 10 84 c0 0f 85 ff 00 00 00 4a 8d 7c 36 03 48 89 f8 48 c1 e8 03 0f b6 04 10 84 c0 0f 85 17 01 00 00 <46> 03 3c 36 4a 8d 7c 36 04 48 89 f8 48 c1 e8 03 0f b6 04 10 84 c0
RSP: 0018:ffffc90005ebf750 EFLAGS: 00010082
RAX: 0000000000000000 RBX: 00000000bb66d671 RCX: ffffffff8191f0e5
RDX: dffffc0000000000 RSI: ffffc90005ebf808 RDI: ffffc90005ec0003
RBP: ffffc90005ebf790 R08: 00000000fffff7fa R09: fffffbfff0f264fd
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000067b7ea5d
R13: 00000000fffff7fa R14: 00000000000007f8 R15: 000000000bae1442
FS: 00007f3e71f516c0(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffc90005ec0000 CR3: 00000001188f9000 CR4: 00000000003506a0
Call Trace:
bloom_map_push_elem+0xce/0x180 kernel/bpf/bloom_filter.c:69
bpf_prog_216c997a1f42e404+0x37/0x3b
bpf_dispatcher_nop_func include/linux/bpf.h:987 [inline]
__bpf_prog_run include/linux/filter.h:603 [inline]
bpf_prog_run include/linux/filter.h:610 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline]
bpf_trace_run4+0x18d/0x2f0 kernel/trace/bpf_trace.c:2314
__bpf_trace_sched_switch+0xe/0x10 include/trace/events/sched.h:222
__traceiter_sched_switch+0x91/0xc0 include/trace/events/sched.h:222
trace_sched_switch include/trace/events/sched.h:222 [inline]
__schedule+0x1305/0x1550 kernel/sched/core.c:6741
schedule+0xc3/0x180 kernel/sched/core.c:6820
futex_wait_queue+0xf2/0x250 kernel/futex/waitwake.c:361
futex_wait+0x212/0x7e0 kernel/futex/waitwake.c:664
do_futex+0x55a/0x9a0 kernel/futex/syscalls.c:108
__do_sys_futex kernel/futex/syscalls.c:185 [inline]
__se_sys_futex+0x35e/0x3c0 kernel/futex/syscalls.c:166
__x64_sys_futex+0xe5/0x100 kernel/futex/syscalls.c:166
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:81
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f3e71175bd9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f3e71f510f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: ffffffffffffffda RBX: 00007f3e71303f68 RCX: 00007f3e71175bd9
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f3e71303f68
RBP: 00007f3e71303f60 R08: 00007f3e71f516c0 R09: 00007f3e71f516c0
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f3e71303f6c
R13: 000000000000000b R14: 00007ffebd7b0f50 R15: 00007ffebd7b1038
Modules linked in:
CR2: ffffc90005ec0000
---[ end trace 0000000000000000 ]---
RIP: 0010:jhash include/linux/jhash.h:80 [inline]
RIP: 0010:hash+0x2a4/0xc20 kernel/bpf/bloom_filter.c:39
Code: 00 00 00 fc ff df 0f b6 04 10 84 c0 0f 85 ff 00 00 00 4a 8d 7c 36 03 48 89 f8 48 c1 e8 03 0f b6 04 10 84 c0 0f 85 17 01 00 00 <46> 03 3c 36 4a 8d 7c 36 04 48 89 f8 48 c1 e8 03 0f b6 04 10 84 c0
RSP: 0018:ffffc90005ebf750 EFLAGS: 00010082
RAX: 0000000000000000 RBX: 00000000bb66d671 RCX: ffffffff8191f0e5
RDX: dffffc0000000000 RSI: ffffc90005ebf808 RDI: ffffc90005ec0003
RBP: ffffc90005ebf790 R08: 00000000fffff7fa R09: fffffbfff0f264fd
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000067b7ea5d
R13: 00000000fffff7fa R14: 00000000000007f8 R15: 000000000bae1442
FS: 00007f3e71f516c0(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffc90005ec0000 CR3: 00000001188f9000 CR4: 00000000003506a0
----------------
Code disassembly (best guess), 5 bytes skipped:
0: df 0f fisttps (%rdi)
2: b6 04 mov $0x4,%dh
4: 10 84 c0 0f 85 ff 00 adc %al,0xff850f(%rax,%rax,8)
b: 00 00 add %al,(%rax)
d: 4a 8d 7c 36 03 lea 0x3(%rsi,%r14,1),%rdi
12: 48 89 f8 mov %rdi,%rax
15: 48 c1 e8 03 shr $0x3,%rax
19: 0f b6 04 10 movzbl (%rax,%rdx,1),%eax
1d: 84 c0 test %al,%al
1f: 0f 85 17 01 00 00 jne 0x13c
* 25: 46 03 3c 36 add (%rsi,%r14,1),%r15d <-- trapping instruction
29: 4a 8d 7c 36 04 lea 0x4(%rsi,%r14,1),%rdi
2e: 48 89 f8 mov %rdi,%rax
31: 48 c1 e8 03 shr $0x3,%rax
35: 0f b6 04 10 movzbl (%rax,%rdx,1),%eax
39: 84 c0 test %al,%al