==================================================================
BUG: KASAN: slab-use-after-free in rose_timer_expiry+0x471/0x4b0 net/rose/rose_timer.c:183
Read of size 2 at addr ffff888080abf42a by task syz-executor/25296
CPU: 1 UID: 0 PID: 25296 Comm: syz-executor Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
Call Trace:
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0xca/0x240 mm/kasan/report.c:482
kasan_report+0x118/0x150 mm/kasan/report.c:595
rose_timer_expiry+0x471/0x4b0 net/rose/rose_timer.c:183
call_timer_fn+0x17e/0x5f0 kernel/time/timer.c:1747
expire_timers kernel/time/timer.c:1798 [inline]
__run_timers kernel/time/timer.c:2372 [inline]
__run_timer_base+0x61a/0x860 kernel/time/timer.c:2384
run_timer_base kernel/time/timer.c:2393 [inline]
run_timer_softirq+0xb7/0x180 kernel/time/timer.c:2403
handle_softirqs+0x283/0x870 kernel/softirq.c:579
__do_softirq kernel/softirq.c:613 [inline]
invoke_softirq kernel/softirq.c:453 [inline]
__irq_exit_rcu+0xca/0x1f0 kernel/softirq.c:680
irq_exit_rcu+0x9/0x30 kernel/softirq.c:696
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1050
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:get_current arch/x86/include/asm/current.h:25 [inline]
RIP: 0010:__sanitizer_cov_trace_pc+0x8/0x70 kernel/kcov.c:216
Code: 8b 3d c4 59 fe 0b 48 89 de 5b e9 f3 9a 58 00 cc cc cc 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 48 8b 04 24 <65> 48 8b 0c 25 08 60 a0 92 65 8b 15 e8 b4 e0 10 81 e2 00 01 ff 00
RSP: 0018:ffffc9000417f360 EFLAGS: 00000216
RAX: ffffffff82090ea7 RBX: 0000000000041ea5 RCX: ffff8880344a8000
RDX: 0000000000000000 RSI: 0000000000012a46 RDI: 0000000000041ea5
RBP: ffffc9000417f600 R08: ffff88801c85efaf R09: 1ffff1100390bdf5
R10: dffffc0000000000 R11: ffffed100390bdf6 R12: ffff888057903140
R13: 000000000023ffff R14: 0000000000012a46 R15: 8000000041ea5007
vm_normal_page+0xb7/0x210 mm/memory.c:650
copy_present_ptes mm/memory.c:992 [inline]
copy_pte_range mm/memory.c:1174 [inline]
copy_pmd_range+0x8ce/0x71d0 mm/memory.c:1261
copy_pud_range mm/memory.c:1298 [inline]
copy_p4d_range mm/memory.c:1322 [inline]
copy_page_range+0xc14/0x1270 mm/memory.c:1410
dup_mmap+0xf57/0x1ac0 mm/mmap.c:1834
dup_mm kernel/fork.c:1485 [inline]
copy_mm+0x13c/0x4b0 kernel/fork.c:1537
copy_process+0x1706/0x3c00 kernel/fork.c:2175
kernel_clone+0x21e/0x840 kernel/fork.c:2605
__do_sys_clone kernel/fork.c:2748 [inline]
__se_sys_clone kernel/fork.c:2732 [inline]
__x64_sys_clone+0x18b/0x1e0 kernel/fork.c:2732
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f4d16985453
Code: 1f 84 00 00 00 00 00 64 48 8b 04 25 10 00 00 00 45 31 c0 31 d2 31 f6 bf 11 00 20 01 4c 8d 90 d0 02 00 00 b8 38 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 89 c2 85 c0 75 2c 64 48 8b 04 25 10 00 00
RSP: 002b:00007ffccc646a08 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f4d16985453
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011
RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000001
R10: 00005555766a17d0 R11: 0000000000000246 R12: 0000000000000000
R13: 00000000000927c0 R14: 0000000000084736 R15: 00007ffccc646ba0
Allocated by task 26592:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:388 [inline]
__kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:405
kasan_kmalloc include/linux/kasan.h:260 [inline]
__do_kmalloc_node mm/slub.c:4365 [inline]
__kmalloc_noprof+0x27a/0x4f0 mm/slub.c:4377
kmalloc_noprof include/linux/slab.h:909 [inline]
kzalloc_noprof include/linux/slab.h:1039 [inline]
hash_ip4_add+0x18ba/0x1ec0 net/netfilter/ipset/ip_set_hash_gen.h:950
hash_ip4_uadt+0x640/0x850 net/netfilter/ipset/ip_set_hash_ip.c:160
call_ad+0x380/0xb00 net/netfilter/ipset/ip_set_core.c:1751
ip_set_ad+0x791/0x930 net/netfilter/ipset/ip_set_core.c:1841
nfnetlink_rcv_msg+0xb4a/0x1130 net/netfilter/nfnetlink.c:302
netlink_rcv_skb+0x205/0x470 net/netlink/af_netlink.c:2552
nfnetlink_rcv+0x26a/0x2520 net/netfilter/nfnetlink.c:667
netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline]
netlink_unicast+0x82f/0x9e0 net/netlink/af_netlink.c:1346
netlink_sendmsg+0x805/0xb30 net/netlink/af_netlink.c:1896
sock_sendmsg_nosec net/socket.c:714 [inline]
__sock_sendmsg+0x219/0x270 net/socket.c:729
____sys_sendmsg+0x505/0x830 net/socket.c:2614
___sys_sendmsg+0x21f/0x2a0 net/socket.c:2668
__sys_sendmsg net/socket.c:2700 [inline]
__do_sys_sendmsg net/socket.c:2705 [inline]
__se_sys_sendmsg net/socket.c:2703 [inline]
__x64_sys_sendmsg+0x19b/0x260 net/socket.c:2703
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 13:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:68
kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576
poison_slab_object mm/kasan/common.c:243 [inline]
__kasan_slab_free+0x5b/0x80 mm/kasan/common.c:275
kasan_slab_free include/linux/kasan.h:233 [inline]
slab_free_hook mm/slub.c:2417 [inline]
slab_free_freelist_hook mm/slub.c:2446 [inline]
slab_free_bulk mm/slub.c:4704 [inline]
kmem_cache_free_bulk+0x2d1/0x520 mm/slub.c:5283
kfree_bulk include/linux/slab.h:794 [inline]
kvfree_rcu_bulk+0xe5/0x1f0 mm/slab_common.c:1516
kfree_rcu_work+0xed/0x170 mm/slab_common.c:1594
process_one_work kernel/workqueue.c:3236 [inline]
process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3319
worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400
kthread+0x70e/0x8a0 kernel/kthread.c:463
ret_from_fork+0x3f9/0x770 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
Last potentially related work creation:
kasan_save_stack+0x3e/0x60 mm/kasan/common.c:47
kasan_record_aux_stack+0xbd/0xd0 mm/kasan/generic.c:548
kvfree_call_rcu+0xbb/0x410 mm/slab_common.c:1962
hash_ip4_add+0x140c/0x1ec0 net/netfilter/ipset/ip_set_hash_gen.h:992
hash_ip4_uadt+0x640/0x850 net/netfilter/ipset/ip_set_hash_ip.c:160
call_ad+0x380/0xb00 net/netfilter/ipset/ip_set_core.c:1751
ip_set_ad+0x791/0x930 net/netfilter/ipset/ip_set_core.c:1841
nfnetlink_rcv_msg+0xb4a/0x1130 net/netfilter/nfnetlink.c:302
netlink_rcv_skb+0x205/0x470 net/netlink/af_netlink.c:2552
nfnetlink_rcv+0x26a/0x2520 net/netfilter/nfnetlink.c:667
netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline]
netlink_unicast+0x82f/0x9e0 net/netlink/af_netlink.c:1346
netlink_sendmsg+0x805/0xb30 net/netlink/af_netlink.c:1896
sock_sendmsg_nosec net/socket.c:714 [inline]
__sock_sendmsg+0x219/0x270 net/socket.c:729
____sys_sendmsg+0x505/0x830 net/socket.c:2614
___sys_sendmsg+0x21f/0x2a0 net/socket.c:2668
__sys_sendmsg net/socket.c:2700 [inline]
__do_sys_sendmsg net/socket.c:2705 [inline]
__se_sys_sendmsg net/socket.c:2703 [inline]
__x64_sys_sendmsg+0x19b/0x260 net/socket.c:2703
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff888080abf400
which belongs to the cache kmalloc-512 of size 512
The buggy address is located 42 bytes inside of
freed 512-byte region [ffff888080abf400, ffff888080abf600)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x80abc
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
anon flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88801a441c80 0000000000000000 dead000000000001
raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88801a441c80 0000000000000000 dead000000000001
head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000
head: 00fff00000000002 ffffea000202af01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 15816, tgid 15814 (syz.5.3090), ts 278608786607, free_ts 122143270997
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1851
prep_new_page mm/page_alloc.c:1859 [inline]
get_page_from_freelist+0x21e4/0x22c0 mm/page_alloc.c:3858
__alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:5148
alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2416
alloc_slab_page mm/slub.c:2487 [inline]
allocate_slab+0x8a/0x370 mm/slub.c:2655
new_slab mm/slub.c:2709 [inline]
___slab_alloc+0xbeb/0x1410 mm/slub.c:3891
__slab_alloc mm/slub.c:3981 [inline]
__slab_alloc_node mm/slub.c:4056 [inline]
slab_alloc_node mm/slub.c:4217 [inline]
__do_kmalloc_node mm/slub.c:4364 [inline]
__kmalloc_noprof+0x305/0x4f0 mm/slub.c:4377
kmalloc_noprof include/linux/slab.h:909 [inline]
kzalloc_noprof include/linux/slab.h:1039 [inline]
hash_ip4_add+0x18ba/0x1ec0 net/netfilter/ipset/ip_set_hash_gen.h:950
hash_ip4_uadt+0x640/0x850 net/netfilter/ipset/ip_set_hash_ip.c:160
call_ad+0x380/0xb00 net/netfilter/ipset/ip_set_core.c:1751
ip_set_ad+0x791/0x930 net/netfilter/ipset/ip_set_core.c:1841
nfnetlink_rcv_msg+0xb4a/0x1130 net/netfilter/nfnetlink.c:302
netlink_rcv_skb+0x205/0x470 net/netlink/af_netlink.c:2552
nfnetlink_rcv+0x26a/0x2520 net/netfilter/nfnetlink.c:667
netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline]
netlink_unicast+0x82f/0x9e0 net/netlink/af_netlink.c:1346
netlink_sendmsg+0x805/0xb30 net/netlink/af_netlink.c:1896
page last free pid 7782 tgid 7782 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1395 [inline]
__free_frozen_pages+0xbc4/0xd30 mm/page_alloc.c:2895
vfree+0x25a/0x400 mm/vmalloc.c:3434
xskq_destroy+0x40/0x60 net/xdp/xsk_queue.c:64
xsk_release+0x671/0x890 net/xdp/xsk.c:1122
__sock_release net/socket.c:649 [inline]
sock_close+0xc0/0x240 net/socket.c:1439
__fput+0x44c/0xa70 fs/file_table.c:468
task_work_run+0x1d4/0x260 kernel/task_work.c:227
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
exit_to_user_mode_loop+0xec/0x110 kernel/entry/common.c:43
exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline]
do_syscall_64+0x2bd/0x3b0 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff888080abf300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff888080abf380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff888080abf400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888080abf480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888080abf500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
----------------
Code disassembly (best guess):
0: 8b 3d c4 59 fe 0b mov 0xbfe59c4(%rip),%edi # 0xbfe59ca
6: 48 89 de mov %rbx,%rsi
9: 5b pop %rbx
a: e9 f3 9a 58 00 jmp 0x589b02
f: cc int3
10: cc int3
11: cc int3
12: 90 nop
13: 90 nop
14: 90 nop
15: 90 nop
16: 90 nop
17: 90 nop
18: 90 nop
19: 90 nop
1a: 90 nop
1b: 90 nop
1c: 90 nop
1d: 90 nop
1e: 90 nop
1f: 90 nop
20: 90 nop
21: 90 nop
22: f3 0f 1e fa endbr64
26: 48 8b 04 24 mov (%rsp),%rax
* 2a: 65 48 8b 0c 25 08 60 mov %gs:0xffffffff92a06008,%rcx <-- trapping instruction
31: a0 92
33: 65 8b 15 e8 b4 e0 10 mov %gs:0x10e0b4e8(%rip),%edx # 0x10e0b522
3a: 81 e2 00 01 ff 00 and $0xff0100,%edx