==================================================================
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 ffffc9000b8075a0 by task syz-executor.0/23652
CPU: 1 PID: 23652 Comm: syz-executor.0 Not tainted 6.1.75-syzkaller-00016-ga9dca663a7f2 #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_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_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_run8+0x1f8/0x330 kernel/trace/bpf_trace.c:2320
__bpf_trace_jbd2_handle_stats+0x4a/0x60 include/trace/events/jbd2.h:210
trace_jbd2_handle_stats include/trace/events/jbd2.h:210 [inline]
jbd2_journal_stop+0xc11/0xc70 fs/jbd2/transaction.c:1859
__ext4_journal_stop+0x111/0x1c0 fs/ext4/ext4_jbd2.c:127
ext4_create+0x2f4/0x550 fs/ext4/namei.c:2847
lookup_open fs/namei.c:3489 [inline]
open_last_lookups fs/namei.c:3557 [inline]
path_openat+0x12ee/0x2d60 fs/namei.c:3787
do_filp_open+0x230/0x480 fs/namei.c:3817
do_sys_openat2+0x13f/0x850 fs/open.c:1341
do_sys_open fs/open.c:1357 [inline]
__do_sys_openat fs/open.c:1373 [inline]
__se_sys_openat fs/open.c:1368 [inline]
__x64_sys_openat+0x243/0x290 fs/open.c:1368
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:0x7fe844c7cee9
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:00007fe8459d70c8 EFLAGS: 00000246
ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fe844dabf80 RCX: 00007fe844c7cee9
RDX: 000000000000275a RSI: 0000000020000140 RDI: ffffffffffffff9c
RBP: 00007fe844cc949e R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007fe844dabf80 R15: 00007ffc38c9ef88
The buggy address belongs to stack of task syz-executor.0/23652
and is located at offset 0 in frame:
bpf_trace_run8+0x0/0x330
This frame has 1 object:
[32, 96) 'args'
The buggy address belongs to the virtual mapping at
[ffffc9000b800000, ffffc9000b809000) created by:
copy_process+0x5c3/0x3530 kernel/fork.c:2199
The buggy address belongs to the physical page:
page:ffffea00044ad280 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x112b4a
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 22770, tgid 22770 (syz-executor.0), ts 2015555291312, free_ts 1999550827264
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
free_pages+0x7c/0x90 mm/page_alloc.c:5812
kasan_depopulate_vmalloc_pte+0x6a/0x90 mm/kasan/shadow.c:375
apply_to_pte_range mm/memory.c:2660 [inline]
apply_to_pmd_range mm/memory.c:2704 [inline]
apply_to_pud_range mm/memory.c:2740 [inline]
apply_to_p4d_range mm/memory.c:2776 [inline]
__apply_to_page_range+0x8dd/0xbe0 mm/memory.c:2810
apply_to_existing_page_range+0x38/0x50 mm/memory.c:2843
kasan_release_vmalloc+0x9a/0xb0 mm/kasan/shadow.c:492
__purge_vmap_area_lazy+0x152c/0x1680 mm/vmalloc.c:1781
drain_vmap_area_work+0x3e/0xd0 mm/vmalloc.c:1810
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:
ffffc9000b807480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc9000b807500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffc9000b807580: 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00 00 00 00
^
ffffc9000b807600: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
ffffc9000b807680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
BUG: unable to handle page fault for address: ffffc9000b808000
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 100000067
P4D 100000067
PUD 100154067
PMD 130e47067 PTE 0
Oops: 0000 [#2] PREEMPT SMP KASAN
CPU: 1 PID: 23652 Comm: syz-executor.0 Tainted: G B D 6.1.75-syzkaller-00016-ga9dca663a7f2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
RIP: 0010:jhash2 include/linux/jhash.h:126 [inline]
RIP: 0010:hash+0xe3/0xc20 kernel/bpf/bloom_filter.c:36
Code: 83 c6 0c 41 83 c0 fd 45 89 ec 44 89 eb 48 89 f0 48 c1 e8 03 48 ba 00 00 00 00 00 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
RSP: 0018:ffffc9000b8074b0 EFLAGS: 00010282
RAX: 0000000000000000 RBX: 00000000cb0aa513 RCX: ffffffff8191d533
RDX: dffffc0000000000 RSI: ffffc9000b808000 RDI: ffffc9000b808000
RBP: ffffc9000b8074f0 R08: 000000003ffffc57 R09: fffffbfff0f260fd
R10: 0000000000000000 R11: dffffc0000000001 R12: 00000000c81f5acc
R13: 00000000ab9cd06d R14: ffffc9000b80800c R15: ffffc9000b808000
FS: 00007fe8459d76c0(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffc9000b808000 CR3: 000000012080e000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600
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_run8+0x1f8/0x330 kernel/trace/bpf_trace.c:2320
__bpf_trace_jbd2_handle_stats+0x4a/0x60 include/trace/events/jbd2.h:210
trace_jbd2_handle_stats include/trace/events/jbd2.h:210 [inline]
jbd2_journal_stop+0xc11/0xc70 fs/jbd2/transaction.c:1859
__ext4_journal_stop+0x111/0x1c0 fs/ext4/ext4_jbd2.c:127
ext4_create+0x2f4/0x550 fs/ext4/namei.c:2847
lookup_open fs/namei.c:3489 [inline]
open_last_lookups fs/namei.c:3557 [inline]
path_openat+0x12ee/0x2d60 fs/namei.c:3787
do_filp_open+0x230/0x480 fs/namei.c:3817
do_sys_openat2+0x13f/0x850 fs/open.c:1341
do_sys_open fs/open.c:1357 [inline]
__do_sys_openat fs/open.c:1373 [inline]
__se_sys_openat fs/open.c:1368 [inline]
__x64_sys_openat+0x243/0x290 fs/open.c:1368
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:0x7fe844c7cee9
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:00007fe8459d70c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fe844dabf80 RCX: 00007fe844c7cee9
RDX: 000000000000275a RSI: 0000000020000140 RDI: ffffffffffffff9c
RBP: 00007fe844cc949e R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007fe844dabf80 R15: 00007ffc38c9ef88
Modules linked in:
CR2: ffffc9000b808000
---[ end trace 0000000000000000 ]---
RIP: 0010:jhash2 include/linux/jhash.h:128 [inline]
RIP: 0010:hash+0x119/0xc20 kernel/bpf/bloom_filter.c:36
Code: 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 85 f2 00 00 00 <45> 03 66 fc 45 29 e5 44 89 e0 c1 c0 04 44 31 e8 41 01 dc 89 c1 c1
RSP: 0018:ffffc9000b8f70d0 EFLAGS: 00010286
RAX: 0000000000000000 RBX: 00000000074426d0 RCX: ffffffff8191d597
RDX: 0000000000000000 RSI: ffffc9000b8f7ff8 RDI: ffffc9000b8f8000
RBP: ffffc9000b8f7110 R08: 000000003ffffb61 R09: 0000000000000000
R10: 0000000000000000 R11: dffffc0000000001 R12: 00000000baaa6b0a
R13: 00000000877f0dfb R14: ffffc9000b8f8004 R15: 000000003ffffb61
FS: 00007fe8459d76c0(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffc9000b808000 CR3: 000000012080e000 CR4: 00000000003506a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600
----------------
Code disassembly (best guess):
0: 83 c6 0c add $0xc,%esi
3: 41 83 c0 fd add $0xfffffffd,%r8d
7: 45 89 ec mov %r13d,%r12d
a: 44 89 eb mov %r13d,%ebx
d: 48 89 f0 mov %rsi,%rax
10: 48 c1 e8 03 shr $0x3,%rax
14: 48 ba 00 00 00 00 00 movabs $0xdffffc0000000000,%rdx
1b: fc ff df
1e: 0f b6 04 10 movzbl (%rax,%rdx,1),%eax
22: 84 c0 test %al,%al
24: 0f 85 c1 00 00 00 jne 0xeb
* 2a: 45 03 6e f4 add -0xc(%r14),%r13d <-- trapping instruction
2e: 48 8d 7e 04 lea 0x4(%rsi),%rdi
32: 48 89 f8 mov %rdi,%rax
35: 48 c1 e8 03 shr $0x3,%rax
39: 0f b6 04 10 movzbl (%rax,%rdx,1),%eax
3d: 84 c0 test %al,%al
3f: 0f .byte 0xf