==================================================================
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.constprop.0+0x426/0x550 include/linux/rhashtable.h:604
Read of size 4 at addr ffff88807ad58008 by task syz.8.997/11316
CPU: 1 UID: 0 PID: 11316 Comm: syz.8.997 Not tainted 6.12.0-rc7-syzkaller-00012-g3022e9d00ebe #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+0x116/0x1f0 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:377 [inline]
print_report+0xc3/0x620 mm/kasan/report.c:488
kasan_report+0xd9/0x110 mm/kasan/report.c:601
rht_key_hashfn include/linux/rhashtable.h:159 [inline]
__rhashtable_lookup.constprop.0+0x426/0x550 include/linux/rhashtable.h:604
rhashtable_lookup include/linux/rhashtable.h:646 [inline]
rhashtable_lookup_fast include/linux/rhashtable.h:672 [inline]
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+0x1ee/0x620 net/ipv6/ila/ila_xlat.c:190
nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline]
nf_hook_slow+0xbe/0x200 net/netfilter/core.c:626
nf_hook.constprop.0+0x42e/0x750 include/linux/netfilter.h:269
NF_HOOK include/linux/netfilter.h:312 [inline]
ipv6_rcv+0xa4/0x680 net/ipv6/ip6_input.c:309
__netif_receive_skb_one_core+0x12e/0x1e0 net/core/dev.c:5670
__netif_receive_skb+0x1d/0x160 net/core/dev.c:5783
process_backlog+0x443/0x15f0 net/core/dev.c:6115
__napi_poll.constprop.0+0xba/0x550 net/core/dev.c:6779
napi_poll net/core/dev.c:6848 [inline]
net_rx_action+0xa92/0x1010 net/core/dev.c:6970
handle_softirqs+0x216/0x8f0 kernel/softirq.c:554
__do_softirq kernel/softirq.c:588 [inline]
invoke_softirq kernel/softirq.c:428 [inline]
__irq_exit_rcu kernel/softirq.c:637 [inline]
irq_exit_rcu+0xbb/0x120 kernel/softirq.c:649
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline]
sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1049
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:lock_release+0x3e5/0x6f0 kernel/locking/lockdep.c:5833
Code: 7e 83 f8 01 0f 85 fd 01 00 00 9c 58 f6 c4 02 0f 85 e8 01 00 00 48 f7 04 24 00 02 00 00 74 01 fb 48 b8 00 00 00 00 00 fc ff df <48> 01 c3 48 c7 03 00 00 00 00 c7 43 08 00 00 00 00 48 8b 84 24 88
RSP: 0018:ffffc900048ff648 EFLAGS: 00000206
RAX: dffffc0000000000 RBX: 1ffff9200091fecb RCX: ffffc900048ff698
RDX: 1ffff1100604ec9a RSI: ffffffff8b6cd340 RDI: ffffffff8bd1a880
RBP: ffffffffffffffff R08: 0000000000000000 R09: fffffbfff20bf011
R10: ffffffff905f808f R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000001 R14: ffff8880302764d8 R15: ffff888030275a00
__mutex_unlock_slowpath+0xa3/0x650 kernel/locking/mutex.c:912
__unix_dgram_recvmsg+0x829/0xe50 net/unix/af_unix.c:2521
unix_dgram_recvmsg+0xd0/0x110 net/unix/af_unix.c:2537
sock_recvmsg_nosec net/socket.c:1051 [inline]
____sys_recvmsg+0x5fb/0x6b0 net/socket.c:2824
___sys_recvmsg+0x115/0x1a0 net/socket.c:2868
do_recvmmsg+0x2ba/0x750 net/socket.c:2962
__sys_recvmmsg net/socket.c:3041 [inline]
__do_sys_recvmmsg net/socket.c:3064 [inline]
__se_sys_recvmmsg net/socket.c:3057 [inline]
__x64_sys_recvmmsg+0x239/0x290 net/socket.c:3057
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fca0ad7e719
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:00007fca0baba038 EFLAGS: 00000246 ORIG_RAX: 000000000000012b
RAX: ffffffffffffffda RBX: 00007fca0af36058 RCX: 00007fca0ad7e719
RDX: 0000000000010106 RSI: 00000000200000c0 RDI: 0000000000000003
RBP: 00007fca0adf1616 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fca0af36058 R15: 00007ffcc6a4b1a8
Allocated by task 11276:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:377 [inline]
__kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:394
kmalloc_noprof include/linux/slab.h:878 [inline]
kzalloc_noprof include/linux/slab.h:1014 [inline]
uevent_show+0x166/0x3b0 drivers/base/core.c:2731
dev_attr_show+0x56/0xe0 drivers/base/core.c:2430
sysfs_kf_seq_show+0x241/0x410 fs/sysfs/file.c:59
seq_read_iter+0x4f7/0x12b0 fs/seq_file.c:230
kernfs_fop_read_iter+0x414/0x580 fs/kernfs/file.c:279
new_sync_read fs/read_write.c:488 [inline]
vfs_read+0x882/0xbe0 fs/read_write.c:569
ksys_read+0x12f/0x260 fs/read_write.c:712
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 11276:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579
poison_slab_object mm/kasan/common.c:247 [inline]
__kasan_slab_free+0x51/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+0x14f/0x4b0 mm/slub.c:4727
uevent_show+0x2e5/0x3b0 drivers/base/core.c:2747
dev_attr_show+0x56/0xe0 drivers/base/core.c:2430
sysfs_kf_seq_show+0x241/0x410 fs/sysfs/file.c:59
seq_read_iter+0x4f7/0x12b0 fs/seq_file.c:230
kernfs_fop_read_iter+0x414/0x580 fs/kernfs/file.c:279
new_sync_read fs/read_write.c:488 [inline]
vfs_read+0x882/0xbe0 fs/read_write.c:569
ksys_read+0x12f/0x260 fs/read_write.c:712
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff88807ad58000
which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 8 bytes inside of
freed 4096-byte region [ffff88807ad58000, ffff88807ad59000)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7ad58
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 ffff88801b042140 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000040004 00000001f5000000 0000000000000000
head: 00fff00000000040 ffff88801b042140 dead000000000122 0000000000000000
head: 0000000000000000 0000000000040004 00000001f5000000 0000000000000000
head: 00fff00000000003 ffffea0001eb5601 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 11276, tgid 11276 (udevadm), ts 464197587748, free_ts 464180979538
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1541
prep_new_page mm/page_alloc.c:1549 [inline]
get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3459
__alloc_pages_noprof+0x223/0x25a0 mm/page_alloc.c:4735
alloc_pages_mpol_noprof+0x2c9/0x610 mm/mempolicy.c:2265
alloc_slab_page mm/slub.c:2412 [inline]
allocate_slab mm/slub.c:2578 [inline]
new_slab+0x2c9/0x410 mm/slub.c:2631
___slab_alloc+0xdac/0x1880 mm/slub.c:3818
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3908
__slab_alloc_node mm/slub.c:3961 [inline]
slab_alloc_node mm/slub.c:4122 [inline]
__kmalloc_cache_noprof+0x2b4/0x300 mm/slub.c:4290
kmalloc_noprof include/linux/slab.h:878 [inline]
kzalloc_noprof include/linux/slab.h:1014 [inline]
uevent_show+0x166/0x3b0 drivers/base/core.c:2731
dev_attr_show+0x56/0xe0 drivers/base/core.c:2430
sysfs_kf_seq_show+0x241/0x410 fs/sysfs/file.c:59
seq_read_iter+0x4f7/0x12b0 fs/seq_file.c:230
kernfs_fop_read_iter+0x414/0x580 fs/kernfs/file.c:279
new_sync_read fs/read_write.c:488 [inline]
vfs_read+0x882/0xbe0 fs/read_write.c:569
ksys_read+0x12f/0x260 fs/read_write.c:712
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
page last free pid 8938 tgid 8938 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1112 [inline]
free_unref_page+0x5f4/0xdc0 mm/page_alloc.c:2642
__folio_put+0x30d/0x3d0 mm/swap.c:126
kvfree+0x47/0x50 mm/util.c:701
rhashtable_free_and_destroy+0x16c/0x990 lib/rhashtable.c:1169
ila_xlat_exit_net+0x59/0xa0 net/ipv6/ila/ila_xlat.c:635
ops_exit_list+0xb3/0x180 net/core/net_namespace.c:173
cleanup_net+0x5b7/0xb40 net/core/net_namespace.c:626
process_one_work+0x9c8/0x1ba0 kernel/workqueue.c:3229
process_scheduled_works kernel/workqueue.c:3310 [inline]
worker_thread+0x6c8/0xf00 kernel/workqueue.c:3391
kthread+0x2c4/0x3a0 kernel/kthread.c:389
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Memory state around the buggy address:
ffff88807ad57f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88807ad57f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88807ad58000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88807ad58080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88807ad58100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
==================================================================
BUG: KASAN: slab-use-after-free in rht_bucket_index include/linux/rhashtable.h:122 [inline]
BUG: KASAN: slab-use-after-free in rht_key_hashfn include/linux/rhashtable.h:161 [inline]
BUG: KASAN: slab-use-after-free in __rhashtable_lookup.constprop.0+0x43d/0x550 include/linux/rhashtable.h:604
Read of size 4 at addr ffff88807ad58000 by task syz.8.997/11316
CPU: 1 UID: 0 PID: 11316 Comm: syz.8.997 Tainted: G B 6.12.0-rc7-syzkaller-00012-g3022e9d00ebe #0
Tainted: [B]=BAD_PAGE
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+0x116/0x1f0 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:377 [inline]
print_report+0xc3/0x620 mm/kasan/report.c:488
kasan_report+0xd9/0x110 mm/kasan/report.c:601
rht_bucket_index include/linux/rhashtable.h:122 [inline]
rht_key_hashfn include/linux/rhashtable.h:161 [inline]
__rhashtable_lookup.constprop.0+0x43d/0x550 include/linux/rhashtable.h:604
rhashtable_lookup include/linux/rhashtable.h:646 [inline]
rhashtable_lookup_fast include/linux/rhashtable.h:672 [inline]
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+0x1ee/0x620 net/ipv6/ila/ila_xlat.c:190
nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline]
nf_hook_slow+0xbe/0x200 net/netfilter/core.c:626
nf_hook.constprop.0+0x42e/0x750 include/linux/netfilter.h:269
NF_HOOK include/linux/netfilter.h:312 [inline]
ipv6_rcv+0xa4/0x680 net/ipv6/ip6_input.c:309
__netif_receive_skb_one_core+0x12e/0x1e0 net/core/dev.c:5670
__netif_receive_skb+0x1d/0x160 net/core/dev.c:5783
process_backlog+0x443/0x15f0 net/core/dev.c:6115
__napi_poll.constprop.0+0xba/0x550 net/core/dev.c:6779
napi_poll net/core/dev.c:6848 [inline]
net_rx_action+0xa92/0x1010 net/core/dev.c:6970
handle_softirqs+0x216/0x8f0 kernel/softirq.c:554
__do_softirq kernel/softirq.c:588 [inline]
invoke_softirq kernel/softirq.c:428 [inline]
__irq_exit_rcu kernel/softirq.c:637 [inline]
irq_exit_rcu+0xbb/0x120 kernel/softirq.c:649
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline]
sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1049
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:lock_release+0x3e5/0x6f0 kernel/locking/lockdep.c:5833
Code: 7e 83 f8 01 0f 85 fd 01 00 00 9c 58 f6 c4 02 0f 85 e8 01 00 00 48 f7 04 24 00 02 00 00 74 01 fb 48 b8 00 00 00 00 00 fc ff df <48> 01 c3 48 c7 03 00 00 00 00 c7 43 08 00 00 00 00 48 8b 84 24 88
RSP: 0018:ffffc900048ff648 EFLAGS: 00000206
RAX: dffffc0000000000 RBX: 1ffff9200091fecb RCX: ffffc900048ff698
RDX: 1ffff1100604ec9a RSI: ffffffff8b6cd340 RDI: ffffffff8bd1a880
RBP: ffffffffffffffff R08: 0000000000000000 R09: fffffbfff20bf011
R10: ffffffff905f808f R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000001 R14: ffff8880302764d8 R15: ffff888030275a00
__mutex_unlock_slowpath+0xa3/0x650 kernel/locking/mutex.c:912
__unix_dgram_recvmsg+0x829/0xe50 net/unix/af_unix.c:2521
unix_dgram_recvmsg+0xd0/0x110 net/unix/af_unix.c:2537
sock_recvmsg_nosec net/socket.c:1051 [inline]
____sys_recvmsg+0x5fb/0x6b0 net/socket.c:2824
___sys_recvmsg+0x115/0x1a0 net/socket.c:2868
do_recvmmsg+0x2ba/0x750 net/socket.c:2962
__sys_recvmmsg net/socket.c:3041 [inline]
__do_sys_recvmmsg net/socket.c:3064 [inline]
__se_sys_recvmmsg net/socket.c:3057 [inline]
__x64_sys_recvmmsg+0x239/0x290 net/socket.c:3057
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fca0ad7e719
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:00007fca0baba038 EFLAGS: 00000246 ORIG_RAX: 000000000000012b
RAX: ffffffffffffffda RBX: 00007fca0af36058 RCX: 00007fca0ad7e719
RDX: 0000000000010106 RSI: 00000000200000c0 RDI: 0000000000000003
RBP: 00007fca0adf1616 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fca0af36058 R15: 00007ffcc6a4b1a8
Allocated by task 11276:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:377 [inline]
__kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:394
kmalloc_noprof include/linux/slab.h:878 [inline]
kzalloc_noprof include/linux/slab.h:1014 [inline]
uevent_show+0x166/0x3b0 drivers/base/core.c:2731
dev_attr_show+0x56/0xe0 drivers/base/core.c:2430
sysfs_kf_seq_show+0x241/0x410 fs/sysfs/file.c:59
seq_read_iter+0x4f7/0x12b0 fs/seq_file.c:230
kernfs_fop_read_iter+0x414/0x580 fs/kernfs/file.c:279
new_sync_read fs/read_write.c:488 [inline]
vfs_read+0x882/0xbe0 fs/read_write.c:569
ksys_read+0x12f/0x260 fs/read_write.c:712
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 11276:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579
poison_slab_object mm/kasan/common.c:247 [inline]
__kasan_slab_free+0x51/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+0x14f/0x4b0 mm/slub.c:4727
uevent_show+0x2e5/0x3b0 drivers/base/core.c:2747
dev_attr_show+0x56/0xe0 drivers/base/core.c:2430
sysfs_kf_seq_show+0x241/0x410 fs/sysfs/file.c:59
seq_read_iter+0x4f7/0x12b0 fs/seq_file.c:230
kernfs_fop_read_iter+0x414/0x580 fs/kernfs/file.c:279
new_sync_read fs/read_write.c:488 [inline]
vfs_read+0x882/0xbe0 fs/read_write.c:569
ksys_read+0x12f/0x260 fs/read_write.c:712
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff88807ad58000
which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 0 bytes inside of
freed 4096-byte region [ffff88807ad58000, ffff88807ad59000)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7ad58
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 ffff88801b042140 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000040004 00000001f5000000 0000000000000000
head: 00fff00000000040 ffff88801b042140 dead000000000122 0000000000000000
head: 0000000000000000 0000000000040004 00000001f5000000 0000000000000000
head: 00fff00000000003 ffffea0001eb5601 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 11276, tgid 11276 (udevadm), ts 464197587748, free_ts 464180979538
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1541
prep_new_page mm/page_alloc.c:1549 [inline]
get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3459
__alloc_pages_noprof+0x223/0x25a0 mm/page_alloc.c:4735
alloc_pages_mpol_noprof+0x2c9/0x610 mm/mempolicy.c:2265
alloc_slab_page mm/slub.c:2412 [inline]
allocate_slab mm/slub.c:2578 [inline]
new_slab+0x2c9/0x410 mm/slub.c:2631
___slab_alloc+0xdac/0x1880 mm/slub.c:3818
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3908
__slab_alloc_node mm/slub.c:3961 [inline]
slab_alloc_node mm/slub.c:4122 [inline]
__kmalloc_cache_noprof+0x2b4/0x300 mm/slub.c:4290
kmalloc_noprof include/linux/slab.h:878 [inline]
kzalloc_noprof include/linux/slab.h:1014 [inline]
uevent_show+0x166/0x3b0 drivers/base/core.c:2731
dev_attr_show+0x56/0xe0 drivers/base/core.c:2430
sysfs_kf_seq_show+0x241/0x410 fs/sysfs/file.c:59
seq_read_iter+0x4f7/0x12b0 fs/seq_file.c:230
kernfs_fop_read_iter+0x414/0x580 fs/kernfs/file.c:279
new_sync_read fs/read_write.c:488 [inline]
vfs_read+0x882/0xbe0 fs/read_write.c:569
ksys_read+0x12f/0x260 fs/read_write.c:712
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
page last free pid 8938 tgid 8938 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1112 [inline]
free_unref_page+0x5f4/0xdc0 mm/page_alloc.c:2642
__folio_put+0x30d/0x3d0 mm/swap.c:126
kvfree+0x47/0x50 mm/util.c:701
rhashtable_free_and_destroy+0x16c/0x990 lib/rhashtable.c:1169
ila_xlat_exit_net+0x59/0xa0 net/ipv6/ila/ila_xlat.c:635
ops_exit_list+0xb3/0x180 net/core/net_namespace.c:173
cleanup_net+0x5b7/0xb40 net/core/net_namespace.c:626
process_one_work+0x9c8/0x1ba0 kernel/workqueue.c:3229
process_scheduled_works kernel/workqueue.c:3310 [inline]
worker_thread+0x6c8/0xf00 kernel/workqueue.c:3391
kthread+0x2c4/0x3a0 kernel/kthread.c:389
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Memory state around the buggy address:
ffff88807ad57f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88807ad57f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88807ad58000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88807ad58080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88807ad58100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
==================================================================
BUG: KASAN: slab-use-after-free in rht_bucket include/linux/rhashtable.h:289 [inline]
BUG: KASAN: slab-use-after-free in __rhashtable_lookup.constprop.0+0x430/0x550 include/linux/rhashtable.h:605
Read of size 4 at addr ffff88807ad58004 by task syz.8.997/11316
CPU: 1 UID: 0 PID: 11316 Comm: syz.8.997 Tainted: G B 6.12.0-rc7-syzkaller-00012-g3022e9d00ebe #0
Tainted: [B]=BAD_PAGE
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+0x116/0x1f0 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:377 [inline]
print_report+0xc3/0x620 mm/kasan/report.c:488
kasan_report+0xd9/0x110 mm/kasan/report.c:601
rht_bucket include/linux/rhashtable.h:289 [inline]
__rhashtable_lookup.constprop.0+0x430/0x550 include/linux/rhashtable.h:605
rhashtable_lookup include/linux/rhashtable.h:646 [inline]
rhashtable_lookup_fast include/linux/rhashtable.h:672 [inline]
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+0x1ee/0x620 net/ipv6/ila/ila_xlat.c:190
nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline]
nf_hook_slow+0xbe/0x200 net/netfilter/core.c:626
nf_hook.constprop.0+0x42e/0x750 include/linux/netfilter.h:269
NF_HOOK include/linux/netfilter.h:312 [inline]
ipv6_rcv+0xa4/0x680 net/ipv6/ip6_input.c:309
__netif_receive_skb_one_core+0x12e/0x1e0 net/core/dev.c:5670
__netif_receive_skb+0x1d/0x160 net/core/dev.c:5783
process_backlog+0x443/0x15f0 net/core/dev.c:6115
__napi_poll.constprop.0+0xba/0x550 net/core/dev.c:6779
napi_poll net/core/dev.c:6848 [inline]
net_rx_action+0xa92/0x1010 net/core/dev.c:6970
handle_softirqs+0x216/0x8f0 kernel/softirq.c:554
__do_softirq kernel/softirq.c:588 [inline]
invoke_softirq kernel/softirq.c:428 [inline]
__irq_exit_rcu kernel/softirq.c:637 [inline]
irq_exit_rcu+0xbb/0x120 kernel/softirq.c:649
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline]
sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1049
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:lock_release+0x3e5/0x6f0 kernel/locking/lockdep.c:5833
Code: 7e 83 f8 01 0f 85 fd 01 00 00 9c 58 f6 c4 02 0f 85 e8 01 00 00 48 f7 04 24 00 02 00 00 74 01 fb 48 b8 00 00 00 00 00 fc ff df <48> 01 c3 48 c7 03 00 00 00 00 c7 43 08 00 00 00 00 48 8b 84 24 88
RSP: 0018:ffffc900048ff648 EFLAGS: 00000206
RAX: dffffc0000000000 RBX: 1ffff9200091fecb RCX: ffffc900048ff698
RDX: 1ffff1100604ec9a RSI: ffffffff8b6cd340 RDI: ffffffff8bd1a880
RBP: ffffffffffffffff R08: 0000000000000000 R09: fffffbfff20bf011
R10: ffffffff905f808f R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000001 R14: ffff8880302764d8 R15: ffff888030275a00
__mutex_unlock_slowpath+0xa3/0x650 kernel/locking/mutex.c:912
__unix_dgram_recvmsg+0x829/0xe50 net/unix/af_unix.c:2521
unix_dgram_recvmsg+0xd0/0x110 net/unix/af_unix.c:2537
sock_recvmsg_nosec net/socket.c:1051 [inline]
____sys_recvmsg+0x5fb/0x6b0 net/socket.c:2824
___sys_recvmsg+0x115/0x1a0 net/socket.c:2868
do_recvmmsg+0x2ba/0x750 net/socket.c:2962
__sys_recvmmsg net/socket.c:3041 [inline]
__do_sys_recvmmsg net/socket.c:3064 [inline]
__se_sys_recvmmsg net/socket.c:3057 [inline]
__x64_sys_recvmmsg+0x239/0x290 net/socket.c:3057
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fca0ad7e719
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:00007fca0baba038 EFLAGS: 00000246 ORIG_RAX: 000000000000012b
RAX: ffffffffffffffda RBX: 00007fca0af36058 RCX: 00007fca0ad7e719
RDX: 0000000000010106 RSI: 00000000200000c0 RDI: 0000000000000003
RBP: 00007fca0adf1616 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fca0af36058 R15: 00007ffcc6a4b1a8
Allocated by task 11276:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:377 [inline]
__kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:394
kmalloc_noprof include/linux/slab.h:878 [inline]
kzalloc_noprof include/linux/slab.h:1014 [inline]
uevent_show+0x166/0x3b0 drivers/base/core.c:2731
dev_attr_show+0x56/0xe0 drivers/base/core.c:2430
sysfs_kf_seq_show+0x241/0x410 fs/sysfs/file.c:59
seq_read_iter+0x4f7/0x12b0 fs/seq_file.c:230
kernfs_fop_read_iter+0x414/0x580 fs/kernfs/file.c:279
new_sync_read fs/read_write.c:488 [inline]
vfs_read+0x882/0xbe0 fs/read_write.c:569
ksys_read+0x12f/0x260 fs/read_write.c:712
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 11276:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579
poison_slab_object mm/kasan/common.c:247 [inline]
__kasan_slab_free+0x51/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+0x14f/0x4b0 mm/slub.c:4727
uevent_show+0x2e5/0x3b0 drivers/base/core.c:2747
dev_attr_show+0x56/0xe0 drivers/base/core.c:2430
sysfs_kf_seq_show+0x241/0x410 fs/sysfs/file.c:59
seq_read_iter+0x4f7/0x12b0 fs/seq_file.c:230
kernfs_fop_read_iter+0x414/0x580 fs/kernfs/file.c:279
new_sync_read fs/read_write.c:488 [inline]
vfs_read+0x882/0xbe0 fs/read_write.c:569
ksys_read+0x12f/0x260 fs/read_write.c:712
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff88807ad58000
which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 4 bytes inside of
freed 4096-byte region [ffff88807ad58000, ffff88807ad59000)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7ad58
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 ffff88801b042140 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000040004 00000001f5000000 0000000000000000
head: 00fff00000000040 ffff88801b042140 dead000000000122 0000000000000000
head: 0000000000000000 0000000000040004 00000001f5000000 0000000000000000
head: 00fff00000000003 ffffea0001eb5601 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 11276, tgid 11276 (udevadm), ts 464197587748, free_ts 464180979538
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1541
prep_new_page mm/page_alloc.c:1549 [inline]
get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3459
__alloc_pages_noprof+0x223/0x25a0 mm/page_alloc.c:4735
alloc_pages_mpol_noprof+0x2c9/0x610 mm/mempolicy.c:2265
alloc_slab_page mm/slub.c:2412 [inline]
allocate_slab mm/slub.c:2578 [inline]
new_slab+0x2c9/0x410 mm/slub.c:2631
___slab_alloc+0xdac/0x1880 mm/slub.c:3818
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3908
__slab_alloc_node mm/slub.c:3961 [inline]
slab_alloc_node mm/slub.c:4122 [inline]
__kmalloc_cache_noprof+0x2b4/0x300 mm/slub.c:4290
kmalloc_noprof include/linux/slab.h:878 [inline]
kzalloc_noprof include/linux/slab.h:1014 [inline]
uevent_show+0x166/0x3b0 drivers/base/core.c:2731
dev_attr_show+0x56/0xe0 drivers/base/core.c:2430
sysfs_kf_seq_show+0x241/0x410 fs/sysfs/file.c:59
seq_read_iter+0x4f7/0x12b0 fs/seq_file.c:230
kernfs_fop_read_iter+0x414/0x580 fs/kernfs/file.c:279
new_sync_read fs/read_write.c:488 [inline]
vfs_read+0x882/0xbe0 fs/read_write.c:569
ksys_read+0x12f/0x260 fs/read_write.c:712
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
page last free pid 8938 tgid 8938 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1112 [inline]
free_unref_page+0x5f4/0xdc0 mm/page_alloc.c:2642
__folio_put+0x30d/0x3d0 mm/swap.c:126
kvfree+0x47/0x50 mm/util.c:701
rhashtable_free_and_destroy+0x16c/0x990 lib/rhashtable.c:1169
ila_xlat_exit_net+0x59/0xa0 net/ipv6/ila/ila_xlat.c:635
ops_exit_list+0xb3/0x180 net/core/net_namespace.c:173
cleanup_net+0x5b7/0xb40 net/core/net_namespace.c:626
process_one_work+0x9c8/0x1ba0 kernel/workqueue.c:3229
process_scheduled_works kernel/workqueue.c:3310 [inline]
worker_thread+0x6c8/0xf00 kernel/workqueue.c:3391
kthread+0x2c4/0x3a0 kernel/kthread.c:389
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Memory state around the buggy address:
ffff88807ad57f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88807ad57f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88807ad58000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88807ad58080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88807ad58100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
==================================================================
BUG: KASAN: slab-use-after-free in __rht_bucket_nested+0x456/0x4b0 lib/rhashtable.c:1188
Read of size 4 at addr ffff88807ad58004 by task syz.8.997/11316
CPU: 1 UID: 0 PID: 11316 Comm: syz.8.997 Tainted: G B 6.12.0-rc7-syzkaller-00012-g3022e9d00ebe #0
Tainted: [B]=BAD_PAGE
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+0x116/0x1f0 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:377 [inline]
print_report+0xc3/0x620 mm/kasan/report.c:488
kasan_report+0xd9/0x110 mm/kasan/report.c:601
__rht_bucket_nested+0x456/0x4b0 lib/rhashtable.c:1188
rht_bucket_nested+0x1a/0x40 lib/rhashtable.c:1220
rht_bucket include/linux/rhashtable.h:289 [inline]
__rhashtable_lookup.constprop.0+0x419/0x550 include/linux/rhashtable.h:605
rhashtable_lookup include/linux/rhashtable.h:646 [inline]
rhashtable_lookup_fast include/linux/rhashtable.h:672 [inline]
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+0x1ee/0x620 net/ipv6/ila/ila_xlat.c:190
nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline]
nf_hook_slow+0xbe/0x200 net/netfilter/core.c:626
nf_hook.constprop.0+0x42e/0x750 include/linux/netfilter.h:269
NF_HOOK include/linux/netfilter.h:312 [inline]
ipv6_rcv+0xa4/0x680 net/ipv6/ip6_input.c:309
__netif_receive_skb_one_core+0x12e/0x1e0 net/core/dev.c:5670
__netif_receive_skb+0x1d/0x160 net/core/dev.c:5783
process_backlog+0x443/0x15f0 net/core/dev.c:6115
__napi_poll.constprop.0+0xba/0x550 net/core/dev.c:6779
napi_poll net/core/dev.c:6848 [inline]
net_rx_action+0xa92/0x1010 net/core/dev.c:6970
handle_softirqs+0x216/0x8f0 kernel/softirq.c:554
__do_softirq kernel/softirq.c:588 [inline]
invoke_softirq kernel/softirq.c:428 [inline]
__irq_exit_rcu kernel/softirq.c:637 [inline]
irq_exit_rcu+0xbb/0x120 kernel/softirq.c:649
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline]
sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1049
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:lock_release+0x3e5/0x6f0 kernel/locking/lockdep.c:5833
Code: 7e 83 f8 01 0f 85 fd 01 00 00 9c 58 f6 c4 02 0f 85 e8 01 00 00 48 f7 04 24 00 02 00 00 74 01 fb 48 b8 00 00 00 00 00 fc ff df <48> 01 c3 48 c7 03 00 00 00 00 c7 43 08 00 00 00 00 48 8b 84 24 88
RSP: 0018:ffffc900048ff648 EFLAGS: 00000206
RAX: dffffc0000000000 RBX: 1ffff9200091fecb RCX: ffffc900048ff698
RDX: 1ffff1100604ec9a RSI: ffffffff8b6cd340 RDI: ffffffff8bd1a880
RBP: ffffffffffffffff R08: 0000000000000000 R09: fffffbfff20bf011
R10: ffffffff905f808f R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000001 R14: ffff8880302764d8 R15: ffff888030275a00
__mutex_unlock_slowpath+0xa3/0x650 kernel/locking/mutex.c:912
__unix_dgram_recvmsg+0x829/0xe50 net/unix/af_unix.c:2521
unix_dgram_recvmsg+0xd0/0x110 net/unix/af_unix.c:2537
sock_recvmsg_nosec net/socket.c:1051 [inline]
____sys_recvmsg+0x5fb/0x6b0 net/socket.c:2824
___sys_recvmsg+0x115/0x1a0 net/socket.c:2868
do_recvmmsg+0x2ba/0x750 net/socket.c:2962
__sys_recvmmsg net/socket.c:3041 [inline]
__do_sys_recvmmsg net/socket.c:3064 [inline]
__se_sys_recvmmsg net/socket.c:3057 [inline]
__x64_sys_recvmmsg+0x239/0x290 net/socket.c:3057
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fca0ad7e719
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:00007fca0baba038 EFLAGS: 00000246 ORIG_RAX: 000000000000012b
RAX: ffffffffffffffda RBX: 00007fca0af36058 RCX: 00007fca0ad7e719
RDX: 0000000000010106 RSI: 00000000200000c0 RDI: 0000000000000003
RBP: 00007fca0adf1616 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000002 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fca0af36058 R15: 00007ffcc6a4b1a8
Allocated by task 11276:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:377 [inline]
__kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:394
kmalloc_noprof include/linux/slab.h:878 [inline]
kzalloc_noprof include/linux/slab.h:1014 [inline]
uevent_show+0x166/0x3b0 drivers/base/core.c:2731
dev_attr_show+0x56/0xe0 drivers/base/core.c:2430
sysfs_kf_seq_show+0x241/0x410 fs/sysfs/file.c:59
seq_read_iter+0x4f7/0x12b0 fs/seq_file.c:230
kernfs_fop_read_iter+0x414/0x580 fs/kernfs/file.c:279
new_sync_read fs/read_write.c:488 [inline]
vfs_read+0x882/0xbe0 fs/read_write.c:569
ksys_read+0x12f/0x260 fs/read_write.c:712
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 11276:
kasan_save_stack+0x33/0x60 mm/kasan/common.c:47
kasan_save_track+0x14/0x30 mm/kasan/common.c:68
kasan_save_free_info+0x3b/0x60 mm/kasan/generic.c:579
poison_slab_object mm/kasan/common.c:247 [inline]
__kasan_slab_free+0x51/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+0x14f/0x4b0 mm/slub.c:4727
uevent_show+0x2e5/0x3b0 drivers/base/core.c:2747
dev_attr_show+0x56/0xe0 drivers/base/core.c:2430
sysfs_kf_seq_show+0x241/0x410 fs/sysfs/file.c:59
seq_read_iter+0x4f7/0x12b0 fs/seq_file.c:230
kernfs_fop_read_iter+0x414/0x580 fs/kernfs/file.c:279
new_sync_read fs/read_write.c:488 [inline]
vfs_read+0x882/0xbe0 fs/read_write.c:569
ksys_read+0x12f/0x260 fs/read_write.c:712
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff88807ad58000
which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 4 bytes inside of
freed 4096-byte region [ffff88807ad58000, ffff88807ad59000)
The buggy address belongs to the physical page:
page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7ad58
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 ffff88801b042140 dead000000000122 0000000000000000
raw: 0000000000000000 0000000000040004 00000001f5000000 0000000000000000
head: 00fff00000000040 ffff88801b042140 dead000000000122 0000000000000000
head: 0000000000000000 0000000000040004 00000001f5000000 0000000000000000
head: 00fff00000000003 ffffea0001eb5601 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 11276, tgid 11276 (udevadm), ts 464197587748, free_ts 464180979538
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1541
prep_new_page mm/page_alloc.c:1549 [inline]
get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3459
__alloc_pages_noprof+0x223/0x25a0 mm/page_alloc.c:4735
alloc_pages_mpol_noprof+0x2c9/0x610 mm/mempolicy.c:2265
alloc_slab_page mm/slub.c:2412 [inline]
allocate_slab mm/slub.c:2578 [inline]
new_slab+0x2c9/0x410 mm/slub.c:2631
___slab_alloc+0xdac/0x1880 mm/slub.c:3818
__slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3908
__slab_alloc_node mm/slub.c:3961 [inline]
slab_alloc_node mm/slub.c:4122 [inline]
__kmalloc_cache_noprof+0x2b4/0x300 mm/slub.c:4290
kmalloc_noprof include/linux/slab.h:878 [inline]
kzalloc_noprof include/linux/slab.h:1014 [inline]
uevent_show+0x166/0x3b0 drivers/base/core.c:2731
dev_attr_show+0x56/0xe0 drivers/base/core.c:2430
sysfs_kf_seq_show+0x241/0x410 fs/sysfs/file.c:59
seq_read_iter+0x4f7/0x12b0 fs/seq_file.c:230
kernfs_fop_read_iter+0x414/0x580 fs/kernfs/file.c:279
new_sync_read fs/read_write.c:488 [inline]
vfs_read+0x882/0xbe0 fs/read_write.c:569
ksys_read+0x12f/0x260 fs/read_write.c:712
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
page last free pid 8938 tgid 8938 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1112 [inline]
free_unref_page+0x5f4/0xdc0 mm/page_alloc.c:2642
__folio_put+0x30d/0x3d0 mm/swap.c:126
kvfree+0x47/0x50 mm/util.c:701
rhashtable_free_and_destroy+0x16c/0x990 lib/rhashtable.c:1169
ila_xlat_exit_net+0x59/0xa0 net/ipv6/ila/ila_xlat.c:635
ops_exit_list+0xb3/0x180 net/core/net_namespace.c:173
cleanup_net+0x5b7/0xb40 net/core/net_namespace.c:626
process_one_work+0x9c8/0x1ba0 kernel/workqueue.c:3229
process_scheduled_works kernel/workqueue.c:3310 [inline]
worker_thread+0x6c8/0xf00 kernel/workqueue.c:3391
kthread+0x2c4/0x3a0 kernel/kthread.c:389
ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
Memory state around the buggy address:
ffff88807ad57f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88807ad57f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88807ad58000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff88807ad58080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff88807ad58100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
------------[ cut here ]------------
UBSAN: shift-out-of-bounds in lib/rhashtable.c:1188:34
shift exponent 4294936704 is too large for 32-bit type 'int'
CPU: 1 UID: 0 PID: 11316 Comm: syz.8.997 Tainted: G B 6.12.0-rc7-syzkaller-00012-g3022e9d00ebe #0
Tainted: [B]=BAD_PAGE
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+0x16c/0x1f0 lib/dump_stack.c:120
ubsan_epilogue lib/ubsan.c:231 [inline]
__ubsan_handle_shift_out_of_bounds+0x2a5/0x480 lib/ubsan.c:468
__rht_bucket_nested.cold+0x18/0x14a lib/rhashtable.c:1188
rht_bucket_nested+0x1a/0x40 lib/rhashtable.c:1220
rht_bucket include/linux/rhashtable.h:289 [inline]
__rhashtable_lookup.constprop.0+0x419/0x550 include/linux/rhashtable.h:605
rhashtable_lookup include/linux/rhashtable.h:646 [inline]
rhashtable_lookup_fast include/linux/rhashtable.h:672 [inline]
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+0x1ee/0x620 net/ipv6/ila/ila_xlat.c:190
nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline]
nf_hook_slow+0xbe/0x200 net/netfilter/core.c:626
nf_hook.constprop.0+0x42e/0x750 include/linux/netfilter.h:269
NF_HOOK include/linux/netfilter.h:312 [inline]
ipv6_rcv+0xa4/0x680 net/ipv6/ip6_input.c:309
__netif_receive_skb_one_core+0x12e/0x1e0 net/core/dev.c:5670
__netif_receive_skb+0x1d/0x160 net/core/dev.c:5783
process_backlog+0x443/0x15f0 net/core/dev.c:6115
__napi_poll.constprop.0+0xba/0x550 net/core/dev.c:6779
napi_poll net/core/dev.c:6848 [inline]
net_rx_action+0xa92/0x1010 net/core/dev.c:6970
handle_softirqs+0x216/0x8f0 kernel/softirq.c:554
__do_softirq kernel/softirq.c:588 [inline]
invoke_softirq kernel/softirq.c:428 [inline]
__irq_exit_rcu kernel/softirq.c:637 [inline]
irq_exit_rcu+0xbb/0x120 kernel/softirq.c:649
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline]
sysvec_apic_timer_interrupt+0xa4/0xc0 arch/x86/kernel/apic/apic.c:1049
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:lock_release+0x3e5/0x6f0 kernel/locking/lockdep.c:5833
Code: 7e 83 f8 01 0f 85 fd 01 00 00 9c 58 f6 c4 02 0f 85 e8 01 00 00 48 f7 04 24 00 02 00 00 74 01 fb 48 b8 00 00 00 00 00 fc ff df <48> 01 c3 48 c7 03 00 00 00 00 c7 43 08 00 00 00 00 48 8b 84 24 88
RSP: 0018:ffffc900048ff648 EFLAGS: 00000206
RAX: dffffc0000000000 RBX: 1ffff9200091fecb RCX: ffffc900048ff698
RDX: 1ffff1100604ec9a RSI: ffffffff8b6cd340 RDI: ffffffff8bd1a880
RBP: ffffffffffffffff R08: 0000000000000000 R09: fffffbfff20bf011
R10: ffffffff905f808f R11: 0000000000000000 R12: 0000000000000000
R13: 0000000000000001 R14: ffff8880302764d8 R15: ffff888030275a00
__mutex_unlock_slowpath+0xa3/0x650 kernel/locking/mutex.c:912
__unix_dgram_recvmsg+0x829/0xe50 net/unix/af_unix.c:2521
----------------
Code disassembly (best guess):
0: 7e 83 jle 0xffffff85
2: f8 clc
3: 01 0f add %ecx,(%rdi)
5: 85 fd test %edi,%ebp
7: 01 00 add %eax,(%rax)
9: 00 9c 58 f6 c4 02 0f add %bl,0xf02c4f6(%rax,%rbx,2)
10: 85 e8 test %ebp,%eax
12: 01 00 add %eax,(%rax)
14: 00 48 f7 add %cl,-0x9(%rax)
17: 04 24 add $0x24,%al
19: 00 02 add %al,(%rdx)
1b: 00 00 add %al,(%rax)
1d: 74 01 je 0x20
1f: fb sti
20: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
27: fc ff df
* 2a: 48 01 c3 add %rax,%rbx <-- trapping instruction
2d: 48 c7 03 00 00 00 00 movq $0x0,(%rbx)
34: c7 43 08 00 00 00 00 movl $0x0,0x8(%rbx)
3b: 48 rex.W
3c: 8b .byte 0x8b
3d: 84 24 88 test %ah,(%rax,%rcx,4)