All of lore.kernel.org
 help / color / mirror / Atom feed
* [ebiggers:wip-verity] [crypto]  daf2d68fba: UBSAN:shift-out-of-bounds_in_include/linux/log2.h
@ 2024-04-30  3:20 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-04-30  3:20 UTC (permalink / raw)
  To: Eric Biggers; +Cc: oe-lkp, lkp, oliver.sang



Hello,

kernel test robot noticed "UBSAN:shift-out-of-bounds_in_include/linux/log2.h" on:

commit: daf2d68fba06b13c4eb6c0b07a31da46f988ba9f ("crypto: testmgr - generate power-of-2 lengths more often")
https://git.kernel.org/cgit/linux/kernel/git/ebiggers/linux.git wip-verity

in testcase: boot

compiler: gcc-13
test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G

(please refer to attached dmesg/kmsg for entire log/backtrace)


+---------------------------------------------------+------------+------------+
|                                                   | 9fc50fd0c4 | daf2d68fba |
+---------------------------------------------------+------------+------------+
| UBSAN:shift-out-of-bounds_in_include/linux/log2.h | 0          | 12         |
+---------------------------------------------------+------------+------------+


If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <oliver.sang@intel.com>
| Closes: https://lore.kernel.org/oe-lkp/202404301102.dd98490d-oliver.sang@intel.com


[   65.669549][ T2612] ------------[ cut here ]------------
[   65.670771][ T2612] UBSAN: shift-out-of-bounds in include/linux/log2.h:67:13
[   65.672859][ T2612] shift exponent 4294967295 is too large for 64-bit type 'long unsigned int'
[   65.674762][ T2612] CPU: 1 PID: 2612 Comm: cryptomgr_test Tainted: G        W          6.9.0-rc4-00002-gdaf2d68fba06 #1
[   65.675758][ T2612] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
[   65.675758][ T2612] Call Trace:
[   65.675758][ T2612]  <TASK>
[ 65.675758][ T2612] dump_stack_lvl (lib/dump_stack.c:117) 
[ 65.675758][ T2612] __ubsan_handle_shift_out_of_bounds (lib/ubsan.c:218 lib/ubsan.c:454) 
[ 65.675758][ T2612] generate_random_length.cold (include/linux/log2.h:67 (discriminator 1) crypto/testmgr.c:918 (discriminator 1)) 
[ 65.675758][ T2612] test_hash_vs_generic_impl (crypto/testmgr.c:1704 crypto/testmgr.c:1834) 
[ 65.675758][ T2612] ? __pfx_test_hash_vs_generic_impl (crypto/testmgr.c:1743) 
[ 65.675758][ T2612] ? __kmalloc (include/linux/kasan.h:211 mm/slub.c:3966 mm/slub.c:3979) 
[ 65.675758][ T2612] ? __pfx___might_resched (kernel/sched/core.c:10152) 
[ 65.675758][ T2612] __alg_test_hash (crypto/testmgr.c:1978) 
[ 65.675758][ T2612] alg_test_hash (crypto/testmgr.c:2026) 
[ 65.675758][ T2612] ? finish_task_switch+0x155/0x750 
[ 65.675758][ T2612] alg_test (crypto/testmgr.c:5874) 
[ 65.675758][ T2612] ? __pfx_alg_test (crypto/testmgr.c:5827) 
[ 65.675758][ T2612] ? __pfx___schedule (kernel/sched/core.c:6617) 
[ 65.675758][ T2612] ? try_to_wake_up (include/linux/sched.h:2116 (discriminator 2) kernel/sched/core.c:4382 (discriminator 2)) 
[ 65.675758][ T2612] ? _raw_spin_lock_irqsave (arch/x86/include/asm/atomic.h:115 (discriminator 4) include/linux/atomic/atomic-arch-fallback.h:2170 (discriminator 4) include/linux/atomic/atomic-instrumented.h:1302 (discriminator 4) include/asm-generic/qspinlock.h:111 (discriminator 4) include/linux/spinlock.h:187 (discriminator 4) include/linux/spinlock_api_smp.h:111 (discriminator 4) kernel/locking/spinlock.c:162 (discriminator 4)) 
[ 65.675758][ T2612] ? __pfx__raw_spin_lock_irqsave (kernel/locking/spinlock.c:161) 
[ 65.675758][ T2612] ? set_cpus_allowed_ptr (kernel/sched/core.c:3222) 
[ 65.675758][ T2612] ? __pfx_set_cpus_allowed_ptr (kernel/sched/core.c:3222) 
[ 65.675758][ T2612] ? __pfx_cryptomgr_test (crypto/algboss.c:175) 
[ 65.675758][ T2612] cryptomgr_test (crypto/algboss.c:182) 
[ 65.675758][ T2612] kthread (kernel/kthread.c:388) 
[ 65.675758][ T2612] ? __pfx_kthread (kernel/kthread.c:341) 
[ 65.675758][ T2612] ret_from_fork (arch/x86/kernel/process.c:153) 
[ 65.675758][ T2612] ? __pfx_kthread (kernel/kthread.c:341) 
[ 65.675758][ T2612] ret_from_fork_asm (arch/x86/entry/entry_64.S:257) 
[   65.675758][ T2612]  </TASK>
[   65.711422][ T2612] ---[ end trace ]---



The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20240430/202404301102.dd98490d-oliver.sang@intel.com



-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-30  3:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-30  3:20 [ebiggers:wip-verity] [crypto] daf2d68fba: UBSAN:shift-out-of-bounds_in_include/linux/log2.h kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.