==================================================================
BUG: KASAN: slab-use-after-free in rht_key_hashfn include/linux/rhashtable.h:159 [inline]
BUG: KASAN: slab-use-after-free in __rhashtable_lookup include/linux/rhashtable.h:604 [inline]
BUG: KASAN: slab-use-after-free in rhashtable_lookup include/linux/rhashtable.h:646 [inline]
BUG: KASAN: slab-use-after-free in rhashtable_lookup_fast+0x77a/0x9b0 include/linux/rhashtable.h:672
Read of size 4 at addr ffff8880297ac008 by task syz.5.763/10106
CPU: 0 UID: 0 PID: 10106 Comm: syz.5.763 Not tainted 6.12.0-syzkaller-01518-ga5c93bfec0be #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:377 [inline]
print_report+0x169/0x550 mm/kasan/report.c:488
kasan_report+0x143/0x180 mm/kasan/report.c:601
rht_key_hashfn include/linux/rhashtable.h:159 [inline]
__rhashtable_lookup include/linux/rhashtable.h:604 [inline]
rhashtable_lookup include/linux/rhashtable.h:646 [inline]
rhashtable_lookup_fast+0x77a/0x9b0 include/linux/rhashtable.h:672
ila_lookup_wildcards net/ipv6/ila/ila_xlat.c:132 [inline]
ila_xlat_addr net/ipv6/ila/ila_xlat.c:657 [inline]
ila_nf_input+0x1fe/0x3c0 net/ipv6/ila/ila_xlat.c:190
nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline]
nf_hook_slow+0xc5/0x220 net/netfilter/core.c:626
nf_hook include/linux/netfilter.h:269 [inline]
NF_HOOK+0x29e/0x450 include/linux/netfilter.h:312
__netif_receive_skb_one_core net/core/dev.c:5670 [inline]
__netif_receive_skb+0x1ea/0x650 net/core/dev.c:5783
process_backlog+0x662/0x15b0 net/core/dev.c:6115
__napi_poll+0xcd/0x490 net/core/dev.c:6779
napi_poll net/core/dev.c:6848 [inline]
net_rx_action+0x89b/0x1240 net/core/dev.c:6970
handle_softirqs+0x2c7/0x980 kernel/softirq.c:554
__do_softirq kernel/softirq.c:588 [inline]
invoke_softirq kernel/softirq.c:428 [inline]
__irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637
irq_exit_rcu+0x9/0x30 kernel/softirq.c:649
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline]
sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1049
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:trace_lock_acquire include/trace/events/lock.h:24 [inline]
RIP: 0010:lock_acquire+0xe5/0x550 kernel/locking/lockdep.c:5820
Code: 48 89 d8 48 c1 e8 06 48 8d 3c c5 b0 91 1d 90 be 08 00 00 00 e8 ec 89 8e 00 48 0f a3 1d 34 2d ad 0e 73 16 e8 ed 63 0a 00 84 c0 <75> 0d 80 3d db e5 96 0e 00 0f 84 f9 02 00 00 48 c7 c0 30 c4 1d 90
RSP: 0018:ffffc9000c17ee20 EFLAGS: 00000202
RAX: 0000000000000001 RBX: 0000000000000000 RCX: ffffffff81706474
RDX: 0000000000000000 RSI: ffffffff8c612400 RDI: ffffffff8c6123c0
RBP: ffffc9000c17ef70 R08: ffffffff901d91b7 R09: 1ffffffff203b236
R10: dffffc0000000000 R11: fffffbfff203b237 R12: 1ffff9200182fdcc
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff88803033dfc8
rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
rcu_read_lock include/linux/rcupdate.h:849 [inline]
percpu_ref_tryget_many include/linux/percpu-refcount.h:241 [inline]
percpu_ref_tryget+0x31/0x180 include/linux/percpu-refcount.h:266
css_tryget include/linux/cgroup_refcnt.h:45 [inline]
get_mem_cgroup_from_mm+0x103/0x2a0 mm/memcontrol.c:926
__mem_cgroup_charge+0x16/0x80 mm/memcontrol.c:4486
mem_cgroup_charge include/linux/memcontrol.h:694 [inline]
shmem_alloc_and_add_folio+0x8a1/0x13d0 mm/shmem.c:1823
shmem_get_folio_gfp+0x5a9/0x20a0 mm/shmem.c:2335
shmem_fault+0x253/0x6f0 mm/shmem.c:2536
__do_fault+0x137/0x460 mm/memory.c:4882
do_read_fault mm/memory.c:5297 [inline]
do_fault mm/memory.c:5431 [inline]
do_pte_missing mm/memory.c:3965 [inline]
handle_pte_fault+0x2d1c/0x6820 mm/memory.c:5766
__handle_mm_fault mm/memory.c:5909 [inline]
handle_mm_fault+0x1106/0x1bb0 mm/memory.c:6077
faultin_page mm/gup.c:1187 [inline]
__get_user_pages+0x1c82/0x49e0 mm/gup.c:1485
populate_vma_page_range+0x264/0x330 mm/gup.c:1923
__mm_populate+0x27a/0x460 mm/gup.c:2026
mm_populate include/linux/mm.h:3383 [inline]
vm_mmap_pgoff+0x2c3/0x3d0 mm/util.c:593
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f3a87d7e759
Code: ff ff c3 66 2e 0f 1f 84 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 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f3a88be2038 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 00007f3a87f35f80 RCX: 00007f3a87d7e759
RDX: b635773f06ebbeee RSI: 0000000000b36000 RDI: 0000000020000000
RBP: 00007f3a87df175e R08: ffffffffffffffff R09: 0000000000000000
R10: 0000000000008031 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f3a87f35f80 R15: 00007ffd871aba28
Allocated by task 5893:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3f/0x80 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:377 [inline]
__kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:394
kasan_kmalloc include/linux/kasan.h:257 [inline]
__do_kmalloc_node mm/slub.c:4264 [inline]
__kmalloc_node_noprof+0x22a/0x440 mm/slub.c:4270
__kvmalloc_node_noprof+0x72/0x190 mm/util.c:658
bucket_table_alloc lib/rhashtable.c:186 [inline]
rhashtable_rehash_alloc+0x9e/0x290 lib/rhashtable.c:367
rhashtable_shrink lib/rhashtable.c:411 [inline]
rht_deferred_worker+0x2075/0x23f0 lib/rhashtable.c:429
process_one_work kernel/workqueue.c:3229 [inline]
process_scheduled_works+0xa65/0x1850 kernel/workqueue.c:3310
worker_thread+0x870/0xd30 kernel/workqueue.c:3391
kthread+0x2f2/0x390 kernel/kthread.c:389
ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Freed by task 3484:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3f/0x80 mm/kasan/common.c:68
kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:579
poison_slab_object mm/kasan/common.c:247 [inline]
__kasan_slab_free+0x59/0x70 mm/kasan/common.c:264
kasan_slab_free include/linux/kasan.h:230 [inline]
slab_free_hook mm/slub.c:2342 [inline]
slab_free mm/slub.c:4579 [inline]
kfree+0x1a0/0x440 mm/slub.c:4727
rhashtable_free_and_destroy+0x7c6/0x920 lib/rhashtable.c:1169
ila_xlat_exit_net+0x4f/0xa0 net/ipv6/ila/ila_xlat.c:635
ops_exit_list net/core/net_namespace.c:173 [inline]
cleanup_net+0x804/0xcc0 net/core/net_namespace.c:626
process_one_work kernel/workqueue.c:3229 [inline]
process_scheduled_works+0xa65/0x1850 kernel/workqueue.c:3310
worker_thread+0x870/0xd30 kernel/workqueue.c:3391
kthread+0x2f2/0x390 kernel/kthread.c:389
ret_from_fork+0x4d/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
The buggy address belongs to the object at ffff8880297ac000
which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 8 bytes inside of
freed 4096-byte region [ffff8880297ac000, ffff8880297ad000)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x297a8
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88801ac42140 ffffea0001eb9000 dead000000000002
raw: 0000000000000000 0000000000040004 00000001f5000000 0000000000000000
head: 00fff00000000040 ffff88801ac42140 ffffea0001eb9000 dead000000000002
head: 0000000000000000 0000000000040004 00000001f5000000 0000000000000000
head: 00fff00000000003 ffffea0000a5ea01 ffffffffffffffff 0000000000000000
head: 0000000000000008 0000000000000000 00000000ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 1, tgid 1 (swapper/0), ts 12661774310, free_ts 0
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1556
prep_new_page mm/page_alloc.c:1564 [inline]
get_page_from_freelist+0x3649/0x3790 mm/page_alloc.c:3474
__alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4751
alloc_pages_mpol_noprof+0x3e8/0x680 mm/mempolicy.c:2265
alloc_slab_page+0x6a/0x140 mm/slub.c:2412
allocate_slab+0x5a/0x2f0 mm/slub.c:2578
new_slab mm/slub.c:2631 [inline]
___slab_alloc+0xcd1/0x14b0 mm/slub.c:3818
__slab_alloc+0x58/0xa0 mm/slub.c:3908
__slab_alloc_node mm/slub.c:3961 [inline]
slab_alloc_node mm/slub.c:4122 [inline]
__kmalloc_cache_noprof+0x1d5/0x2c0 mm/slub.c:4290
kmalloc_noprof include/linux/slab.h:879 [inline]
kzalloc_noprof include/linux/slab.h:1015 [inline]
kobject_uevent_env+0x28b/0x8e0 lib/kobject_uevent.c:540
device_add+0x63b/0xbf0 drivers/base/core.c:3653
usb_new_device+0x104a/0x19a0 drivers/usb/core/hub.c:2651
register_root_hub+0x25c/0x550 drivers/usb/core/hcd.c:994
usb_add_hcd+0xae3/0x1080 drivers/usb/core/hcd.c:2970
vhci_hcd_probe+0x1f4/0x3c0 drivers/usb/usbip/vhci_hcd.c:1380
platform_probe+0x13c/0x1c0 drivers/base/platform.c:1404
page_owner free stack trace missing
Memory state around the buggy address:
ffff8880297abf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff8880297abf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff8880297ac000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff8880297ac080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff8880297ac100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
vkms_vblank_simulate: vblank timer overrun
----------------
Code disassembly (best guess):
0: 48 89 d8 mov %rbx,%rax
3: 48 c1 e8 06 shr $0x6,%rax
7: 48 8d 3c c5 b0 91 1d lea -0x6fe26e50(,%rax,8),%rdi
e: 90
f: be 08 00 00 00 mov $0x8,%esi
14: e8 ec 89 8e 00 call 0x8e8a05
19: 48 0f a3 1d 34 2d ad bt %rbx,0xead2d34(%rip) # 0xead2d55
20: 0e
21: 73 16 jae 0x39
23: e8 ed 63 0a 00 call 0xa6415
28: 84 c0 test %al,%al
* 2a: 75 0d jne 0x39 <-- trapping instruction
2c: 80 3d db e5 96 0e 00 cmpb $0x0,0xe96e5db(%rip) # 0xe96e60e
33: 0f 84 f9 02 00 00 je 0x332
39: 48 c7 c0 30 c4 1d 90 mov $0xffffffff901dc430,%rax