================================================================== 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 ffffc90000f37980 by task syz-executor588/301 CPU: 0 PID: 301 Comm: syz-executor588 Not tainted 6.1.75-syzkaller-00108-g3ca4271578e1 #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_peek_elem+0xac/0x1a0 kernel/bpf/bloom_filter.c:51 bpf_prog_00798911c748094f+0x3a/0x3e 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_symlink+0x98e/0xc10 fs/ext4/namei.c:3438 vfs_symlink+0x24e/0x3e0 fs/namei.c:4478 do_symlinkat+0x1ea/0x5a0 fs/namei.c:4507 __do_sys_symlink fs/namei.c:4529 [inline] __se_sys_symlink fs/namei.c:4527 [inline] __x64_sys_symlink+0x7e/0x90 fs/namei.c:4527 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:0x7fa282756f57 Code: 7b 00 00 00 48 8d 35 70 c3 04 00 48 8d 3d 91 c3 04 00 e8 dc 19 fd ff e8 27 1e 00 00 0f 1f 80 00 00 00 00 b8 58 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffcc8cbbda8 EFLAGS: 00000206 ORIG_RAX: 0000000000000058 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fa282756f57 RDX: 0000000000000004 RSI: 00007fa2827a002d RDI: 00007fa2827a0038 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000001 R13: 00007ffcc8cbc148 R14: 00007ffcc8cbbde0 R15: 0000000000000000 The buggy address belongs to stack of task syz-executor588/301 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 [ffffc90000f30000, ffffc90000f39000) created by: copy_process+0x5c3/0x3530 kernel/fork.c:2199 The buggy address belongs to the physical page: page:ffffea0004251580 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109456 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 0x2dc2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_NOWARN|__GFP_ZERO), pid 294, tgid 294 (syz-executor588), ts 21123579220, free_ts 17312168865 set_page_owner include/linux/page_owner.h:33 [inline] post_alloc_hook+0x213/0x220 mm/page_alloc.c:2566 prep_new_page+0x1b/0x110 mm/page_alloc.c:2573 get_page_from_freelist+0x27ea/0x2870 mm/page_alloc.c:4397 __alloc_pages+0x3a1/0x780 mm/page_alloc.c:5684 __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:1474 [inline] free_pcp_prepare mm/page_alloc.c:1548 [inline] free_unref_page_prepare+0x83d/0x850 mm/page_alloc.c:3470 free_unref_page+0xb2/0x5c0 mm/page_alloc.c:3566 free_the_page mm/page_alloc.c:774 [inline] __free_pages+0x61/0xf0 mm/page_alloc.c:5773 __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+0x19/0x20 fs/namei.c:218 do_sys_openat2+0xd7/0x850 fs/open.c:1335 Memory state around the buggy address: ffffc90000f37880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90000f37900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc90000f37980: f1 f1 f1 f1 00 00 00 00 00 00 00 00 f3 f3 f3 f3 ^ ffffc90000f37a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc90000f37a80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== BUG: unable to handle page fault for address: ffffc90000f38000 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 100000067 P4D 100000067 PUD 100154067 PMD 121ae5067 PTE 0 Oops: 0000 [#2] PREEMPT SMP KASAN CPU: 0 PID: 301 Comm: syz-executor588 Tainted: G B D 6.1.75-syzkaller-00108-g3ca4271578e1 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 RIP: 0010:jhash include/linux/jhash.h:81 [inline] RIP: 0010:hash+0x2d8/0xc20 kernel/bpf/bloom_filter.c:39 Code: 89 f8 48 c1 e8 03 0f b6 04 10 84 c0 0f 85 2b 01 00 00 4a 8d 7c 36 07 48 89 f8 48 c1 e8 03 0f b6 04 10 84 c0 0f 85 43 01 00 00 <42> 03 5c 36 04 4a 8d 7c 36 08 48 89 f8 48 c1 e8 03 0f b6 04 10 84 RSP: 0018:ffffc90000f37888 EFLAGS: 00010282 RAX: 0000000000000000 RBX: 000000000b02ce77 RCX: ffffffff8191c465 RDX: dffffc0000000000 RSI: ffffc90000f37948 RDI: ffffc90000f38003 RBP: ffffc90000f378c8 R08: 00000000fffff93b R09: fffffbfff0ee5efd R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000088c45666 R13: 00000000fffff93b R14: 00000000000006b4 R15: 0000000080bc3495 FS: 0000555556ebd380(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffc90000f38000 CR3: 0000000109455000 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: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_symlink+0x98e/0xc10 fs/ext4/namei.c:3438 vfs_symlink+0x24e/0x3e0 fs/namei.c:4478 do_symlinkat+0x1ea/0x5a0 fs/namei.c:4507 __do_sys_symlink fs/namei.c:4529 [inline] __se_sys_symlink fs/namei.c:4527 [inline] __x64_sys_symlink+0x7e/0x90 fs/namei.c:4527 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:0x7fa282756f57 Code: 7b 00 00 00 48 8d 35 70 c3 04 00 48 8d 3d 91 c3 04 00 e8 dc 19 fd ff e8 27 1e 00 00 0f 1f 80 00 00 00 00 b8 58 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffcc8cbbda8 EFLAGS: 00000206 ORIG_RAX: 0000000000000058 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fa282756f57 RDX: 0000000000000004 RSI: 00007fa2827a002d RDI: 00007fa2827a0038 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000001 R13: 00007ffcc8cbc148 R14: 00007ffcc8cbbde0 R15: 0000000000000000 Modules linked in: CR2: ffffc90000f38000 ---[ end trace 0000000000000000 ]--- RIP: 0010:jhash include/linux/jhash.h:81 [inline] RIP: 0010:hash+0x2d8/0xc20 kernel/bpf/bloom_filter.c:39 Code: 89 f8 48 c1 e8 03 0f b6 04 10 84 c0 0f 85 2b 01 00 00 4a 8d 7c 36 07 48 89 f8 48 c1 e8 03 0f b6 04 10 84 c0 0f 85 43 01 00 00 <42> 03 5c 36 04 4a 8d 7c 36 08 48 89 f8 48 c1 e8 03 0f b6 04 10 84 RSP: 0018:ffffc90000f47888 EFLAGS: 00010282 RAX: 0000000000000000 RBX: 000000004cc65499 RCX: ffffffff8191c465 RDX: dffffc0000000000 RSI: ffffc90000f47948 RDI: ffffc90000f48003 RBP: ffffc90000f478c8 R08: 00000000fffff93b R09: 0000000000000000 R10: 0000000000000000 R11: dffffc0000000001 R12: 000000000440d7da R13: 00000000fffff93b R14: 00000000000006b4 R15: 00000000f3688ca6 FS: 0000555556ebd380(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffc90000f38000 CR3: 0000000109455000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 ---------------- Code disassembly (best guess): 0: 89 f8 mov %edi,%eax 2: 48 c1 e8 03 shr $0x3,%rax 6: 0f b6 04 10 movzbl (%rax,%rdx,1),%eax a: 84 c0 test %al,%al c: 0f 85 2b 01 00 00 jne 0x13d 12: 4a 8d 7c 36 07 lea 0x7(%rsi,%r14,1),%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 43 01 00 00 jne 0x16d * 2a: 42 03 5c 36 04 add 0x4(%rsi,%r14,1),%ebx <-- trapping instruction 2f: 4a 8d 7c 36 08 lea 0x8(%rsi,%r14,1),%rdi 34: 48 89 f8 mov %rdi,%rax 37: 48 c1 e8 03 shr $0x3,%rax 3b: 0f b6 04 10 movzbl (%rax,%rdx,1),%eax 3f: 84 .byte 0x84