================================================================== 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 ffffc9000112f680 by task syz.0.3488/11632 CPU: 0 PID: 11632 Comm: syz.0.3488 Not tainted 6.1.84-syzkaller-00013-g6d6afa9d3f8f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/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_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:596 [inline] bpf_prog_run include/linux/filter.h:610 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline] bpf_trace_run4+0x23f/0x2f0 kernel/trace/bpf_trace.c:2314 __bpf_trace_sched_switch+0xe/0x10 include/trace/events/sched.h:222 __traceiter_sched_switch+0x91/0xc0 include/trace/events/sched.h:222 trace_sched_switch include/trace/events/sched.h:222 [inline] __schedule+0x1305/0x1550 kernel/sched/core.c:6741 preempt_schedule_common+0x9b/0xf0 kernel/sched/core.c:6913 preempt_schedule+0xd9/0xe0 kernel/sched/core.c:6937 preempt_schedule_thunk+0x16/0x18 arch/x86/entry/thunk_64.S:34 try_to_wake_up+0x749/0x1220 kernel/sched/core.c:4393 wake_up_process kernel/sched/core.c:4521 [inline] wake_up_q+0xf0/0x1d0 kernel/sched/core.c:1030 futex_wake+0x735/0xb60 kernel/futex/waitwake.c:188 do_futex+0x501/0x9a0 kernel/futex/syscalls.c:113 __do_sys_futex kernel/futex/syscalls.c:185 [inline] __se_sys_futex+0x35e/0x3c0 kernel/futex/syscalls.c:166 __x64_sys_futex+0xe5/0x100 kernel/futex/syscalls.c:166 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:0x7f71b9f75b59 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f71bacd50f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: ffffffffffffffda RBX: 00007f71ba105f68 RCX: 00007f71b9f75b59 RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007f71ba105f6c RBP: 00007f71ba105f60 R08: 00007fff07d810b0 R09: 00007f71bacd56c0 R10: 0000000000000008 R11: 0000000000000246 R12: 00007f71ba105f6c R13: 000000000000000b R14: 00007fff07d145f0 R15: 00007fff07d146d8 The buggy address belongs to stack of task syz.0.3488/11632 and is located at offset 0 in frame: bpf_trace_run4+0x0/0x2f0 This frame has 1 object: [32, 64) 'args' The buggy address belongs to the virtual mapping at [ffffc90001128000, ffffc90001131000) created by: copy_process+0x5c3/0x3530 kernel/fork.c:2199 The buggy address belongs to the physical page: page:ffffea000462bdc0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x118af7 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 11626, tgid 11626 (syz.2.3487), ts 236204275159, free_ts 236139619746 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:5714 __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_clone3 kernel/fork.c:3087 [inline] __se_sys_clone3 kernel/fork.c:3071 [inline] __x64_sys_clone3+0x35c/0x390 kernel/fork.c:3071 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:5803 __free_slab+0xce/0x1a0 mm/slub.c:2039 free_slab mm/slub.c:2054 [inline] discard_slab+0x29/0x40 mm/slub.c:2060 __slab_free+0x205/0x280 mm/slub.c:3597 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_kmalloc mm/kasan/common.c:345 [inline] __kasan_kmalloc+0x24/0xb0 mm/kasan/common.c:388 kasan_kmalloc include/linux/kasan.h:212 [inline] __do_kmalloc_node mm/slab_common.c:957 [inline] __kmalloc_node_track_caller+0xb3/0x1e0 mm/slab_common.c:977 kmalloc_reserve net/core/skbuff.c:446 [inline] __alloc_skb+0x125/0x2d0 net/core/skbuff.c:515 alloc_skb include/linux/skbuff.h:1285 [inline] nlmsg_new include/net/netlink.h:991 [inline] inet_netconf_notify_devconf+0x173/0x230 net/ipv4/devinet.c:2115 __devinet_sysctl_unregister net/ipv4/devinet.c:2626 [inline] devinet_sysctl_unregister net/ipv4/devinet.c:2650 [inline] inetdev_destroy net/ipv4/devinet.c:327 [inline] inetdev_event+0x823/0x1110 net/ipv4/devinet.c:1602 notifier_call_chain kernel/notifier.c:87 [inline] raw_notifier_call_chain+0x8c/0xf0 kernel/notifier.c:455 call_netdevice_notifiers_info net/core/dev.c:1977 [inline] call_netdevice_notifiers_extack net/core/dev.c:2015 [inline] call_netdevice_notifiers net/core/dev.c:2029 [inline] unregister_netdevice_many+0xe2a/0x1740 net/core/dev.c:10888 Memory state around the buggy address: ffffc9000112f580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000112f600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffffc9000112f680: f1 f1 f1 f1 00 00 00 00 f3 f3 f3 f3 00 00 00 00 ^ ffffc9000112f700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffffc9000112f780: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== BUG: unable to handle page fault for address: ffffc90001130000 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 100000067 P4D 100000067 PUD 100154067 PMD 11f06d067 PTE 0 Oops: 0000 [#1] PREEMPT SMP KASAN CPU: 0 PID: 11632 Comm: syz.0.3488 Tainted: G B 6.1.84-syzkaller-00013-g6d6afa9d3f8f #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/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:ffffc9000112f588 EFLAGS: 00010082 RAX: 0000000000000000 RBX: 0000000093548265 RCX: ffffffff8191ef05 RDX: dffffc0000000000 RSI: ffffc9000112fffc RDI: ffffc90001130000 RBP: ffffc9000112f5c8 R08: 0000000032abfd90 R09: fffffbfff0f264fd R10: 0000000000000000 R11: dffffc0000000001 R12: 00000000618f991d R13: 00000000fcc0d7c4 R14: ffffc90001130008 R15: ffffc9000112fffc FS: 00007f71bacd56c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffc90001130000 CR3: 0000000116d3a000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600 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:596 [inline] bpf_prog_run include/linux/filter.h:610 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline] bpf_trace_run4+0x23f/0x2f0 kernel/trace/bpf_trace.c:2314 __bpf_trace_sched_switch+0xe/0x10 include/trace/events/sched.h:222 __traceiter_sched_switch+0x91/0xc0 include/trace/events/sched.h:222 trace_sched_switch include/trace/events/sched.h:222 [inline] __schedule+0x1305/0x1550 kernel/sched/core.c:6741 preempt_schedule_common+0x9b/0xf0 kernel/sched/core.c:6913 preempt_schedule+0xd9/0xe0 kernel/sched/core.c:6937 preempt_schedule_thunk+0x16/0x18 arch/x86/entry/thunk_64.S:34 try_to_wake_up+0x749/0x1220 kernel/sched/core.c:4393 wake_up_process kernel/sched/core.c:4521 [inline] wake_up_q+0xf0/0x1d0 kernel/sched/core.c:1030 futex_wake+0x735/0xb60 kernel/futex/waitwake.c:188 do_futex+0x501/0x9a0 kernel/futex/syscalls.c:113 __do_sys_futex kernel/futex/syscalls.c:185 [inline] __se_sys_futex+0x35e/0x3c0 kernel/futex/syscalls.c:166 __x64_sys_futex+0xe5/0x100 kernel/futex/syscalls.c:166 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:0x7f71b9f75b59 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f71bacd50f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: ffffffffffffffda RBX: 00007f71ba105f68 RCX: 00007f71b9f75b59 RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00007f71ba105f6c RBP: 00007f71ba105f60 R08: 00007fff07d810b0 R09: 00007f71bacd56c0 R10: 0000000000000008 R11: 0000000000000246 R12: 00007f71ba105f6c R13: 000000000000000b R14: 00007fff07d145f0 R15: 00007fff07d146d8 Modules linked in: CR2: ffffc90001130000 ---[ 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:ffffc9000112f588 EFLAGS: 00010082 RAX: 0000000000000000 RBX: 0000000093548265 RCX: ffffffff8191ef05 RDX: dffffc0000000000 RSI: ffffc9000112fffc RDI: ffffc90001130000 RBP: ffffc9000112f5c8 R08: 0000000032abfd90 R09: fffffbfff0f264fd R10: 0000000000000000 R11: dffffc0000000001 R12: 00000000618f991d R13: 00000000fcc0d7c4 R14: ffffc90001130008 R15: ffffc9000112fffc FS: 00007f71bacd56c0(0000) GS:ffff8881f7000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffc90001130000 CR3: 0000000116d3a000 CR4: 00000000003506b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600 ---------------- 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