[linux-next:master] [nfsd] 48d45b8a92: UBSAN:array-index-out-of-bounds_in_fs/nfsd/nfssvc.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hello,

kernel test robot noticed "UBSAN:array-index-out-of-bounds_in_fs/nfsd/nfssvc.c" on:

commit: 48d45b8a92098fd0ace1915e822b6a911d68e9f0 ("nfsd: don't allocate the versions array.")
https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git master

[test failed on linux-next/master cd19ac2f903276b820f5d0d89de0c896c27036ed]

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)


+-----------------------------------------------------+------------+------------+
|                                                     | 380cca57af | 48d45b8a92 |
+-----------------------------------------------------+------------+------------+
| UBSAN:array-index-out-of-bounds_in_fs/nfsd/nfssvc.c | 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 <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-lkp/202408011636.9b233ef3-lkp@xxxxxxxxx


[    4.884788][    T1] ------------[ cut here ]------------
[    4.886401][    T1] UBSAN: array-index-out-of-bounds in fs/nfsd/nfssvc.c:136:22
[    4.888944][    T1] index 4 is out of range for type 'svc_version *[4]'
[    4.890804][    T1] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.11.0-rc1-00011-g48d45b8a9209 #1 49a9f3c8c569f643764c5d3c5c4fd0ac6de5811a
[    4.894224][    T1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
[    4.894294][    T1] Call Trace:
[ 4.894294][ T1] dump_stack_lvl (lib/dump_stack.c:122) 
[ 4.894294][ T1] dump_stack (lib/dump_stack.c:129) 
[ 4.894294][ T1] __ubsan_handle_out_of_bounds (lib/ubsan.c:232 (discriminator 1) lib/ubsan.c:429 (discriminator 1)) 
[ 4.894294][ T1] nfsd_support_version (fs/nfsd/nfssvc.c:136) 
[ 4.894294][ T1] nfsd_net_init (fs/nfsd/nfsctl.c:2252 (discriminator 2)) 
[ 4.894294][ T1] ops_init (net/core/net_namespace.c:139) 
[ 4.894294][ T1] register_pernet_operations (net/core/net_namespace.c:1252 net/core/net_namespace.c:1325) 
[ 4.894294][ T1] ? down_write (arch/x86/include/asm/preempt.h:79 (discriminator 10) kernel/locking/rwsem.c:1304 (discriminator 10) kernel/locking/rwsem.c:1315 (discriminator 10) kernel/locking/rwsem.c:1580 (discriminator 10)) 
[ 4.894294][ T1] register_pernet_subsys (net/core/net_namespace.c:1366) 
[ 4.894294][ T1] init_nfsd (fs/nfsd/nfsctl.c:2311) 
[ 4.894294][ T1] ? nfs4flexfilelayout_init (fs/nfsd/nfsctl.c:2295) 
[ 4.894294][ T1] do_one_initcall (init/main.c:1267) 
[ 4.894294][ T1] do_initcalls (init/main.c:1328 (discriminator 1) init/main.c:1345 (discriminator 1)) 
[ 4.894294][ T1] ? rest_init (init/main.c:1459) 
[ 4.894294][ T1] kernel_init_freeable (init/main.c:1582) 
[ 4.894294][ T1] kernel_init (init/main.c:1469) 
[ 4.894294][ T1] ret_from_fork (arch/x86/kernel/process.c:153) 
[ 4.894294][ T1] ? rest_init (init/main.c:1459) 
[ 4.894294][ T1] ret_from_fork_asm (arch/x86/entry/entry_32.S:737) 
[ 4.894294][ T1] entry_INT80_32 (arch/x86/entry/entry_32.S:944) 
[    4.924077][    T1] ---[ end trace ]---


The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20240801/202408011636.9b233ef3-lkp@xxxxxxxxx



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





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux