================================================================== 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 ffffc900000a6c60 by task kworker/u4:1/10 CPU: 1 PID: 10 Comm: kworker/u4:1 Not tainted 6.1.75-syzkaller-00108-g3ca4271578e1 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Workqueue: writeback wb_workfn (flush-8:0) 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 __traceiter_jbd2_handle_stats+0x96/0xf0 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_writepages+0x130b/0x3fd0 fs/ext4/inode.c:2857 do_writepages+0x385/0x620 mm/page-writeback.c:2472 __writeback_single_inode+0xdc/0xb80 fs/fs-writeback.c:1612 writeback_sb_inodes+0xb32/0x1910 fs/fs-writeback.c:1903 __writeback_inodes_wb+0x118/0x3f0 fs/fs-writeback.c:1974 wb_writeback+0x3cd/0x9f0 fs/fs-writeback.c:2079 wb_check_old_data_flush fs/fs-writeback.c:2179 [inline] wb_do_writeback fs/fs-writeback.c:2232 [inline] wb_workfn+0xaf9/0x1030 fs/fs-writeback.c:2260 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 The buggy address belongs to stack of task kworker/u4:1/10 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 [ffffc900000a0000, ffffc900000a9000) created by: copy_process+0x5c3/0x3530 kernel/fork.c:2199 The buggy address belongs to the physical page: page:ffffea0004026180 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x100986 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 0x0(), pid 1, tgid 1 (swapper/0), ts 1272388129, free_ts 0 create_dummy_stack mm/page_owner.c:68 [inline] register_early_stack+0x86/0xe0 mm/page_owner.c:84 init_page_owner+0x3d/0x650 mm/page_owner.c:94 invoke_init_callbacks mm/page_ext.c:130 [inline] page_ext_init+0x3a6/0x3cb mm/page_ext.c:524 kernel_init_freeable+0x2ec/0x451 init/main.c:1620 page_owner free stack trace missing Memory state around the buggy address: ffffc900000a6b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc900000a6b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc900000a6c00: 00 00 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 ^ ffffc900000a6c80: 00 00 00 00 00 00 00 00 f3 f3 f3 f3 00 00 00 00 ffffc900000a6d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== BUG: unable to handle page fault for address: ffffc900000a8000 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 100000067 P4D 100000067 PUD 100154067 PMD 100155067 PTE 0 Oops: 0000 [#1] PREEMPT SMP KASAN CPU: 1 PID: 10 Comm: kworker/u4:1 Tainted: G B 6.1.75-syzkaller-00108-g3ca4271578e1 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Workqueue: writeback wb_workfn (flush-8:0) 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:ffffc900000a6b68 EFLAGS: 00010282 RAX: 0000000000000000 RBX: 00000000557a5ae8 RCX: ffffffff8191c465 RDX: dffffc0000000000 RSI: ffffc900000a6c28 RDI: ffffc900000a8003 RBP: ffffc900000a6ba8 R08: 00000000ffffec1b R09: fffffbfff0ee5efd R10: 0000000000000000 R11: dffffc0000000001 R12: 00000000ce98b9c5 R13: 00000000ffffec1b R14: 00000000000013d4 R15: 00000000646888b4 FS: 0000000000000000(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffc900000a8000 CR3: 0000000121434000 CR4: 00000000003506a0 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 __traceiter_jbd2_handle_stats+0x96/0xf0 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_writepages+0x130b/0x3fd0 fs/ext4/inode.c:2857 do_writepages+0x385/0x620 mm/page-writeback.c:2472 __writeback_single_inode+0xdc/0xb80 fs/fs-writeback.c:1612 writeback_sb_inodes+0xb32/0x1910 fs/fs-writeback.c:1903 __writeback_inodes_wb+0x118/0x3f0 fs/fs-writeback.c:1974 wb_writeback+0x3cd/0x9f0 fs/fs-writeback.c:2079 wb_check_old_data_flush fs/fs-writeback.c:2179 [inline] wb_do_writeback fs/fs-writeback.c:2232 [inline] wb_workfn+0xaf9/0x1030 fs/fs-writeback.c:2260 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 Modules linked in: CR2: ffffc900000a8000 ---[ 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:ffffc900000a6b68 EFLAGS: 00010282 RAX: 0000000000000000 RBX: 00000000557a5ae8 RCX: ffffffff8191c465 RDX: dffffc0000000000 RSI: ffffc900000a6c28 RDI: ffffc900000a8003 RBP: ffffc900000a6ba8 R08: 00000000ffffec1b R09: fffffbfff0ee5efd R10: 0000000000000000 R11: dffffc0000000001 R12: 00000000ce98b9c5 R13: 00000000ffffec1b R14: 00000000000013d4 R15: 00000000646888b4 FS: 0000000000000000(0000) GS:ffff8881f7100000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffc900000a8000 CR3: 0000000121434000 CR4: 00000000003506a0 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