==================================================================
BUG: KASAN: slab-out-of-bounds in hlist_add_head include/linux/list.h:814 [inline]
BUG: KASAN: slab-out-of-bounds in enqueue_timer+0xb7/0x300 kernel/time/timer.c:541
Write of size 8 at addr ffff8881ef57f1c8 by task kworker/1:2/125
CPU: 1 PID: 125 Comm: kworker/1:2 Not tainted 5.4.276-syzkaller-00020-g4275fce9fe94 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Workqueue: rcu_gp process_srcu
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:539 [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:preempt_latency_start kernel/sched/core.c:3993 [inline]
RIP: 0010:preempt_count_add+0x72/0x180 kernel/sched/core.c:4019
Code: c1 e8 03 42 0f b6 04 38 84 c0 0f 85 d9 00 00 00 83 3d c1 ba a4 05 00 75 11 65 8b 05 84 ae bd 7e 0f b6 c0 3d f5 00 00 00 73 59 <65> 8b 05 73 ae bd 7e 25 ff ff ff 7f 39 d8 75 43 4c 8b 74 24 18 4c
RSP: 0018:ffff8881ee017bc8 EFLAGS: 00000297 ORIG_RAX: ffffffffffffff13
RAX: 0000000000000001 RBX: 0000000000000001 RCX: ffffffff86e99903
RDX: 0000000000000036 RSI: 0000000000000001 RDI: 0000000000000001
RBP: 00000000000001f1 R08: ffffffff82316961 R09: ffffed103dc02f81
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000356
R13: 1ffffffff0c96dc9 R14: 0000000000002af9 R15: dffffc0000000000
delay_tsc+0x62/0xd0 arch/x86/lib/delay.c:68
try_check_zero+0x2f2/0x360 kernel/rcu/srcutree.c:708
srcu_advance_state kernel/rcu/srcutree.c:1146 [inline]
process_srcu+0x1ab/0xc40 kernel/rcu/srcutree.c:1241
process_one_work+0x765/0xd20 kernel/workqueue.c:2290
worker_thread+0xaef/0x1470 kernel/workqueue.c:2436
kthread+0x2da/0x360 kernel/kthread.c:288
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:354
Allocated by task 2844:
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
dst_alloc+0x154/0x4c0 net/core/dst.c:93
rt_dst_alloc net/ipv4/route.c:1647 [inline]
__mkroute_output net/ipv4/route.c:2426 [inline]
ip_route_output_key_hash_rcu+0x1021/0x2190 net/ipv4/route.c:2654
ip_route_output_key_hash net/ipv4/route.c:2482 [inline]
__ip_route_output_key include/net/route.h:126 [inline]
ip_route_output_flow+0x142/0x330 net/ipv4/route.c:2743
ip_route_output_key include/net/route.h:136 [inline]
ip_tunnel_xmit+0xa3e/0x2690 net/ipv4/ip_tunnel.c:767
__gre_xmit net/ipv4/ip_gre.c:465 [inline]
ipgre_xmit+0x81a/0xbf0 net/ipv4/ip_gre.c:660
__netdev_start_xmit include/linux/netdevice.h:4538 [inline]
netdev_start_xmit include/linux/netdevice.h:4552 [inline]
xmit_one net/core/dev.c:3221 [inline]
dev_hard_start_xmit+0x1b7/0x6b0 net/core/dev.c:3237
__dev_queue_xmit+0x14da/0x27e0 net/core/dev.c:3802
__bpf_tx_skb net/core/filter.c:2063 [inline]
__bpf_redirect_no_mac net/core/filter.c:2097 [inline]
__bpf_redirect+0x78f/0xe20 net/core/filter.c:2120
____bpf_clone_redirect net/core/filter.c:2151 [inline]
bpf_clone_redirect+0x249/0x350 net/core/filter.c:2123
0xffffffffa00a049a
bpf_call_func include/linux/filter.h:627 [inline]
bpf_test_run+0x2ae/0x6c0 net/bpf/test_run.c:44
bpf_prog_test_run_skb+0x73c/0xf00 net/bpf/test_run.c:311
bpf_prog_test_run kernel/bpf/syscall.c:2124 [inline]
__do_sys_bpf kernel/bpf/syscall.c:2909 [inline]
__se_sys_bpf+0x2e37/0xbcb0 kernel/bpf/syscall.c:2849
do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x5c/0xc1
Freed by task 2867:
save_stack mm/kasan/common.c:70 [inline]
set_track mm/kasan/common.c:78 [inline]
kasan_set_free_info mm/kasan/common.c:345 [inline]
__kasan_slab_free+0x1b5/0x270 mm/kasan/common.c:487
slab_free_hook mm/slub.c:1455 [inline]
slab_free_freelist_hook mm/slub.c:1494 [inline]
slab_free mm/slub.c:3080 [inline]
kmem_cache_free+0x10b/0x2c0 mm/slub.c:3096
dst_destroy+0x23f/0x320 net/core/dst.c:129
__rcu_reclaim kernel/rcu/rcu.h:222 [inline]
rcu_do_batch+0x492/0xa00 kernel/rcu/tree.c:2167
rcu_core+0x4c8/0xcb0 kernel/rcu/tree.c:2387
__do_softirq+0x23b/0x6b7 kernel/softirq.c:292
The buggy address belongs to the object at ffff8881ef57f100
which belongs to the cache ip_dst_cache of size 176
The buggy address is located 24 bytes to the right of
176-byte region [ffff8881ef57f100, ffff8881ef57f1b0)
The buggy address belongs to the page:
page:ffffea0007bd5fc0 refcount:1 mapcount:0 mapping:ffff8881f4ff8a00 index:0x0
flags: 0x8000000000000200(slab)
raw: 8000000000000200 dead000000000100 dead000000000122 ffff8881f4ff8a00
raw: 0000000000000000 0000000000100010 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 0x112a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL)
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_slab_page+0x39/0x3c0 mm/slub.c:343
allocate_slab mm/slub.c:1683 [inline]
new_slab+0x97/0x440 mm/slub.c:1749
new_slab_objects mm/slub.c:2505 [inline]
___slab_alloc+0x2fe/0x490 mm/slub.c:2667
__slab_alloc+0x62/0xa0 mm/slub.c:2707
slab_alloc_node mm/slub.c:2792 [inline]
slab_alloc mm/slub.c:2837 [inline]
kmem_cache_alloc+0x109/0x250 mm/slub.c:2842
dst_alloc+0x154/0x4c0 net/core/dst.c:93
rt_dst_alloc net/ipv4/route.c:1647 [inline]
__mkroute_output net/ipv4/route.c:2426 [inline]
ip_route_output_key_hash_rcu+0x1021/0x2190 net/ipv4/route.c:2654
ip_route_output_key_hash net/ipv4/route.c:2482 [inline]
__ip_route_output_key include/net/route.h:126 [inline]
ip_route_output_flow+0x142/0x330 net/ipv4/route.c:2743
ip_route_output_key include/net/route.h:136 [inline]
ip_tunnel_xmit+0xa3e/0x2690 net/ipv4/ip_tunnel.c:767
__gre_xmit net/ipv4/ip_gre.c:465 [inline]
ipgre_xmit+0x81a/0xbf0 net/ipv4/ip_gre.c:660
__netdev_start_xmit include/linux/netdevice.h:4538 [inline]
netdev_start_xmit include/linux/netdevice.h:4552 [inline]
xmit_one net/core/dev.c:3221 [inline]
dev_hard_start_xmit+0x1b7/0x6b0 net/core/dev.c:3237
__dev_queue_xmit+0x14da/0x27e0 net/core/dev.c:3802
__bpf_tx_skb net/core/filter.c:2063 [inline]
__bpf_redirect_no_mac net/core/filter.c:2097 [inline]
__bpf_redirect+0x78f/0xe20 net/core/filter.c:2120
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_pcp_prepare mm/page_alloc.c:1233 [inline]
free_unref_page_prepare+0x297/0x380 mm/page_alloc.c:3085
free_unref_page mm/page_alloc.c:3134 [inline]
free_the_page mm/page_alloc.c:4953 [inline]
__free_pages+0xaf/0x140 mm/page_alloc.c:4961
__vunmap+0x75b/0x890 mm/vmalloc.c:2260
kcov_mmap+0x8c/0x120 kernel/kcov.c:474
call_mmap include/linux/fs.h:1994 [inline]
mmap_region+0x110d/0x16f0 mm/mmap.c:1812
do_mmap+0x822/0xd30 mm/mmap.c:1581
do_mmap_pgoff include/linux/mm.h:2480 [inline]
vm_mmap_pgoff+0x1b5/0x260 mm/util.c:528
ksys_mmap_pgoff+0x168/0x1e0 mm/mmap.c:1631
do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x5c/0xc1
Memory state around the buggy address:
ffff8881ef57f080: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc
ffff8881ef57f100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff8881ef57f180: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc
^
ffff8881ef57f200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8881ef57f280: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc
==================================================================
BUG: kernel NULL pointer dereference, address: 0000000000000000
#PF: supervisor instruction fetch in kernel mode
#PF: error_code(0x0010) - not-present page
PGD 1f0fa7067 P4D 1f0fa7067 PUD 1f0f2c067 PMD 0
Oops: 0010 [#1] PREEMPT SMP KASAN
CPU: 1 PID: 2729 Comm: syz.4.819 Tainted: G B 5.4.276-syzkaller-00020-g4275fce9fe94 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
RIP: 0010:0x0
Code: Bad RIP value.
RSP: 0018:ffff8881f6f09d18 EFLAGS: 00010206
RAX: ffffffff8154d48a RBX: 0000000000000100 RCX: ffff8881ebd6de80
RDX: 0000000080000100 RSI: 0000000000000000 RDI: ffff8881ef57f1c0
RBP: ffff8881f6f09ec8 R08: ffffffff8154d0ce R09: 0000000000000003
R10: ffffffffffffffff R11: dffffc0000000001 R12: 00000000ffffb378
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8881ef57f1c0
FS: 00007fc3e14266c0(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 00000001e4477000 CR4: 00000000003406a0
DR0: 0000000020000240 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600
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:539 [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:stack_trace_consume_entry+0x9f/0x240 kernel/stacktrace.c:89
Code: 48 8d 53 0c 48 89 d5 48 c1 ed 03 42 0f b6 44 35 00 84 c0 48 89 14 24 0f 85 1e 01 00 00 44 8b 32 31 ff 44 89 f6 e8 61 8b 10 00 <45> 85 f6 74 39 e8 67 88 10 00 41 ff ce 48 b8 00 00 00 00 00 fc ff
RSP: 0018:ffff8881eb7de8a8 EFLAGS: 00000293 ORIG_RAX: ffffffffffffff13
RAX: ffff8881ebd6de80 RBX: ffff8881eb7de9e0 RCX: 0000000000000000
RDX: ffff8881eb7de9ec RSI: 0000000000000001 RDI: 0000000000000000
RBP: 1ffff1103d6fbd3d R08: ffffffff8153b08f R09: ffff8881eb7de950
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff1103d6fbd3d
R13: 0000000000000000 R14: 0000000000000001 R15: 1ffff1103d6fbd3e
arch_stack_walk+0x105/0x140 arch/x86/kernel/stacktrace.c:27
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_set_free_info mm/kasan/common.c:345 [inline]
__kasan_slab_free+0x1b5/0x270 mm/kasan/common.c:487
slab_free_hook mm/slub.c:1455 [inline]
slab_free_freelist_hook mm/slub.c:1494 [inline]
slab_free mm/slub.c:3080 [inline]
kmem_cache_free+0x10b/0x2c0 mm/slub.c:3096
jbd2_free_handle include/linux/jbd2.h:1442 [inline]
jbd2_journal_stop+0xb92/0x11d0 fs/jbd2/transaction.c:1881
__ext4_journal_stop+0xf8/0x190 fs/ext4/ext4_jbd2.c:103
ext4_da_write_end+0x78e/0xb90 fs/ext4/inode.c:3277
generic_perform_write+0x3d3/0x560 mm/filemap.c:3461
__generic_file_write_iter+0x224/0x530 mm/filemap.c:3579
ext4_file_write_iter+0x499/0x10e0 fs/ext4/file.c:270
call_write_iter include/linux/fs.h:1989 [inline]
new_sync_write fs/read_write.c:483 [inline]
__vfs_write+0x5d3/0x750 fs/read_write.c:496
__kernel_write+0x10f/0x350 fs/read_write.c:515
dump_emit+0x213/0x350 fs/coredump.c:838
elf_core_dump+0x3e1b/0x4740 fs/binfmt_elf.c:2352
do_coredump+0x20fb/0x2f00 fs/coredump.c:801
get_signal+0xd83/0x1440 kernel/signal.c:2729
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
ret_from_intr+0x1c/0x1c
RIP: 0033:0x7fc3e21a4ba1
Code: 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 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f
RSP: 002b:fffffffffffffd40 EFLAGS: 00010217
RAX: 0000000000000000 RBX: 00007fc3e2332fa0 RCX: 00007fc3e21a4b99
RDX: 0000000000000000 RSI: fffffffffffffd40 RDI: 0000000000000000
RBP: 00007fc3e222577e R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007fc3e2332fa0 R15: 00007ffe95cecbf8
Modules linked in:
CR2: 0000000000000000
---[ end trace 64dd3ffd1eadd074 ]---
RIP: 0010:0x0
Code: Bad RIP value.
RSP: 0018:ffff8881f6f09d18 EFLAGS: 00010206
RAX: ffffffff8154d48a RBX: 0000000000000100 RCX: ffff8881ebd6de80
RDX: 0000000080000100 RSI: 0000000000000000 RDI: ffff8881ef57f1c0
RBP: ffff8881f6f09ec8 R08: ffffffff8154d0ce R09: 0000000000000003
R10: ffffffffffffffff R11: dffffc0000000001 R12: 00000000ffffb378
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8881ef57f1c0
FS: 00007fc3e14266c0(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 00000001e4477000 CR4: 00000000003406a0
DR0: 0000000020000240 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600
----------------
Code disassembly (best guess):
0: c1 e8 03 shr $0x3,%eax
3: 42 0f b6 04 38 movzbl (%rax,%r15,1),%eax
8: 84 c0 test %al,%al
a: 0f 85 d9 00 00 00 jne 0xe9
10: 83 3d c1 ba a4 05 00 cmpl $0x0,0x5a4bac1(%rip) # 0x5a4bad8
17: 75 11 jne 0x2a
19: 65 8b 05 84 ae bd 7e mov %gs:0x7ebdae84(%rip),%eax # 0x7ebdaea4
20: 0f b6 c0 movzbl %al,%eax
23: 3d f5 00 00 00 cmp $0xf5,%eax
28: 73 59 jae 0x83
* 2a: 65 8b 05 73 ae bd 7e mov %gs:0x7ebdae73(%rip),%eax # 0x7ebdaea4 <-- trapping instruction
31: 25 ff ff ff 7f and $0x7fffffff,%eax
36: 39 d8 cmp %ebx,%eax
38: 75 43 jne 0x7d
3a: 4c 8b 74 24 18 mov 0x18(%rsp),%r14
3f: 4c rex.WR