lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 16 Mar 2021 07:50:10 +0800
From:   kernel test robot <lkp@...el.com>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        x86@...nel.org, Borislav Petkov <bp@...e.de>
Subject: [tip:x86/cpu 2/3] arch/x86/kernel/alternative.c:96:10: warning:
 Undefined behaviour, pointer arithmetic 'x86nops+10' is out of bounds.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/cpu
head:   301cddc21a157a3072d789a3097857202e550a24
commit: a89dfde3dc3c2dbf56910af75e2d8b11ec5308f6 [2/3] x86: Remove dynamic NOP selection
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> arch/x86/kernel/alternative.c:96:10: warning: Undefined behaviour, pointer arithmetic 'x86nops+10' is out of bounds. [pointerOutOfBounds]
    x86nops + 1 + 2 + 3 + 4,
            ^
   arch/x86/kernel/alternative.c:97:10: warning: Undefined behaviour, pointer arithmetic 'x86nops+15' is out of bounds. [pointerOutOfBounds]
    x86nops + 1 + 2 + 3 + 4 + 5,
            ^
   arch/x86/kernel/alternative.c:98:10: warning: Undefined behaviour, pointer arithmetic 'x86nops+21' is out of bounds. [pointerOutOfBounds]
    x86nops + 1 + 2 + 3 + 4 + 5 + 6,
            ^
   arch/x86/kernel/alternative.c:99:10: warning: Undefined behaviour, pointer arithmetic 'x86nops+28' is out of bounds. [pointerOutOfBounds]
    x86nops + 1 + 2 + 3 + 4 + 5 + 6 + 7,
            ^
>> arch/x86/kernel/ftrace.c:304:7: warning: union member 'ftrace_op_code_union::code' is never used. [unusedStructMember]
    char code[OP_REF_SIZE];
         ^

vim +96 arch/x86/kernel/alternative.c

    88	
    89	const unsigned char * const x86_nops[ASM_NOP_MAX+1] =
    90	{
    91		NULL,
    92		x86nops,
    93		x86nops + 1,
    94		x86nops + 1 + 2,
    95		x86nops + 1 + 2 + 3,
  > 96		x86nops + 1 + 2 + 3 + 4,
    97		x86nops + 1 + 2 + 3 + 4 + 5,
    98		x86nops + 1 + 2 + 3 + 4 + 5 + 6,
    99		x86nops + 1 + 2 + 3 + 4 + 5 + 6 + 7,
   100	};
   101	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ