==================================================================
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 ffffc90002d4fbe0 by task syz-executor.0/439
CPU: 0 PID: 439 Comm: syz-executor.0 Not tainted 6.1.75-syzkaller #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:284 [inline]
print_report+0x158/0x4e0 mm/kasan/report.c:395
kasan_report+0x13c/0x170 mm/kasan/report.c:495
__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_peek_elem+0xac/0x1a0 kernel/bpf/bloom_filter.c:51
bpf_prog_00798911c748094f+0x3a/0x3e
bpf_dispatcher_nop_func include/linux/bpf.h:989 [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_run2+0x133/0x290 kernel/trace/bpf_trace.c:2314
__bpf_trace_ext4_drop_inode+0x23/0x30 include/trace/events/ext4.h:251
__traceiter_ext4_drop_inode+0x75/0xc0 include/trace/events/ext4.h:251
trace_ext4_drop_inode include/trace/events/ext4.h:251 [inline]
ext4_drop_inode+0x145/0x1a0 fs/ext4/super.c:1365
iput_final fs/inode.c:1761 [inline]
iput+0x393/0x870 fs/inode.c:1817
do_unlinkat+0x4dd/0x820 fs/namei.c:4405
__do_sys_unlink fs/namei.c:4446 [inline]
__se_sys_unlink fs/namei.c:4444 [inline]
__x64_sys_unlink+0x49/0x50 fs/namei.c:4444
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:0x7f710527d557
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 57 00 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:00007ffd7857b018 EFLAGS: 00000206 ORIG_RAX: 0000000000000057
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f710527d557
RDX: 00007ffd7857b040 RSI: 00007ffd7857b0d0 RDI: 00007ffd7857b0d0
RBP: 00007ffd7857b0d0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000100 R11: 0000000000000206 R12: 00007ffd7857c190
R13: 00007f71052c93b9 R14: 000000000000ac6d R15: 0000000000000004
The buggy address belongs to stack of task syz-executor.0/439
and is located at offset 0 in frame:
bpf_trace_run2+0x0/0x290
This frame has 1 object:
[32, 48) 'args'
The buggy address belongs to the virtual mapping at
[ffffc90002d48000, ffffc90002d51000) created by:
copy_process+0x5cd/0x3470 kernel/fork.c:2098
The buggy address belongs to the physical page:
page:ffffea00043d95c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10f657
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 431, tgid 431 (syz-executor.0), ts 41916863664, free_ts 22120974079
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook+0x1e2/0x1f0 mm/page_alloc.c:2513
prep_new_page mm/page_alloc.c:2520 [inline]
get_page_from_freelist+0x2df3/0x2ed0 mm/page_alloc.c:4279
__alloc_pages+0x3c2/0x7d0 mm/page_alloc.c:5545
__vmalloc_area_node mm/vmalloc.c:3051 [inline]
__vmalloc_node_range+0x89b/0x1540 mm/vmalloc.c:3223
alloc_thread_stack_node kernel/fork.c:311 [inline]
dup_task_struct+0x400/0x6b0 kernel/fork.c:988
copy_process+0x5cd/0x3470 kernel/fork.c:2098
kernel_clone+0x229/0x880 kernel/fork.c:2682
__do_sys_clone kernel/fork.c:2823 [inline]
__se_sys_clone kernel/fork.c:2807 [inline]
__x64_sys_clone+0x231/0x280 kernel/fork.c:2807
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:24 [inline]
free_pages_prepare mm/page_alloc.c:1440 [inline]
free_pcp_prepare mm/page_alloc.c:1513 [inline]
free_unref_page_prepare+0x83d/0x850 mm/page_alloc.c:3358
free_unref_page+0x36/0x3c0 mm/page_alloc.c:3453
free_the_page mm/page_alloc.c:750 [inline]
__free_pages+0x61/0xf0 mm/page_alloc.c:5634
__free_slab+0xce/0x1a0 mm/slub.c:2016
free_slab mm/slub.c:2031 [inline]
discard_slab+0x29/0x40 mm/slub.c:2037
__slab_free+0x205/0x280 mm/slub.c:3574
do_slab_free mm/slub.c:3615 [inline]
___cache_free+0xc6/0xd0 mm/slub.c:3668
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:305
kasan_slab_alloc include/linux/kasan.h:201 [inline]
slab_post_alloc_hook+0x53/0x2c0 mm/slab.h:737
slab_alloc_node mm/slub.c:3398 [inline]
kmem_cache_alloc_node+0x18a/0x2d0 mm/slub.c:3443
__alloc_skb+0xcc/0x2d0 net/core/skbuff.c:505
alloc_skb include/linux/skbuff.h:1276 [inline]
alloc_skb_with_frags+0xa6/0x680 net/core/skbuff.c:6156
sock_alloc_send_pskb+0x915/0xa50 net/core/sock.c:2745
sock_alloc_send_skb include/net/sock.h:1908 [inline]
mld_newpack+0x1c0/0xa90 net/ipv6/mcast.c:1748
Memory state around the buggy address:
ffffc90002d4fa80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffffc90002d4fb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffffc90002d4fb80: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1
^
ffffc90002d4fc00: 00 00 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
ffffc90002d4fc80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
BUG: unable to handle page fault for address: ffffc90002d50000
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 100000067 P4D 100000067 PUD 100154067 PMD 10f999067 PTE 0
Oops: 0000 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 439 Comm: syz-executor.0 Tainted: G B 6.1.75-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
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:ffffc90002d4fae8 EFLAGS: 00010286
RAX: 0000000000000000 RBX: 00000000ea93ff85 RCX: ffffffff818fb197
RDX: 0000000000000000 RSI: ffffc90002d4fff8 RDI: ffffc90002d50000
RBP: ffffc90002d4fb28 R08: 000000003ffffe69 R09: fffffbfff0d9d4f5
R10: 0000000000000000 R11: dffffc0000000001 R12: 00000000ad9bae96
R13: 00000000c4040d90 R14: ffffc90002d50004 R15: 000000003ffffe69
FS: 00005555565dd480(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffc90002d50000 CR3: 000000010f658000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
bloom_map_peek_elem+0xac/0x1a0 kernel/bpf/bloom_filter.c:51
bpf_prog_00798911c748094f+0x3a/0x3e
bpf_dispatcher_nop_func include/linux/bpf.h:989 [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_run2+0x133/0x290 kernel/trace/bpf_trace.c:2314
__bpf_trace_ext4_drop_inode+0x23/0x30 include/trace/events/ext4.h:251
__traceiter_ext4_drop_inode+0x75/0xc0 include/trace/events/ext4.h:251
trace_ext4_drop_inode include/trace/events/ext4.h:251 [inline]
ext4_drop_inode+0x145/0x1a0 fs/ext4/super.c:1365
iput_final fs/inode.c:1761 [inline]
iput+0x393/0x870 fs/inode.c:1817
do_unlinkat+0x4dd/0x820 fs/namei.c:4405
__do_sys_unlink fs/namei.c:4446 [inline]
__se_sys_unlink fs/namei.c:4444 [inline]
__x64_sys_unlink+0x49/0x50 fs/namei.c:4444
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:0x7f710527d557
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 57 00 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:00007ffd7857b018 EFLAGS: 00000206 ORIG_RAX: 0000000000000057
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f710527d557
RDX: 00007ffd7857b040 RSI: 00007ffd7857b0d0 RDI: 00007ffd7857b0d0
RBP: 00007ffd7857b0d0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000100 R11: 0000000000000206 R12: 00007ffd7857c190
R13: 00007f71052c93b9 R14: 000000000000ac6d R15: 0000000000000004
Modules linked in:
CR2: ffffc90002d50000
---[ 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:ffffc90002d4fae8 EFLAGS: 00010286
RAX: 0000000000000000 RBX: 00000000ea93ff85 RCX: ffffffff818fb197
RDX: 0000000000000000 RSI: ffffc90002d4fff8 RDI: ffffc90002d50000
RBP: ffffc90002d4fb28 R08: 000000003ffffe69 R09: fffffbfff0d9d4f5
R10: 0000000000000000 R11: dffffc0000000001 R12: 00000000ad9bae96
R13: 00000000c4040d90 R14: ffffc90002d50004 R15: 000000003ffffe69
FS: 00005555565dd480(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffc90002d50000 CR3: 000000010f658000 CR4: 00000000003506b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: c1 e8 03 shr $0x3,%eax
3: 0f b6 04 10 movzbl (%rax,%rdx,1),%eax
7: 84 c0 test %al,%al
9: 0f 85 db 00 00 00 jne 0xea
f: 41 03 5e f8 add -0x8(%r14),%ebx
13: 48 8d 7e 08 lea 0x8(%rsi),%rdi
17: 48 89 f8 mov %rdi,%rax
1a: 48 c1 e8 03 shr $0x3,%rax
1e: 0f b6 04 10 movzbl (%rax,%rdx,1),%eax
22: 84 c0 test %al,%al
24: 0f 85 f2 00 00 00 jne 0x11c
* 2a: 45 03 66 fc add -0x4(%r14),%r12d <-- trapping instruction
2e: 45 29 e5 sub %r12d,%r13d
31: 44 89 e0 mov %r12d,%eax
34: c1 c0 04 rol $0x4,%eax
37: 44 31 e8 xor %r13d,%eax
3a: 41 01 dc add %ebx,%r12d
3d: 89 c1 mov %eax,%ecx
3f: c1 .byte 0xc1