================================================================== BUG: KASAN: use-after-free in rht_key_hashfn include/linux/rhashtable.h:159 [inline] BUG: KASAN: use-after-free in __rhashtable_lookup include/linux/rhashtable.h:604 [inline] BUG: KASAN: use-after-free in rhashtable_lookup include/linux/rhashtable.h:646 [inline] BUG: KASAN: use-after-free in rhashtable_lookup_fast+0x668/0x814 include/linux/rhashtable.h:672 Read of size 4 at addr ffff0000d2fb8008 by task kworker/0:5/6314 CPU: 0 PID: 6314 Comm: kworker/0:5 Not tainted 6.9.0-rc7-syzkaller-gfda5695d692c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Workqueue: events linkwatch_event Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:317 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:324 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0x198/0x538 mm/kasan/report.c:488 kasan_report+0xd8/0x138 mm/kasan/report.c:601 __asan_report_load4_noabort+0x20/0x2c mm/kasan/report_generic.c:380 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+0x668/0x814 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:652 [inline] ila_nf_input+0x210/0x404 net/ipv6/ila/ila_xlat.c:190 nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline] nf_hook_slow+0xc8/0x230 net/netfilter/core.c:626 nf_hook include/linux/netfilter.h:269 [inline] NF_HOOK+0x22c/0x3d4 include/linux/netfilter.h:312 ipv6_rcv+0x9c/0xbc net/ipv6/ip6_input.c:310 __netif_receive_skb_one_core net/core/dev.c:5544 [inline] __netif_receive_skb+0x18c/0x3c8 net/core/dev.c:5658 process_backlog+0x3dc/0x754 net/core/dev.c:5987 __napi_poll+0xb4/0x3fc net/core/dev.c:6638 napi_poll net/core/dev.c:6707 [inline] net_rx_action+0x608/0xe2c net/core/dev.c:6822 handle_softirqs+0x2ec/0xc34 kernel/softirq.c:554 __do_softirq+0x14/0x20 kernel/softirq.c:588 ____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:81 call_on_irq_stack+0x24/0x4c arch/arm64/kernel/entry.S:889 do_softirq_own_stack+0x20/0x2c arch/arm64/kernel/irq.c:86 do_softirq+0x90/0xf8 kernel/softirq.c:455 __local_bh_enable_ip+0x288/0x44c kernel/softirq.c:382 __raw_spin_unlock_bh include/linux/spinlock_api_smp.h:167 [inline] _raw_spin_unlock_bh+0x3c/0x4c kernel/locking/spinlock.c:210 dev_reset_queue+0x184/0x1fc netdev_for_each_tx_queue include/linux/netdevice.h:2500 [inline] dev_deactivate_many+0x540/0xa8c net/sched/sch_generic.c:1365 dev_deactivate+0x13c/0x1fc net/sched/sch_generic.c:1388 linkwatch_do_dev+0x100/0x1a8 net/core/link_watch.c:175 __linkwatch_run_queue+0x3a0/0x700 net/core/link_watch.c:234 linkwatch_event+0x58/0x68 net/core/link_watch.c:277 process_one_work+0x7b8/0x15d4 kernel/workqueue.c:3267 process_scheduled_works kernel/workqueue.c:3348 [inline] worker_thread+0x938/0xef4 kernel/workqueue.c:3429 kthread+0x288/0x310 kernel/kthread.c:388 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860 The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x112fb8 flags: 0x5ffc00000000000(node=0|zone=2|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 05ffc00000000000 fffffdffc3448c08 ffff0001b3e04b70 0000000000000000 raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000d2fb7f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff0000d2fb7f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff0000d2fb8000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ^ ffff0000d2fb8080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff0000d2fb8100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ================================================================== vkms_vblank_simulate: vblank timer overrun ------------[ cut here ]------------ UBSAN: shift-out-of-bounds in lib/rhashtable.c:1182:34 shift exponent 4294901760 is too large for 32-bit type 'int' CPU: 0 PID: 6314 Comm: kworker/0:5 Tainted: G B 6.9.0-rc7-syzkaller-gfda5695d692c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Workqueue: events linkwatch_event Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:317 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:324 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:114 dump_stack+0x1c/0x28 lib/dump_stack.c:123 ubsan_epilogue lib/ubsan.c:231 [inline] __ubsan_handle_shift_out_of_bounds+0x2f4/0x36c lib/ubsan.c:468 __rht_bucket_nested+0x508/0x5b4 lib/rhashtable.c:1182 rht_bucket_nested+0x48/0x6c lib/rhashtable.c:1214 rht_bucket include/linux/rhashtable.h:289 [inline] __rhashtable_lookup include/linux/rhashtable.h:605 [inline] rhashtable_lookup include/linux/rhashtable.h:646 [inline] rhashtable_lookup_fast+0x5fc/0x814 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:652 [inline] ila_nf_input+0x210/0x404 net/ipv6/ila/ila_xlat.c:190 nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline] nf_hook_slow+0xc8/0x230 net/netfilter/core.c:626 nf_hook include/linux/netfilter.h:269 [inline] NF_HOOK+0x22c/0x3d4 include/linux/netfilter.h:312 ipv6_rcv+0x9c/0xbc net/ipv6/ip6_input.c:310 __netif_receive_skb_one_core net/core/dev.c:5544 [inline] __netif_receive_skb+0x18c/0x3c8 net/core/dev.c:5658 process_backlog+0x3dc/0x754 net/core/dev.c:5987 __napi_poll+0xb4/0x3fc net/core/dev.c:6638 napi_poll net/core/dev.c:6707 [inline] net_rx_action+0x608/0xe2c net/core/dev.c:6822 handle_softirqs+0x2ec/0xc34 kernel/softirq.c:554 __do_softirq+0x14/0x20 kernel/softirq.c:588 ____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:81 call_on_irq_stack+0x24/0x4c arch/arm64/kernel/entry.S:889 do_softirq_own_stack+0x20/0x2c arch/arm64/kernel/irq.c:86 do_softirq+0x90/0xf8 kernel/softirq.c:455 __local_bh_enable_ip+0x288/0x44c kernel/softirq.c:382 __raw_spin_unlock_bh include/linux/spinlock_api_smp.h:167 [inline] _raw_spin_unlock_bh+0x3c/0x4c kernel/locking/spinlock.c:210 dev_reset_queue+0x184/0x1fc netdev_for_each_tx_queue include/linux/netdevice.h:2500 [inline] dev_deactivate_many+0x540/0xa8c net/sched/sch_generic.c:1365 dev_deactivate+0x13c/0x1fc net/sched/sch_generic.c:1388 linkwatch_do_dev+0x100/0x1a8 net/core/link_watch.c:175 __linkwatch_run_queue+0x3a0/0x700 net/core/link_watch.c:234 linkwatch_event+0x58/0x68 net/core/link_watch.c:277 process_one_work+0x7b8/0x15d4 kernel/workqueue.c:3267 process_scheduled_works kernel/workqueue.c:3348 [inline] worker_thread+0x938/0xef4 kernel/workqueue.c:3429 kthread+0x288/0x310 kernel/kthread.c:388 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860 vkms_vblank_simulate: vblank timer overrun ---[ end trace ]--- ------------[ cut here ]------------ UBSAN: shift-out-of-bounds in lib/rhashtable.c:1183:32 shift exponent 4294901760 is too large for 32-bit type 'unsigned int' CPU: 0 PID: 6314 Comm: kworker/0:5 Tainted: G B 6.9.0-rc7-syzkaller-gfda5695d692c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Workqueue: events linkwatch_event Call trace: dump_backtrace+0x1b8/0x1e4 arch/arm64/kernel/stacktrace.c:317 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:324 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:114 dump_stack+0x1c/0x28 lib/dump_stack.c:123 ubsan_epilogue lib/ubsan.c:231 [inline] __ubsan_handle_shift_out_of_bounds+0x2f4/0x36c lib/ubsan.c:468 __rht_bucket_nested+0x5b0/0x5b4 lib/rhashtable.c:1183 rht_bucket_nested+0x48/0x6c lib/rhashtable.c:1214 rht_bucket include/linux/rhashtable.h:289 [inline] __rhashtable_lookup include/linux/rhashtable.h:605 [inline] rhashtable_lookup include/linux/rhashtable.h:646 [inline] rhashtable_lookup_fast+0x5fc/0x814 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:652 [inline] ila_nf_input+0x210/0x404 net/ipv6/ila/ila_xlat.c:190 nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline] nf_hook_slow+0xc8/0x230 net/netfilter/core.c:626 nf_hook include/linux/netfilter.h:269 [inline] NF_HOOK+0x22c/0x3d4 include/linux/netfilter.h:312 ipv6_rcv+0x9c/0xbc net/ipv6/ip6_input.c:310 __netif_receive_skb_one_core net/core/dev.c:5544 [inline] __netif_receive_skb+0x18c/0x3c8 net/core/dev.c:5658 process_backlog+0x3dc/0x754 net/core/dev.c:5987 __napi_poll+0xb4/0x3fc net/core/dev.c:6638 napi_poll net/core/dev.c:6707 [inline] net_rx_action+0x608/0xe2c net/core/dev.c:6822 handle_softirqs+0x2ec/0xc34 kernel/softirq.c:554 __do_softirq+0x14/0x20 kernel/softirq.c:588 ____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:81 call_on_irq_stack+0x24/0x4c arch/arm64/kernel/entry.S:889 do_softirq_own_stack+0x20/0x2c arch/arm64/kernel/irq.c:86 do_softirq+0x90/0xf8 kernel/softirq.c:455 __local_bh_enable_ip+0x288/0x44c kernel/softirq.c:382 __raw_spin_unlock_bh include/linux/spinlock_api_smp.h:167 [inline] _raw_spin_unlock_bh+0x3c/0x4c kernel/locking/spinlock.c:210 dev_reset_queue+0x184/0x1fc netdev_for_each_tx_queue include/linux/netdevice.h:2500 [inline] dev_deactivate_many+0x540/0xa8c net/sched/sch_generic.c:1365 dev_deactivate+0x13c/0x1fc net/sched/sch_generic.c:1388 linkwatch_do_dev+0x100/0x1a8 net/core/link_watch.c:175 __linkwatch_run_queue+0x3a0/0x700 net/core/link_watch.c:234 linkwatch_event+0x58/0x68 net/core/link_watch.c:277 process_one_work+0x7b8/0x15d4 kernel/workqueue.c:3267 process_scheduled_works kernel/workqueue.c:3348 [inline] worker_thread+0x938/0xef4 kernel/workqueue.c:3429 kthread+0x288/0x310 kernel/kthread.c:388 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860 vkms_vblank_simulate: vblank timer overrun ---[ end trace ]--- Unable to handle kernel paging request at virtual address dfff800000000000 KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] Mem abort info: ESR = 0x0000000096000005 EC = 0x25: DABT (current EL), IL = 32 bits SET = 0, FnV = 0 EA = 0, S1PTW = 0 FSC = 0x05: level 1 translation fault Data abort info: ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000 CM = 0, WnR = 0, TnD = 0, TagAccess = 0 GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0 [dfff800000000000] address between user and kernel address ranges Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 6314 Comm: kworker/0:5 Tainted: G B 6.9.0-rc7-syzkaller-gfda5695d692c #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Workqueue: events linkwatch_event pstate: 00400005 (nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : __rht_bucket_nested+0xbc/0x5b4 lib/rhashtable.c:1188 lr : nested_table_top lib/rhashtable.c:72 [inline] lr : __rht_bucket_nested+0xb0/0x5b4 lib/rhashtable.c:1187 sp : ffff800080007640 x29: ffff800080007650 x28: 1fffe0001d7b8684 x27: ffff0000d2fb8004 x26: dfff800000000000 x25: 00000000ffff0000 x24: 0000000000000000 x23: ffff0000d2fb8000 x22: 00000000c112a019 x21: 00000000cd1aa140 x20: 00000000ffff0000 x19: 0000000000000000 x18: 0000000000000008 x17: 0000000000000000 x16: ffff80008ae89e3c x15: ffff70001243aff0 x14: 1ffff0001243aff0 x13: 0000000000000004 x12: ffffffffffffffff x11: ffff70001243aff0 x10: 0000000000ff0100 x9 : ffff800093742cc0 x8 : 0000000000000000 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff800080006d38 x4 : ffff80008ef95100 x3 : ffff800082f2fbe8 x2 : 0000000000000000 x1 : 0000000000000008 x0 : 0000000000000000 Call trace: __rht_bucket_nested+0xbc/0x5b4 lib/rhashtable.c:1188 rht_bucket_nested+0x48/0x6c lib/rhashtable.c:1214 rht_bucket include/linux/rhashtable.h:289 [inline] __rhashtable_lookup include/linux/rhashtable.h:605 [inline] rhashtable_lookup include/linux/rhashtable.h:646 [inline] rhashtable_lookup_fast+0x5fc/0x814 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:652 [inline] ila_nf_input+0x210/0x404 net/ipv6/ila/ila_xlat.c:190 nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline] nf_hook_slow+0xc8/0x230 net/netfilter/core.c:626 nf_hook include/linux/netfilter.h:269 [inline] NF_HOOK+0x22c/0x3d4 include/linux/netfilter.h:312 ipv6_rcv+0x9c/0xbc net/ipv6/ip6_input.c:310 __netif_receive_skb_one_core net/core/dev.c:5544 [inline] __netif_receive_skb+0x18c/0x3c8 net/core/dev.c:5658 process_backlog+0x3dc/0x754 net/core/dev.c:5987 __napi_poll+0xb4/0x3fc net/core/dev.c:6638 napi_poll net/core/dev.c:6707 [inline] net_rx_action+0x608/0xe2c net/core/dev.c:6822 handle_softirqs+0x2ec/0xc34 kernel/softirq.c:554 __do_softirq+0x14/0x20 kernel/softirq.c:588 ____do_softirq+0x14/0x20 arch/arm64/kernel/irq.c:81 call_on_irq_stack+0x24/0x4c arch/arm64/kernel/entry.S:889 do_softirq_own_stack+0x20/0x2c arch/arm64/kernel/irq.c:86 do_softirq+0x90/0xf8 kernel/softirq.c:455 __local_bh_enable_ip+0x288/0x44c kernel/softirq.c:382 __raw_spin_unlock_bh include/linux/spinlock_api_smp.h:167 [inline] _raw_spin_unlock_bh+0x3c/0x4c kernel/locking/spinlock.c:210 dev_reset_queue+0x184/0x1fc netdev_for_each_tx_queue include/linux/netdevice.h:2500 [inline] dev_deactivate_many+0x540/0xa8c net/sched/sch_generic.c:1365 dev_deactivate+0x13c/0x1fc net/sched/sch_generic.c:1388 linkwatch_do_dev+0x100/0x1a8 net/core/link_watch.c:175 __linkwatch_run_queue+0x3a0/0x700 net/core/link_watch.c:234 linkwatch_event+0x58/0x68 net/core/link_watch.c:277 process_one_work+0x7b8/0x15d4 kernel/workqueue.c:3267 process_scheduled_works kernel/workqueue.c:3348 [inline] worker_thread+0x938/0xef4 kernel/workqueue.c:3429 kthread+0x288/0x310 kernel/kthread.c:388 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:860 Code: 976c7fd3 f9400308 8b130d18 d343ff08 (387a6908) ---[ end trace 0000000000000000 ]--- ---------------- Code disassembly (best guess): 0: 976c7fd3 bl 0xfffffffffdb1ff4c 4: f9400308 ldr x8, [x24] 8: 8b130d18 add x24, x8, x19, lsl #3 c: d343ff08 lsr x8, x24, #3 * 10: 387a6908 ldrb w8, [x8, x26] <-- trapping instruction