================================================================== 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 ffff8881e809f1c8 by task ksoftirqd/1/17 CPU: 1 PID: 17 Comm: ksoftirqd/1 Tainted: G W 5.4.265-syzkaller-00043-gbf4c80bc4358 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 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:1418 expire_timers kernel/time/timer.c:1463 [inline] __run_timers+0x879/0xbe0 kernel/time/timer.c:1787 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1800 __do_softirq+0x23b/0x6b7 kernel/softirq.c:292 run_ksoftirqd+0x1f/0x30 kernel/softirq.c:603 smpboot_thread_fn+0x545/0x930 kernel/smpboot.c:165 kthread+0x2da/0x360 kernel/kthread.c:288 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:354 Allocated by task 13691: 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] fib6_info_alloc+0x2c/0xd0 net/ipv6/ip6_fib.c:154 ip6_route_info_create+0x459/0x1420 net/ipv6/route.c:3659 ip6_route_add+0x22/0x120 net/ipv6/route.c:3755 addrconf_prefix_route net/ipv6/addrconf.c:2426 [inline] addrconf_add_linklocal+0x5b5/0x9e0 net/ipv6/addrconf.c:3232 addrconf_addr_gen+0x572/0xd00 net/ipv6/addrconf.c:3361 addrconf_notify+0x9d2/0xe50 net/ipv6/addrconf.c:3643 notifier_call_chain kernel/notifier.c:98 [inline] __raw_notifier_call_chain kernel/notifier.c:399 [inline] raw_notifier_call_chain+0x95/0x110 kernel/notifier.c:406 __dev_notify_flags+0x26e/0x510 net/core/dev.c:1670 dev_change_flags+0xe7/0x190 net/core/dev.c:8007 do_setlink+0xc4c/0x3b70 net/core/rtnetlink.c:2542 rtnl_group_changelink net/core/rtnetlink.c:3032 [inline] __rtnl_newlink net/core/rtnetlink.c:3193 [inline] rtnl_newlink+0x1141/0x2060 net/core/rtnetlink.c:3314 rtnetlink_rcv_msg+0x983/0xc70 net/core/rtnetlink.c:5291 netlink_rcv_skb+0x1d5/0x420 net/netlink/af_netlink.c:2481 netlink_unicast_kernel net/netlink/af_netlink.c:1321 [inline] netlink_unicast+0x936/0xb20 net/netlink/af_netlink.c:1347 netlink_sendmsg+0xa18/0xcf0 net/netlink/af_netlink.c:1915 sock_sendmsg_nosec net/socket.c:638 [inline] __sock_sendmsg net/socket.c:650 [inline] ____sys_sendmsg+0x5ac/0x8f0 net/socket.c:2304 ___sys_sendmsg net/socket.c:2358 [inline] __sys_sendmsg+0x28b/0x380 net/socket.c:2404 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Freed by task 0: (stack is not available) The buggy address belongs to the object at ffff8881e809f000 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 456 bytes inside of 512-byte region [ffff8881e809f000, ffff8881e809f200) The buggy address belongs to the page: page:ffffea0007a02700 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 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__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:4891 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_trace+0x12d/0x260 mm/slub.c:2854 kmalloc include/linux/slab.h:556 [inline] kzalloc include/linux/slab.h:690 [inline] ipv6_add_addr+0x419/0xd40 net/ipv6/addrconf.c:1093 addrconf_add_linklocal+0x318/0x9e0 net/ipv6/addrconf.c:3230 addrconf_addr_gen+0x572/0xd00 net/ipv6/addrconf.c:3361 addrconf_notify+0x9d2/0xe50 net/ipv6/addrconf.c:3643 notifier_call_chain kernel/notifier.c:98 [inline] __raw_notifier_call_chain kernel/notifier.c:399 [inline] raw_notifier_call_chain+0x95/0x110 kernel/notifier.c:406 __dev_notify_flags+0x26e/0x510 net/core/dev.c:1670 dev_change_flags+0xe7/0x190 net/core/dev.c:8007 do_setlink+0xc4c/0x3b70 net/core/rtnetlink.c:2542 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:4953 [inline] __free_pages+0x91/0x140 mm/page_alloc.c:4959 device_release+0x6b/0x190 drivers/base/core.c:1776 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 tun_set_iff+0x870/0xdc0 drivers/net/tun.c:2918 __tun_chr_ioctl+0x8a9/0x1d00 drivers/net/tun.c:3181 do_vfs_ioctl+0x742/0x1720 fs/ioctl.c:47 ksys_ioctl fs/ioctl.c:742 [inline] __do_sys_ioctl fs/ioctl.c:749 [inline] __se_sys_ioctl fs/ioctl.c:747 [inline] __x64_sys_ioctl+0xd4/0x110 fs/ioctl.c:747 do_syscall_64+0xca/0x1c0 arch/x86/entry/common.c:290 entry_SYSCALL_64_after_hwframe+0x5c/0xc1 Memory state around the buggy address: ffff8881e809f080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8881e809f100: 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8881e809f180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8881e809f200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8881e809f280: 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 1dfef8067 P4D 1dfef8067 PUD 1e245e067 PMD 0 Oops: 0010 [#1] PREEMPT SMP KASAN CPU: 1 PID: 17 Comm: ksoftirqd/1 Tainted: G B W 5.4.265-syzkaller-00043-gbf4c80bc4358 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023 RIP: 0010:0x0 Code: Bad RIP value. RSP: 0018:ffff8881f5e2fb58 EFLAGS: 00010206 RAX: ffffffff8154e38a RBX: 0000000000000100 RCX: ffff8881f5e1cec0 RDX: 0000000080000100 RSI: 0000000000000000 RDI: ffff8881e809f1c0 RBP: ffff8881f5e2fd08 R08: ffffffff8154dfce R09: 0000000000000003 R10: ffffffffffffffff R11: dffffc0000000001 R12: 0000000100016570 R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8881e809f1c0 FS: 0000000000000000(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 00000001ea4c7000 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:1418 expire_timers kernel/time/timer.c:1463 [inline] __run_timers+0x879/0xbe0 kernel/time/timer.c:1787 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1800 __do_softirq+0x23b/0x6b7 kernel/softirq.c:292 run_ksoftirqd+0x1f/0x30 kernel/softirq.c:603 smpboot_thread_fn+0x545/0x930 kernel/smpboot.c:165 kthread+0x2da/0x360 kernel/kthread.c:288 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:354 Modules linked in: CR2: 0000000000000000 ---[ end trace 583908dfe5694d82 ]--- RIP: 0010:0x0 Code: Bad RIP value. RSP: 0018:ffff8881f5e2fb58 EFLAGS: 00010206 RAX: ffffffff8154e38a RBX: 0000000000000100 RCX: ffff8881f5e1cec0 RDX: 0000000080000100 RSI: 0000000000000000 RDI: ffff8881e809f1c0 RBP: ffff8881f5e2fd08 R08: ffffffff8154dfce R09: 0000000000000003 R10: ffffffffffffffff R11: dffffc0000000001 R12: 0000000100016570 R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8881e809f1c0 FS: 0000000000000000(0000) GS:ffff8881f6f00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffffffffd6 CR3: 00000001ea4c7000 CR4: 00000000003406a0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400