==================================================================
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 ffff8881eb74b1c8 by task udevd/433
CPU: 0 PID: 433 Comm: udevd Not tainted 5.4.283-syzkaller-04981-g1cca65ac6abc #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/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: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:devcgroup_inode_permission include/linux/device_cgroup.h:39 [inline]
RIP: 0010:inode_permission+0xce/0x4e0 fs/namei.c:456
Code: d8 48 83 c4 10 5b 41 5c 41 5d 41 5e 41 5f 5d c3 49 8d 5e 4c 48 89 d8 48 c1 e8 03 42 0f b6 04 28 84 c0 0f 85 b3 02 00 00 8b 1b <31> ff 89 de e8 f9 e8 c6 ff 85 db 0f 85 c9 01 00 00 e8 fc e5 c6 ff
RSP: 0018:ffff8881d9a97918 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13
RAX: 0000000000000000 RBX: 0000000000700005 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: dffffc0000000000 R08: ffffffff819d505a R09: ffffffff819f0e29
R10: ffff8881f31faf40 R11: 0000000000000006 R12: 0000000000000024
R13: dffffc0000000000 R14: ffff8881f0505c20 R15: ffff8881f0505c22
may_open+0x1d0/0x340 fs/namei.c:3119
do_last fs/namei.c:3561 [inline]
path_openat+0x2952/0x34b0 fs/namei.c:3683
do_filp_open+0x20b/0x450 fs/namei.c:3713
do_sys_open+0x39c/0x810 fs/open.c:1123
do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x5c/0xc1
RIP: 0033:0x7fb2c1cd49a4
Code: 24 20 48 8d 44 24 30 48 89 44 24 28 64 8b 04 25 18 00 00 00 85 c0 75 2c 44 89 e2 48 89 ee bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 76 60 48 8b 15 55 a4 0d 00 f7 d8 64 89 02 48 83
RSP: 002b:00007ffca5870db0 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00005616a8c3bc50 RCX: 00007fb2c1cd49a4
RDX: 00000000000a0800 RSI: 00005616a8c39c30 RDI: 00000000ffffff9c
RBP: 00005616a8c39c30 R08: 00000000ffffffff R09: 00007ffca59c40b0
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000000a0800
R13: 00005616a8c3cce0 R14: 0000000000000001 R15: 00005616a8c052c0
Allocated by task 108:
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
kmalloc include/linux/slab.h:561 [inline]
kzalloc include/linux/slab.h:690 [inline]
neigh_alloc net/core/neighbour.c:439 [inline]
___neigh_create+0x6d2/0x1ae0 net/core/neighbour.c:592
ip6_finish_output2+0x965/0x18e0 net/ipv6/ip6_output.c:141
NF_HOOK_COND include/linux/netfilter.h:292 [inline]
ip6_output+0x1b3/0x430 net/ipv6/ip6_output.c:248
dst_output include/net/dst.h:438 [inline]
NF_HOOK include/linux/netfilter.h:303 [inline]
ndisc_send_skb+0x702/0xc30 net/ipv6/ndisc.c:511
ndisc_send_ns+0x64d/0x830 net/ipv6/ndisc.c:653
addrconf_dad_work+0xb91/0x16f0 net/ipv6/addrconf.c:4196
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
Freed by task 0:
(stack is not available)
The buggy address belongs to the object at ffff8881eb74b000
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 456 bytes inside of
512-byte region [ffff8881eb74b000, ffff8881eb74b200)
The buggy address belongs to the page:
page:ffffea0007add200 refcount:1 mapcount:0 mapping:ffff8881f5c02500 index:0x0 compound_mapcount: 0
flags: 0x8000000000010200(slab|head)
raw: 8000000000010200 dead000000000100 dead000000000122 ffff8881f5c02500
raw: 0000000000000000 0000000000100010 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0x152a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__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]
__kmalloc+0x19b/0x2e0 mm/slub.c:3909
kmalloc include/linux/slab.h:561 [inline]
kzalloc include/linux/slab.h:690 [inline]
neigh_alloc net/core/neighbour.c:439 [inline]
___neigh_create+0x6d2/0x1ae0 net/core/neighbour.c:592
ip6_finish_output2+0x965/0x18e0 net/ipv6/ip6_output.c:141
NF_HOOK_COND include/linux/netfilter.h:292 [inline]
ip6_output+0x1b3/0x430 net/ipv6/ip6_output.c:248
dst_output include/net/dst.h:438 [inline]
NF_HOOK include/linux/netfilter.h:303 [inline]
ndisc_send_skb+0x702/0xc30 net/ipv6/ndisc.c:511
ndisc_send_ns+0x64d/0x830 net/ipv6/ndisc.c:653
addrconf_dad_work+0xb91/0x16f0 net/ipv6/addrconf.c:4196
process_one_work+0x765/0xd20 kernel/workqueue.c:2290
worker_thread+0xaef/0x1470 kernel/workqueue.c:2436
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
device_release+0x6b/0x190 drivers/base/core.c:1777
kobject_cleanup lib/kobject.c:716 [inline]
kobject_release lib/kobject.c:747 [inline]
kref_put include/linux/kref.h:65 [inline]
kobject_put+0x1e6/0x2f0 lib/kobject.c:764
netdev_run_todo+0xc44/0xdf0 net/core/dev.c:9469
tun_detach drivers/net/tun.c:766 [inline]
tun_chr_close+0xc1/0x130 drivers/net/tun.c:3563
__fput+0x262/0x680 fs/file_table.c:281
task_work_run+0x140/0x170 kernel/task_work.c:113
get_signal+0x13c6/0x1440 kernel/signal.c:2529
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
Memory state around the buggy address:
ffff8881eb74b080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff8881eb74b100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff8881eb74b180: 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff8881eb74b200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8881eb74b280: fc fc fc fc fc fc 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 1eb31f067 P4D 1eb31f067 PUD 1eb71b067 PMD 0
Oops: 0010 [#1] PREEMPT SMP KASAN
CPU: 0 PID: 485 Comm: syz-executor.0 Tainted: G B 5.4.283-syzkaller-04981-g1cca65ac6abc #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
RIP: 0010:0x0
Code: Bad RIP value.
RSP: 0018:ffff8881f6e09d18 EFLAGS: 00010202
RAX: ffffffff8154d56a RBX: 0000000000000101 RCX: ffff8881f32f8fc0
RDX: 0000000000000101 RSI: 0000000000000000 RDI: ffff8881eb74b1c0
RBP: ffff8881f6e09ec8 R08: ffffffff8154d1ae R09: 0000000000000003
R10: ffffffffffffffff R11: dffffc0000000001 R12: 00000000ffff9ff0
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8881eb74b1c0
FS: 00007fbafa3b26c0(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 00000001eae37000 CR4: 00000000003406b0
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: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_schedule_irq+0xc2/0x140 kernel/sched/core.c:4558
Code: 4c 89 e7 e8 d0 5a 43 fd f6 44 24 21 02 74 0b 0f 0b 48 f7 03 08 00 00 00 74 4d bf 01 00 00 00 e8 b4 1b f4 fc fb bf 01 00 00 00 b9 e6 ff ff fa bf 01 00 00 00 e8 1e 1d f4 fc 65 48 8b 1d d6 c9
RSP: 0018:ffff8881eafb7260 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13
RAX: 1ffff1103e65f327 RBX: 1ffff1103d5f6e50 RCX: ffffffff84519f00
RDX: 0000000000000000 RSI: 0000000000000004 RDI: 0000000000000001
RBP: ffff8881eafb72e8 R08: dffffc0000000000 R09: ffffed103edcaf6d
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff8881eafb7280
R13: 0000000000000000 R14: dffffc0000000000 R15: 1ffff1103d5f6e4c
retint_kernel+0x1b/0x1b
RIP: 0010:dump_stack+0x207/0x241 lib/dump_stack.c:124
Code: e8 85 be 04 00 00 00 e8 61 9d 43 fd c7 05 a7 f2 97 01 ff ff ff ff 48 b8 00 00 00 00 00 fc ff df 4c 89 64 24 10 ff 74 24 10 9d <48> c7 44 24 20 0e 36 e0 45 48 8b 4c 24 08 48 c7 04 08 00 00 00 00
RSP: 0018:ffff8881eafb73a0 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff02
RAX: dffffc0000000000 RBX: 00000000ffffffff RCX: ffffffff8450544f
RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffffffff85e84700
RBP: ffff8881eafb7450 R08: dffffc0000000000 R09: 0000000000000003
R10: ffffffffffffffff R11: dffffc0000000001 R12: 0000000000000246
R13: ffff8881eafb73e0 R14: 1ffff1103d5f6e7c R15: 0000000000000000
fail_dump lib/fault-inject.c:52 [inline]
should_fail+0x71f/0x880 lib/fault-inject.c:144
prepare_alloc_pages mm/page_alloc.c:4834 [inline]
__alloc_pages_nodemask+0x1b4/0x840 mm/page_alloc.c:4881
__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]
pcpu_alloc_pages mm/percpu-vm.c:94 [inline]
pcpu_populate_chunk+0x1bb/0xd00 mm/percpu-vm.c:284
pcpu_alloc+0x79e/0x1050 mm/percpu.c:1714
prealloc_init+0x238/0x800 kernel/bpf/hashtab.c:154
htab_map_alloc+0x638/0x930 kernel/bpf/hashtab.c:382
find_and_alloc_map kernel/bpf/syscall.c:122 [inline]
map_create kernel/bpf/syscall.c:573 [inline]
__do_sys_bpf kernel/bpf/syscall.c:2873 [inline]
__se_sys_bpf+0x3291/0xbcb0 kernel/bpf/syscall.c:2849
do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x5c/0xc1
RIP: 0033:0x7fbafa82fae9
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:00007fbafa3b20c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007fbafa94ef80 RCX: 00007fbafa82fae9
RDX: 0000000000000048 RSI: 0000000020000840 RDI: 0000000000000000
RBP: 00007fbafa3b2120 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000002
R13: 000000000000000b R14: 00007fbafa94ef80 R15: 00007ffc3aeab748
Modules linked in:
CR2: 0000000000000000
---[ end trace c4a5c2332bdbbf9c ]---
RIP: 0010:0x0
Code: Bad RIP value.
RSP: 0018:ffff8881f6e09d18 EFLAGS: 00010202
RAX: ffffffff8154d56a RBX: 0000000000000101 RCX: ffff8881f32f8fc0
RDX: 0000000000000101 RSI: 0000000000000000 RDI: ffff8881eb74b1c0
RBP: ffff8881f6e09ec8 R08: ffffffff8154d1ae R09: 0000000000000003
R10: ffffffffffffffff R11: dffffc0000000001 R12: 00000000ffff9ff0
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8881eb74b1c0
FS: 00007fbafa3b26c0(0000) GS:ffff8881f6e00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffffffffffffd6 CR3: 00000001eae37000 CR4: 00000000003406b0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 1 bytes skipped:
0: 48 83 c4 10 add $0x10,%rsp
4: 5b pop %rbx
5: 41 5c pop %r12
7: 41 5d pop %r13
9: 41 5e pop %r14
b: 41 5f pop %r15
d: 5d pop %rbp
e: c3 ret
f: 49 8d 5e 4c lea 0x4c(%r14),%rbx
13: 48 89 d8 mov %rbx,%rax
16: 48 c1 e8 03 shr $0x3,%rax
1a: 42 0f b6 04 28 movzbl (%rax,%r13,1),%eax
1f: 84 c0 test %al,%al
21: 0f 85 b3 02 00 00 jne 0x2da
27: 8b 1b mov (%rbx),%ebx
* 29: 31 ff xor %edi,%edi <-- trapping instruction
2b: 89 de mov %ebx,%esi
2d: e8 f9 e8 c6 ff call 0xffc6e92b
32: 85 db test %ebx,%ebx
34: 0f 85 c9 01 00 00 jne 0x203
3a: e8 fc e5 c6 ff call 0xffc6e63b