==================================================================
BUG: KASAN: out-of-bounds in hlist_add_head include/linux/list.h:814 [inline]
BUG: KASAN: out-of-bounds in enqueue_timer+0xb7/0x300 kernel/time/timer.c:541
Write of size 8 at addr ffff8881ecd731c8 by task syz-executor.2/2491
CPU: 1 PID: 2491 Comm: syz-executor.2 Not tainted 5.4.274-syzkaller-00016-gdd432c37afcd #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x1d8/0x241 lib/dump_stack.c:118
print_address_description+0x8c/0x600 mm/kasan/report.c:384
__kasan_report+0xf3/0x120 mm/kasan/report.c:516
kasan_report+0x30/0x60 mm/kasan/common.c:653
hlist_add_head include/linux/list.h:814 [inline]
enqueue_timer+0xb7/0x300 kernel/time/timer.c:541
__internal_add_timer kernel/time/timer.c:554 [inline]
internal_add_timer+0x240/0x430 kernel/time/timer.c:604
__mod_timer+0x6f1/0x13e0 kernel/time/timer.c:1065
call_timer_fn+0x36/0x390 kernel/time/timer.c:1448
expire_timers kernel/time/timer.c:1493 [inline]
__run_timers+0x879/0xbe0 kernel/time/timer.c:1817
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1830
__do_softirq+0x23b/0x6b7 kernel/softirq.c:292
invoke_softirq kernel/softirq.c:373 [inline]
irq_exit+0x195/0x1c0 kernel/softirq.c:413
exiting_irq arch/x86/include/asm/apic.h:538 [inline]
smp_apic_timer_interrupt+0x11a/0x460 arch/x86/kernel/apic/apic.c:1149
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:834
RIP: 0010:deref_stack_reg arch/x86/kernel/unwind_orc.c:350 [inline]
RIP: 0010:unwind_next_frame+0xf8a/0x1ea0 arch/x86/kernel/unwind_orc.c:526
Code: 7c 82 f7 ff 85 c0 0f 85 80 08 00 00 4c 8d ac 24 40 01 00 00 4c 89 eb 48 c1 eb 03 49 bf 00 00 00 00 00 fc ff df 42 80 3c 3b 00 <74> 08 4c 89 ef e8 ac 53 64 00 48 c7 84 24 40 01 00 00 00 00 00 00
RSP: 0018:ffff8881e6d574a0 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13
RAX: ffff8881e6d57940 RBX: 1ffff1103cdaaebc RCX: 1ffff1103cdaaf14
RDX: ffffffff867b062c RSI: 0000000000000000 RDI: ffff8881e6d578b0
RBP: ffff8881e6d57790 R08: 0000000000000007 R09: ffff8881e6d578f0
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffffffff0cf60c5
R13: ffff8881e6d575e0 R14: ffff8881e6d57938 R15: dffffc0000000000
__unwind_start+0x708/0x890 arch/x86/kernel/unwind_orc.c:691
unwind_start arch/x86/include/asm/unwind.h:60 [inline]
arch_stack_walk+0xdd/0x140 arch/x86/kernel/stacktrace.c:24
stack_trace_save+0x118/0x1c0 kernel/stacktrace.c:123
save_stack mm/kasan/common.c:70 [inline]
set_track mm/kasan/common.c:78 [inline]
__kasan_kmalloc+0x171/0x210 mm/kasan/common.c:529
slab_post_alloc_hook mm/slab.h:584 [inline]
slab_alloc_node mm/slub.c:2829 [inline]
slab_alloc mm/slub.c:2837 [inline]
kmem_cache_alloc+0xd9/0x250 mm/slub.c:2842
kmem_cache_zalloc include/linux/slab.h:680 [inline]
lsm_inode_alloc security/security.c:556 [inline]
security_inode_alloc+0x24/0x110 security/security.c:928
inode_init_always+0x655/0x8a0 fs/inode.c:202
alloc_inode fs/inode.c:238 [inline]
new_inode_pseudo+0x8f/0x210 fs/inode.c:927
sock_alloc net/socket.c:559 [inline]
__sock_create+0x124/0x7a0 net/socket.c:1391
sock_create net/socket.c:1478 [inline]
__sys_socketpair+0x28f/0x6e0 net/socket.c:1578
__do_sys_socketpair net/socket.c:1631 [inline]
__se_sys_socketpair net/socket.c:1628 [inline]
__x64_sys_socketpair+0x97/0xb0 net/socket.c:1628
do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x5c/0xc1
RIP: 0033:0x7f0389a0cf69
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:00007f0388d870c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000035
RAX: ffffffffffffffda RBX: 00007f0389b43f80 RCX: 00007f0389a0cf69
RDX: 0000000000007fff RSI: 0000000000000000 RDI: 000000000000001e
RBP: 00007f0389a6a6fe R08: 0000000000000000 R09: 0000000000000000
R10: 00000000200002c0 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f0389b43f80 R15: 00007fff806597a8
The buggy address belongs to the page:
page:ffffea0007b35cc0 refcount:1 mapcount:-1024 mapping:0000000000000000 index:0x0
flags: 0x8000000000000000()
raw: 8000000000000000 dead000000000100 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000000000 00000001fffffbff 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 0x500dc0(GFP_USER|__GFP_ZERO|__GFP_ACCOUNT)
set_page_owner include/linux/page_owner.h:31 [inline]
post_alloc_hook mm/page_alloc.c:2165 [inline]
prep_new_page+0x18f/0x370 mm/page_alloc.c:2171
get_page_from_freelist+0x2d13/0x2d90 mm/page_alloc.c:3794
__alloc_pages_nodemask+0x393/0x840 mm/page_alloc.c:4893
__alloc_pages include/linux/gfp.h:503 [inline]
__alloc_pages_node include/linux/gfp.h:516 [inline]
alloc_pages_node include/linux/gfp.h:530 [inline]
__pte_alloc_one include/asm-generic/pgalloc.h:63 [inline]
pte_alloc_one+0x1b/0xb0 arch/x86/mm/pgtable.c:26
__pte_alloc+0x1d/0x1c0 mm/memory.c:440
copy_pte_range mm/memory.c:830 [inline]
copy_pmd_range mm/memory.c:906 [inline]
copy_pud_range mm/memory.c:940 [inline]
copy_p4d_range mm/memory.c:962 [inline]
copy_page_range+0x1c24/0x26f0 mm/memory.c:1024
dup_mmap kernel/fork.c:608 [inline]
dup_mm kernel/fork.c:1379 [inline]
copy_mm+0xb23/0x10d0 kernel/fork.c:1435
copy_process+0x1291/0x3230 kernel/fork.c:2052
_do_fork+0x197/0x900 kernel/fork.c:2399
__do_sys_clone kernel/fork.c:2557 [inline]
__se_sys_clone kernel/fork.c:2538 [inline]
__x64_sys_clone+0x26b/0x2c0 kernel/fork.c:2538
do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x5c/0xc1
page last free stack trace:
reset_page_owner include/linux/page_owner.h:24 [inline]
free_pages_prepare mm/page_alloc.c:1176 [inline]
__free_pages_ok+0x847/0x950 mm/page_alloc.c:1438
free_the_page mm/page_alloc.c:4955 [inline]
__free_pages+0x91/0x140 mm/page_alloc.c:4961
bpf_check+0x8aaa/0xb340 kernel/bpf/verifier.c:9731
bpf_prog_load kernel/bpf/syscall.c:1724 [inline]
__do_sys_bpf kernel/bpf/syscall.c:2891 [inline]
__se_sys_bpf+0x8139/0xbcb0 kernel/bpf/syscall.c:2849
do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x5c/0xc1
Memory state around the buggy address:
ffff8881ecd73080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8881ecd73100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff8881ecd73180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
^
ffff8881ecd73200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8881ecd73280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================
BUG: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor instruction fetch in kernel mode
#PF: error_code(0x0010) - not-present page
PGD 0 P4D 0
Oops: 0010 [#2] PREEMPT SMP KASAN
CPU: 1 PID: 2491 Comm: syz-executor.2 Tainted: G B D 5.4.274-syzkaller-00016-gdd432c37afcd #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
RIP: 0010:0x0
Code: Bad RIP value.
RSP: 0018:ffff8881f6f09d18 EFLAGS: 00010206
RAX: ffffffff8154d7aa RBX: 0000000000000100 RCX: ffff8881d0520000
RDX: 0000000080000100 RSI: 0000000000000000 RDI: ffff8881ecd731c0
RBP: ffff8881f6f09ec8 R08: ffffffff8154d3ee R09: 0000000000000003
R10: ffffffffffffffff R11: dffffc0000000001 R12: 00000000ffffa180
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8881ecd731c0
FS: 00007f0388d876c0(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 0000000005e0e000 CR4: 00000000003406a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
call_timer_fn+0x36/0x390 kernel/time/timer.c:1448
expire_timers kernel/time/timer.c:1493 [inline]
__run_timers+0x879/0xbe0 kernel/time/timer.c:1817
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1830
__do_softirq+0x23b/0x6b7 kernel/softirq.c:292
invoke_softirq kernel/softirq.c:373 [inline]
irq_exit+0x195/0x1c0 kernel/softirq.c:413
exiting_irq arch/x86/include/asm/apic.h:538 [inline]
smp_apic_timer_interrupt+0x11a/0x460 arch/x86/kernel/apic/apic.c:1149
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:834
RIP: 0010:preempt_count arch/x86/include/asm/preempt.h:26 [inline]
RIP: 0010:check_kcov_mode kernel/kcov.c:153 [inline]
RIP: 0010:__sanitizer_cov_trace_pc+0xc/0x50 kernel/kcov.c:187
Code: 00 00 00 48 c7 c7 a0 a7 f1 85 e8 1f de 2f 00 c3 90 90 90 90 90 90 90 90 90 90 90 90 90 90 48 8b 04 24 65 48 8b 0d 54 51 9e 7e <65> 8b 15 59 51 9e 7e f7 c2 00 01 1f 00 74 01 c3 8b 91 00 0a 00 00
RSP: 0018:ffff8881e6d574f0 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13
RAX: ffffffff8191c5d8 RBX: 8000000000000002 RCX: ffff8881d0520000
RDX: ffff8881d0520000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffea00075ddf40 R08: ffffffff8191c5ce R09: fffff94000ebbbe9
R10: 0000000000000000 R11: dffffc0000000001 R12: ffffea00075ddf40
R13: 0000000000000000 R14: ffffea00075ddf48 R15: 1ffffd4000ebbbe9
PageSwapCache include/linux/page-flags.h:385 [inline]
free_swap_cache+0xd8/0x210 mm/swap_state.c:268
free_pages_and_swap_cache+0x5e/0x90 mm/swap_state.c:296
tlb_batch_pages_flush mm/mmu_gather.c:49 [inline]
tlb_flush_mmu_free mm/mmu_gather.c:189 [inline]
tlb_flush_mmu+0xc8/0x170 mm/mmu_gather.c:196
zap_pte_range mm/memory.c:1173 [inline]
zap_pmd_range mm/memory.c:1222 [inline]
zap_pud_range mm/memory.c:1251 [inline]
zap_p4d_range mm/memory.c:1272 [inline]
unmap_page_range+0x1d29/0x2620 mm/memory.c:1293
unmap_single_vma mm/memory.c:1338 [inline]
unmap_vmas+0x355/0x4b0 mm/memory.c:1370
exit_mmap+0x2bc/0x520 mm/mmap.c:3191
__mmput+0x8e/0x2c0 kernel/fork.c:1101
exit_mm kernel/exit.c:536 [inline]
do_exit+0xc08/0x2bc0 kernel/exit.c:846
do_group_exit+0x138/0x300 kernel/exit.c:982
get_signal+0xdb1/0x1440 kernel/signal.c:2735
do_signal+0xb0/0x11f0 arch/x86/kernel/signal.c:809
exit_to_usermode_loop+0xc0/0x1a0 arch/x86/entry/common.c:159
prepare_exit_to_usermode+0x199/0x200 arch/x86/entry/common.c:194
entry_SYSCALL_64_after_hwframe+0x5c/0xc1
RIP: 0033:0x7f0389a0cf69
Code: Bad RIP value.
RSP: 002b:00007f0388d87178 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 00007f0389b43f88 RCX: 00007f0389a0cf69
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f0389b43f88
RBP: 00007f0389b43f80 R08: 00007f0388d876c0 R09: 00007f0388d876c0
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f0389b43f8c
R13: 000000000000000b R14: 00007fff806596c0 R15: 00007fff806597a8
Modules linked in:
CR2: 0000000000000000
---[ end trace d4c288a1cd1f437c ]---
RIP: 0010:__read_once_size include/linux/compiler.h:268 [inline]
RIP: 0010:compound_head include/linux/page-flags.h:174 [inline]
RIP: 0010:migration_entry_to_page include/linux/swapops.h:195 [inline]
RIP: 0010:zap_pte_range mm/memory.c:1146 [inline]
RIP: 0010:zap_pmd_range mm/memory.c:1222 [inline]
RIP: 0010:zap_pud_range mm/memory.c:1251 [inline]
RIP: 0010:zap_p4d_range mm/memory.c:1272 [inline]
RIP: 0010:unmap_page_range+0x1210/0x2620 mm/memory.c:1293
Code: 84 24 f0 00 00 00 42 80 3c 20 00 74 08 4c 89 ef e8 55 52 09 00 48 b8 00 00 00 00 00 ea ff ff 48 01 c3 4c 89 ac 24 f8 00 00 00 <4d> 8b 6d 00 44 89 ee 83 e6 01 31 ff e8 9f 70 d9 ff 41 f6 c5 01 48
RSP: 0000:ffff8881e131f5a0 EFLAGS: 00010282
RAX: ffffea0000000000 RBX: ffffea000f38d340 RCX: 0000000000000000
RDX: ffff8881e7ad8fc0 RSI: f7ffffff86396400 RDI: f000000000000000
RBP: ffff8881e131f790 R08: ffffffff818acb89 R09: ffffed103cf5b1f9
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffffea000f38d348 R14: 1ffff1103d9ae639 R15: f7ffffff86396400
FS: 00007f0388d876c0(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f0389a0cf3f CR3: 0000000005e0e000 CR4: 00000000003406a0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 7c 82 jl 0xffffff84
2: f7 ff idiv %edi
4: 85 c0 test %eax,%eax
6: 0f 85 80 08 00 00 jne 0x88c
c: 4c 8d ac 24 40 01 00 lea 0x140(%rsp),%r13
13: 00
14: 4c 89 eb mov %r13,%rbx
17: 48 c1 eb 03 shr $0x3,%rbx
1b: 49 bf 00 00 00 00 00 movabs $0xdffffc0000000000,%r15
22: fc ff df
25: 42 80 3c 3b 00 cmpb $0x0,(%rbx,%r15,1)
* 2a: 74 08 je 0x34 <-- trapping instruction
2c: 4c 89 ef mov %r13,%rdi
2f: e8 ac 53 64 00 call 0x6453e0
34: 48 c7 84 24 40 01 00 movq $0x0,0x140(%rsp)
3b: 00 00 00 00 00