==================================================================
BUG: KASAN: stack-out-of-bounds in jhash2 include/linux/jhash.h:128 [inline]
BUG: KASAN: stack-out-of-bounds in hash+0x227/0xc20 kernel/bpf/bloom_filter.c:36
Read of size 4 at addr ffffc90000c87260 by task syz-executor.1/527
CPU: 1 PID: 527 Comm: syz-executor.1 Not tainted 6.1.75-syzkaller-00026-g68c821783c76 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/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_load4_noabort+0x14/0x20 mm/kasan/report_generic.c:350
jhash2 include/linux/jhash.h:128 [inline]
hash+0x227/0xc20 kernel/bpf/bloom_filter.c:36
bloom_map_push_elem+0xce/0x180 kernel/bpf/bloom_filter.c:69
bpf_prog_bfd19630a338eafb+0x3f/0x43
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_ext4_mballoc_alloc+0x1d/0x30 include/trace/events/ext4.h:1021
trace_ext4_mballoc_alloc include/trace/events/ext4.h:1021 [inline]
ext4_mb_collect_stats fs/ext4/mballoc.c:4261 [inline]
ext4_mb_release_context fs/ext4/mballoc.c:5521 [inline]
ext4_mb_new_blocks+0x4720/0x48f0 fs/ext4/mballoc.c:5714
ext4_ext_map_blocks+0x19ca/0x71e0 fs/ext4/extents.c:4287
ext4_map_blocks+0xa36/0x1ca0 fs/ext4/inode.c:651
ext4_getblk+0x1eb/0x7b0 fs/ext4/inode.c:866
ext4_bread+0x2f/0x180 fs/ext4/inode.c:922
ext4_append+0x31f/0x5b0 fs/ext4/namei.c:83
ext4_init_new_dir+0x33f/0x620 fs/ext4/namei.c:2981
ext4_mkdir+0x4f2/0xce0 fs/ext4/namei.c:3027
vfs_mkdir+0x398/0x570 fs/namei.c:4113
do_mkdirat+0x1eb/0x450 fs/namei.c:4138
__do_sys_mkdirat fs/namei.c:4153 [inline]
__se_sys_mkdirat fs/namei.c:4151 [inline]
__x64_sys_mkdirat+0x89/0xa0 fs/namei.c:4151
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:0x7efdc887b9e7
Code: 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 02 01 00 00 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:00007ffdd54b7158 EFLAGS: 00000202 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 00007ffdd54b71e0 RCX: 00007efdc887b9e7
RDX: 00000000000001ff RSI: 00007ffdd54b71e0 RDI: 00000000ffffff9c
RBP: 00007ffdd54b71bc R08: 0000000000000004 R09: 00007ffdd54b6ef6
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000032
R13: 0000000000008dfc R14: 0000000000008dda R15: 000000000000000a
The buggy address belongs to stack of task syz-executor.1/527
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
[ffffc90000c80000, ffffc90000c89000) created by:
copy_process+0x5c3/0x3530 kernel/fork.c:2199
The buggy address belongs to the physical page:
page:ffffea0004e7d6c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x139f5b
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 313, tgid 313 (syz-executor.2), ts 27928757586, free_ts 27876527776
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_list+0xf1/0x7b0 mm/page_alloc.c:3646
release_pages+0xf7f/0xfe0 mm/swap.c:1063
free_pages_and_swap_cache+0x8a/0xa0 mm/swap_state.c:314
tlb_batch_pages_flush mm/mmu_gather.c:59 [inline]
tlb_flush_mmu_free mm/mmu_gather.c:254 [inline]
tlb_flush_mmu mm/mmu_gather.c:261 [inline]
tlb_finish_mmu+0x1e0/0x3f0 mm/mmu_gather.c:361
exit_mmap+0x421/0x940 mm/mmap.c:3348
__mmput+0x95/0x310 kernel/fork.c:1298
mmput+0x56/0x170 kernel/fork.c:1321
exit_mm kernel/exit.c:566 [inline]
do_exit+0xb29/0x2b80 kernel/exit.c:862
do_group_exit+0x21a/0x2d0 kernel/exit.c:1025
get_signal+0x169d/0x1820 kernel/signal.c:2880
arch_do_signal_or_restart+0xb0/0x16f0 arch/x86/kernel/signal.c:871
exit_to_user_mode_loop+0x74/0xa0 kernel/entry/common.c:168
exit_to_user_mode_prepare+0x5a/0xa0 kernel/entry/common.c:204
__syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline]
syscall_exit_to_user_mode+0x26/0x140 kernel/entry/common.c:297
do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:87
Memory state around the buggy address:
ffffc90000c87100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc90000c87180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffc90000c87200: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
^
ffffc90000c87280: 00 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
ffffc90000c87300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
BUG: unable to handle page fault for address: ffffc90000c88000
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 100000067 P4D 100000067 PUD 100154067 PMD 11ab85067 PTE 0
Oops: 0000 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 527 Comm: syz-executor.1 Tainted: G B 6.1.75-syzkaller-00026-g68c821783c76 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
RIP: 0010:jhash2 include/linux/jhash.h:127 [inline]
RIP: 0010:hash+0xfe/0xc20 kernel/bpf/bloom_filter.c:36
Code: fc ff df 0f b6 04 10 84 c0 0f 85 c1 00 00 00 45 03 6e f4 48 8d 7e 04 48 89 f8 48 c1 e8 03 0f b6 04 10 84 c0 0f 85 db 00 00 00 <41> 03 5e f8 48 8d 7e 08 48 89 f8 48 c1 e8 03 0f b6 04 10 84 c0 0f
RSP: 0018:ffffc90000c87170 EFLAGS: 00010286
RAX: 0000000000000000 RBX: 00000000fa66dd42 RCX: ffffffff8191d5d5
RDX: dffffc0000000000 RSI: ffffc90000c87ffc RDI: ffffc90000c88000
RBP: ffffc90000c871b0 R08: 000000003ffffc78 R09: fffffbfff0f260fd
R10: 0000000000000000 R11: dffffc0000000001 R12: 000000002ceae17c
R13: 000000009ad8355c R14: ffffc90000c88008 R15: ffffc90000c87ffc
FS: 0000555556f5c480(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffc90000c88000 CR3: 000000013291f000 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_bfd19630a338eafb+0x3f/0x43
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_ext4_mballoc_alloc+0x1d/0x30 include/trace/events/ext4.h:1021
trace_ext4_mballoc_alloc include/trace/events/ext4.h:1021 [inline]
ext4_mb_collect_stats fs/ext4/mballoc.c:4261 [inline]
ext4_mb_release_context fs/ext4/mballoc.c:5521 [inline]
ext4_mb_new_blocks+0x4720/0x48f0 fs/ext4/mballoc.c:5714
ext4_ext_map_blocks+0x19ca/0x71e0 fs/ext4/extents.c:4287
ext4_map_blocks+0xa36/0x1ca0 fs/ext4/inode.c:651
ext4_getblk+0x1eb/0x7b0 fs/ext4/inode.c:866
ext4_bread+0x2f/0x180 fs/ext4/inode.c:922
ext4_append+0x31f/0x5b0 fs/ext4/namei.c:83
ext4_init_new_dir+0x33f/0x620 fs/ext4/namei.c:2981
ext4_mkdir+0x4f2/0xce0 fs/ext4/namei.c:3027
vfs_mkdir+0x398/0x570 fs/namei.c:4113
do_mkdirat+0x1eb/0x450 fs/namei.c:4138
__do_sys_mkdirat fs/namei.c:4153 [inline]
__se_sys_mkdirat fs/namei.c:4151 [inline]
__x64_sys_mkdirat+0x89/0xa0 fs/namei.c:4151
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:0x7efdc887b9e7
Code: 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 02 01 00 00 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:00007ffdd54b7158 EFLAGS: 00000202 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 00007ffdd54b71e0 RCX: 00007efdc887b9e7
RDX: 00000000000001ff RSI: 00007ffdd54b71e0 RDI: 00000000ffffff9c
RBP: 00007ffdd54b71bc R08: 0000000000000004 R09: 00007ffdd54b6ef6
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000032
R13: 0000000000008dfc R14: 0000000000008dda R15: 000000000000000a
Modules linked in:
CR2: ffffc90000c88000
---[ end trace 0000000000000000 ]---
RIP: 0010:jhash2 include/linux/jhash.h:127 [inline]
RIP: 0010:hash+0xfe/0xc20 kernel/bpf/bloom_filter.c:36
Code: fc ff df 0f b6 04 10 84 c0 0f 85 c1 00 00 00 45 03 6e f4 48 8d 7e 04 48 89 f8 48 c1 e8 03 0f b6 04 10 84 c0 0f 85 db 00 00 00 <41> 03 5e f8 48 8d 7e 08 48 89 f8 48 c1 e8 03 0f b6 04 10 84 c0 0f
RSP: 0018:ffffc90000c87170 EFLAGS: 00010286
RAX: 0000000000000000 RBX: 00000000fa66dd42 RCX: ffffffff8191d5d5
RDX: dffffc0000000000 RSI: ffffc90000c87ffc RDI: ffffc90000c88000
RBP: ffffc90000c871b0 R08: 000000003ffffc78 R09: fffffbfff0f260fd
R10: 0000000000000000 R11: dffffc0000000001 R12: 000000002ceae17c
R13: 000000009ad8355c R14: ffffc90000c88008 R15: ffffc90000c87ffc
FS: 0000555556f5c480(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffc90000c88000 CR3: 000000013291f000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 2 bytes skipped:
0: df 0f fisttps (%rdi)
2: b6 04 mov $0x4,%dh
4: 10 84 c0 0f 85 c1 00 adc %al,0xc1850f(%rax,%rax,8)
b: 00 00 add %al,(%rax)
d: 45 03 6e f4 add -0xc(%r14),%r13d
11: 48 8d 7e 04 lea 0x4(%rsi),%rdi
15: 48 89 f8 mov %rdi,%rax
18: 48 c1 e8 03 shr $0x3,%rax
1c: 0f b6 04 10 movzbl (%rax,%rdx,1),%eax
20: 84 c0 test %al,%al
22: 0f 85 db 00 00 00 jne 0x103
* 28: 41 03 5e f8 add -0x8(%r14),%ebx <-- trapping instruction
2c: 48 8d 7e 08 lea 0x8(%rsi),%rdi
30: 48 89 f8 mov %rdi,%rax
33: 48 c1 e8 03 shr $0x3,%rax
37: 0f b6 04 10 movzbl (%rax,%rdx,1),%eax
3b: 84 c0 test %al,%al
3d: 0f .byte 0xf