================================================================================ UBSAN: shift-out-of-bounds in net/core/gen_estimator.c:83:38 shift exponent -2 is negative CPU: 1 PID: 27768 Comm: syz-executor.0 Not tainted 5.10.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:120 ubsan_epilogue+0xb/0x5a lib/ubsan.c:148 __ubsan_handle_shift_out_of_bounds.cold+0xb1/0x181 lib/ubsan.c:395 est_timer.cold+0xbb/0x12d net/core/gen_estimator.c:83 call_timer_fn+0x1a5/0x710 kernel/time/timer.c:1417 expire_timers kernel/time/timer.c:1462 [inline] __run_timers+0x6f6/0xb10 kernel/time/timer.c:1731 run_timer_softirq+0x7d/0x140 kernel/time/timer.c:1744 __do_softirq+0x2cb/0xad5 kernel/softirq.c:298 asm_call_irq_on_stack+0xf/0x20 __run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline] run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline] do_softirq_own_stack+0xaa/0xd0 arch/x86/kernel/irq_64.c:77 invoke_softirq kernel/softirq.c:393 [inline] __irq_exit_rcu kernel/softirq.c:423 [inline] irq_exit_rcu+0x18a/0x1b0 kernel/softirq.c:435 sysvec_apic_timer_interrupt+0x4d/0x100 arch/x86/kernel/apic/apic.c:1096 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:628 RIP: 0010:on_stack arch/x86/include/asm/stacktrace.h:48 [inline] RIP: 0010:stack_access_ok arch/x86/kernel/unwind_orc.c:342 [inline] RIP: 0010:deref_stack_reg+0x0/0x150 arch/x86/kernel/unwind_orc.c:352 Code: 14 24 e9 7b ff ff ff 48 89 14 24 e8 5a c3 87 00 48 8b 14 24 e9 48 ff ff ff 48 89 0c 24 e8 48 c3 87 00 48 8b 0c 24 eb 9d 66 90 <48> b8 00 00 00 00 00 fc ff df 41 55 41 54 49 89 fc 55 48 89 f5 53 RSP: 0018:ffffc90009a4f258 EFLAGS: 00000246 RAX: ffffc90009a4ff48 RBX: 1ffff92001349e56 RCX: ffffffff8e88e619 RDX: ffffc90009a4f390 RSI: ffffc90009a4ff40 RDI: ffffc90009a4f348 RBP: 0000000000000001 R08: ffffffff8e88e614 R09: ffffffff8e88e618 R10: fffff52001349e74 R11: 0000000000000001 R12: ffffc90009a4f390 R13: ffffc90009a4f37d R14: ffffc90009a4f398 R15: ffffc90009a4f348 unwind_next_frame+0xcbc/0x2610 arch/x86/kernel/unwind_orc.c:531 arch_stack_walk+0x7d/0xe0 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x8c/0xc0 kernel/stacktrace.c:121 kasan_save_stack+0x1b/0x40 mm/kasan/common.c:48 kasan_set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc.constprop.0+0xc2/0xd0 mm/kasan/common.c:461 slab_post_alloc_hook mm/slab.h:512 [inline] slab_alloc_node mm/slub.c:2889 [inline] slab_alloc mm/slub.c:2897 [inline] kmem_cache_alloc+0x145/0x350 mm/slub.c:2902 kmem_cache_zalloc include/linux/slab.h:672 [inline] __kernfs_new_node+0xd4/0x8f0 fs/kernfs/dir.c:626 kernfs_new_node+0x93/0x120 fs/kernfs/dir.c:688 __kernfs_create_file+0x51/0x350 fs/kernfs/file.c:1002 sysfs_add_file_mode_ns+0x226/0x540 fs/sysfs/file.c:306 create_files fs/sysfs/group.c:64 [inline] internal_create_group+0x328/0xb90 fs/sysfs/group.c:149 add_port drivers/infiniband/core/sysfs.c:1122 [inline] ib_setup_port_attrs+0x95b/0x1540 drivers/infiniband/core/sysfs.c:1367 add_one_compat_dev+0x4cb/0x820 drivers/infiniband/core/device.c:917 rdma_dev_init_net+0x33a/0x4d0 drivers/infiniband/core/device.c:1133 ops_init+0xaf/0x4a0 net/core/net_namespace.c:152 setup_net+0x2de/0x850 net/core/net_namespace.c:342 copy_net_ns+0x376/0x7b0 net/core/net_namespace.c:483 create_new_namespaces+0x3f6/0xb20 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0xbd/0x230 kernel/nsproxy.c:226 ksys_unshare+0x445/0x8e0 kernel/fork.c:2957 __do_sys_unshare kernel/fork.c:3025 [inline] __se_sys_unshare kernel/fork.c:3023 [inline] __x64_sys_unshare+0x2d/0x40 kernel/fork.c:3023 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45e219 Code: 0d b4 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 db b3 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f61699b6c68 EFLAGS: 00000246 ORIG_RAX: 0000000000000110 RAX: ffffffffffffffda RBX: 0000000000000001 RCX: 000000000045e219 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000044040000 RBP: 000000000119c058 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000119c034 R13: 00007ffd314ead2f R14: 00007f61699b79c0 R15: 000000000119c034 ================================================================================