==================================================================
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 ffffc9000122f300 by task syz-executor.1/12265
CPU: 1 PID: 12265 Comm: syz-executor.1 Not tainted 6.1.75-syzkaller-00003-g4d55129aea65 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/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:600 [inline]
bpf_prog_run include/linux/filter.h:607 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2275 [inline]
bpf_trace_run1+0x106/0x240 kernel/trace/bpf_trace.c:2313
__bpf_trace_mm_page_free_batched+0x43/0x60 include/trace/events/kmem.h:158
__traceiter_mm_page_free_batched+0x22/0x40 include/trace/events/kmem.h:158
trace_mm_page_free_batched include/trace/events/kmem.h:158 [inline]
free_unref_page_list+0x750/0x7b0 mm/page_alloc.c:3700
release_pages+0xf7f/0xfe0 mm/swap.c:1063
__pagevec_release+0x84/0x100 mm/swap.c:1083
pagevec_release include/linux/pagevec.h:71 [inline]
folio_batch_release include/linux/pagevec.h:135 [inline]
truncate_inode_pages_range+0x1d1/0x1020 mm/truncate.c:374
truncate_pagecache_range+0xa1/0xb0 mm/truncate.c:876
ext4_punch_hole+0x482/0xc00 fs/ext4/inode.c:4091
ext4_fallocate+0x318/0x1e90 fs/ext4/extents.c:4708
vfs_fallocate+0x492/0x570 fs/open.c:324
do_vfs_ioctl+0x2150/0x29a0 fs/ioctl.c:849
__do_sys_ioctl fs/ioctl.c:868 [inline]
__se_sys_ioctl+0x99/0x190 fs/ioctl.c:856
__x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:856
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:0x7f117287dd69
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 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 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f11736aa0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f11729abf80 RCX: 00007f117287dd69
RDX: 0000000020000280 RSI: 000000004030582b RDI: 000000000000000b
RBP: 00007f11728ca49e R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f11729abf80 R15: 00007ffedf46c838
The buggy address belongs to stack of task syz-executor.1/12265
and is located at offset 0 in frame:
bpf_trace_run1+0x0/0x240
This frame has 1 object:
[32, 40) 'args'
The buggy address belongs to the virtual mapping at
[ffffc90001228000, ffffc90001231000) created by:
copy_process+0x5c3/0x3530 kernel/fork.c:2199
The buggy address belongs to the physical page:
page:ffffea00045df040 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1177c1
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 9975, tgid 9975 (syz-executor.1), ts 254619266415, free_ts 254319811909
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:5712
__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_clone kernel/fork.c:2929 [inline]
__se_sys_clone kernel/fork.c:2913 [inline]
__x64_sys_clone+0x231/0x280 kernel/fork.c:2913
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:5801
__vunmap+0x9f3/0xb60 mm/vmalloc.c:2728
__vfree mm/vmalloc.c:2776 [inline]
vfree+0x5c/0x80 mm/vmalloc.c:2807
kvfree+0x26/0x40 mm/util.c:637
bpf_map_area_free+0x15/0x20 kernel/bpf/syscall.c:351
array_map_free+0x4fa/0x590
bpf_map_free_deferred+0xf7/0x1b0 kernel/bpf/syscall.c:622
process_one_work+0x73d/0xcb0 kernel/workqueue.c:2299
worker_thread+0xa60/0x1260 kernel/workqueue.c:2446
kthread+0x26d/0x300 kernel/kthread.c:386
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
Memory state around the buggy address:
ffffc9000122f200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc9000122f280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffc9000122f300: f1 f1 f1 f1 00 f3 f3 f3 00 00 00 00 00 00 00 00
^
ffffc9000122f380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc9000122f400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
BUG: unable to handle page fault for address: ffffc90001230000
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 100000067 P4D 100000067 PUD 100154067 PMD 12564a067 PTE 0
Oops: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 12265 Comm: syz-executor.1 Tainted: G B 6.1.75-syzkaller-00003-g4d55129aea65 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/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:ffffc9000122f210 EFLAGS: 00010282
RAX: 0000000000000000 RBX: 0000000036989841 RCX: ffffffff8191d745
RDX: dffffc0000000000 RSI: ffffc9000122f2c8 RDI: ffffc90001230003
RBP: ffffc9000122f250 R08: 00000000fffff2b6 R09: fffffbfff0f260fd
R10: 0000000000000000 R11: dffffc0000000001 R12: 00000000c68dc4a0
R13: 00000000fffff2b6 R14: 0000000000000d38 R15: 00000000cfa3fab7
FS: 00007f11736aa6c0(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffc90001230000 CR3: 000000010f369000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
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:600 [inline]
bpf_prog_run include/linux/filter.h:607 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2275 [inline]
bpf_trace_run1+0x106/0x240 kernel/trace/bpf_trace.c:2313
__bpf_trace_mm_page_free_batched+0x43/0x60 include/trace/events/kmem.h:158
__traceiter_mm_page_free_batched+0x22/0x40 include/trace/events/kmem.h:158
trace_mm_page_free_batched include/trace/events/kmem.h:158 [inline]
free_unref_page_list+0x750/0x7b0 mm/page_alloc.c:3700
release_pages+0xf7f/0xfe0 mm/swap.c:1063
__pagevec_release+0x84/0x100 mm/swap.c:1083
pagevec_release include/linux/pagevec.h:71 [inline]
folio_batch_release include/linux/pagevec.h:135 [inline]
truncate_inode_pages_range+0x1d1/0x1020 mm/truncate.c:374
truncate_pagecache_range+0xa1/0xb0 mm/truncate.c:876
ext4_punch_hole+0x482/0xc00 fs/ext4/inode.c:4091
ext4_fallocate+0x318/0x1e90 fs/ext4/extents.c:4708
vfs_fallocate+0x492/0x570 fs/open.c:324
do_vfs_ioctl+0x2150/0x29a0 fs/ioctl.c:849
__do_sys_ioctl fs/ioctl.c:868 [inline]
__se_sys_ioctl+0x99/0x190 fs/ioctl.c:856
__x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:856
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:0x7f117287dd69
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 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 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f11736aa0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f11729abf80 RCX: 00007f117287dd69
RDX: 0000000020000280 RSI: 000000004030582b RDI: 000000000000000b
RBP: 00007f11728ca49e R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f11729abf80 R15: 00007ffedf46c838
Modules linked in:
CR2: ffffc90001230000
---[ 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:ffffc9000122f210 EFLAGS: 00010282
RAX: 0000000000000000 RBX: 0000000036989841 RCX: ffffffff8191d745
RDX: dffffc0000000000 RSI: ffffc9000122f2c8 RDI: ffffc90001230003
RBP: ffffc9000122f250 R08: 00000000fffff2b6 R09: fffffbfff0f260fd
R10: 0000000000000000 R11: dffffc0000000001 R12: 00000000c68dc4a0
R13: 00000000fffff2b6 R14: 0000000000000d38 R15: 00000000cfa3fab7
FS: 00007f11736aa6c0(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffc90001230000 CR3: 000000010f369000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
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