Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Buid Fail] size of array element of type 'blake2b_state isn't a multiple of its alignment #5351

Closed
bioinfornatics opened this issue Aug 14, 2023 · 6 comments
Labels
dupe This issue already existed. When using this, always link to the original issue(s). portability

Comments

@bioinfornatics
Copy link

Build fail with both gcc and clang for the same reason

$ make -s clean && make -sj4
In file included from argon2_core_plug.c:32:
./blake2.h:112:23: error: size of array element of type 'blake2b_state' (aka 'struct __blake2b_state') (368 bytes) isn't a multiple of its alignment (64 bytes)
    blake2b_state S[4][1];
                      ^
./blake2.h:113:20: error: size of array element of type 'blake2b_state' (aka 'struct __blake2b_state') (368 bytes) isn't a multiple of its alignment (64 bytes)
    blake2b_state R[1];
@claudioandre-br
Copy link
Member

We hoped this was fixed in the source tree.

@bioinfornatics , could you please provide information about your build environment/configuration?

See #4604 and ##4611. Thanks for reporting.

@solardiz solardiz added dupe This issue already existed. When using this, always link to the original issue(s). and removed notes/external issues labels Aug 14, 2023
@solardiz
Copy link
Member

@bioinfornatics As @claudioandre-br correctly points out, this looks like dupe of the issue we fixed in here 2+ years ago. At the time, it was reported against gcc 11. It's new to me that it also shows up with clang. Anyway, please update to our current code from this repo and try again and report back.

And this is our reminder to make a new release...

@bioinfornatics
Copy link
Author

Thanks @claudioandre-br and @solardiz for this quick reply,

I try with clang and that build fine

$ cd src/
$ CC=/usr/bin/clang
$ ./configure --prefix /opt/john/1.9-c798c3f
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking whether to compile using MPI... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking additional paths...  -L/usr/local/lib -I/usr/local/include
checking arg check macro for -m with gcc... yes
checking arg check macro for -Q with gcc... yes
checking if gcc supports -funroll-loops... yes
checking if gcc supports -Os... yes
checking if gcc supports -finline-functions... yes
checking if gcc supports -Og... yes
checking if gcc supports -Wall... yes
checking if gcc supports -Wno-stringop-truncation... yes
checking if gcc supports -Wno-format-overflow... yes
checking if gcc supports -Wno-format-truncation... yes
checking if gcc supports -Wno-tautological-constant-out-of-range-compare... no
checking if gcc supports -fno-omit-frame-pointer... yes
checking if gcc supports --param allow-store-data-races=0... no
checking if gcc supports -Wno-deprecated-declarations... yes
checking if gcc supports -Wformat-extra-args... no
checking if gcc supports -Wunused-but-set-variable... yes
checking if gcc supports -Qunused-arguments... no
checking if gcc supports -Wdate-time... yes
checking if gcc supports -m64... skipped
checking for 32/64 bit... 64-bit
checking additional paths (64 bit)...  -L/usr/local/lib64 -L/usr/lib64 -L/lib64
checking whether ln -s works... yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for a sed that does not truncate output... /usr/bin/sed
checking for GNU make... make
checking whether make sets $(MAKE)... yes
checking how to run the C preprocessor... gcc -E
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for sort... /usr/bin/sort
checking for find... /usr/bin/find
checking for perl... /usr/bin/perl
checking for ar... /usr/bin/ar
checking for strip... strip
checking for strings... strings
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking if pkg-config will be used... no
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking size of short... 2
checking size of int... 4
checking size of long... 8
checking size of long long... 8
checking size of wchar_t... 4
checking size of int *... 8
checking size of void *... 8
checking for extra ASFLAGS... None needed
checking for X32 ABI... no
checking special compiler flags... Intel x86
configure: Testing build host's native CPU features
checking for MMX... yes
checking for SSE2... yes
checking for SSSE3... yes
checking for SSE4.1... yes
checking for SSE4.2... yes
checking for AVX... yes
checking for XOP... no
checking for AVX2... yes
checking for AVX512F... no
checking for arch.h alternative... x86-64.h
checking for byte ordering according to target triple... little
checking supplied paths for OpenSSL...  
checking additional paths for OpenSSL... none
checking openssl/opensslv.h usability... yes
checking openssl/opensslv.h presence... yes
checking for openssl/opensslv.h... yes
checking for SSL_CTX_new in -lssl... yes
checking for MD5_Update in -lcrypto... yes
checking for (non-free) ClamAV unrar code... yes
checking for sqrt in -lm... yes
checking for clock_gettime in -lrt... yes
checking for deflate in -lz... yes
checking for library containing crypt... -lcrypt
checking gmp.h usability... no
checking gmp.h presence... no
checking for gmp.h... no
checking gmp/gmp.h usability... no
checking gmp/gmp.h presence... no
checking for gmp/gmp.h... no
checking skey.h usability... no
checking skey.h presence... no
checking for skey.h... no
checking for S/Key... using our own code
checking bzlib.h usability... yes
checking bzlib.h presence... yes
checking for bzlib.h... yes
checking for main in -lbz2... yes
checking for main in -lkernel32... no
checking for dlopen in -ldl... yes
checking intrin.h usability... no
checking intrin.h presence... no
checking for intrin.h... no
checking openssl/cmac.h usability... yes
checking openssl/cmac.h presence... yes
checking for openssl/cmac.h... yes
configure: rexgen check not enabled
checking pcap.h usability... yes
checking pcap.h presence... yes
checking for pcap.h... yes
checking for pcap_compile in -lpcap... yes
checking for pcap.h... (cached) yes
checking for pcap_compile in -lwpcap... no
checking whether time.h and sys/time.h may both be included... yes
checking whether string.h and strings.h may both be included... yes
checking for SHA256... yes
checking for WHIRLPOOL... yes
checking for RIPEMD160... yes
checking for AES_encrypt... yes
checking for DSA_get0_pqg... yes
checking for gcc option to support OpenMP... -fopenmp
checking additional paths for OpenCL... none
checking if compiler needs -Werror to reject unknown flags... no
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking whether we are using the Microsoft C compiler... no
checking CL/cl.h usability... yes
checking CL/cl.h presence... yes
checking for CL/cl.h... yes
checking OpenCL/cl.h usability... no
checking OpenCL/cl.h presence... no
checking for OpenCL/cl.h... no
checking windows.h usability... no
checking windows.h presence... no
checking for windows.h... no
checking for OpenCL library... -lOpenCL
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking crypt.h usability... yes
checking crypt.h presence... yes
checking for crypt.h... yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking net/ethernet.h usability... yes
checking net/ethernet.h presence... yes
checking for net/ethernet.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking netinet/in_systm.h usability... yes
checking netinet/in_systm.h presence... yes
checking for netinet/in_systm.h... yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/ethernet.h usability... no
checking sys/ethernet.h presence... no
checking for sys/ethernet.h... no
checking sys/file.h usability... yes
checking sys/file.h presence... yes
checking for sys/file.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/times.h usability... yes
checking sys/times.h presence... yes
checking for sys/times.h... yes
checking for sys/types.h... (cached) yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking for unistd.h... (cached) yes
checking unixlib/local.h usability... no
checking unixlib/local.h presence... no
checking for unixlib/local.h... no
checking for windows.h... (cached) no
checking for net/if.h... yes
checking for net/if_arp.h... yes
checking for netinet/if_ether.h... yes
checking for netinet/ip.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for inline... inline
checking for int32_t... yes
checking for int64_t... yes
checking for off_t... yes
checking for size_t... yes
checking for ssize_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uint8_t... yes
checking for ptrdiff_t... yes
checking for int128... no
checking for __int128... yes
checking for __int128_t... yes
checking for error_at_line... yes
checking for pid_t... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for fseek64... no
checking for fseeko... yes
checking for fseeko64... yes
checking for _fseeki64... no
checking for lseek64... yes
checking for lseek... yes
checking for ftell64... no
checking for ftello... yes
checking for ftello64... yes
checking for _ftelli64... no
checking for fopen64... yes
checking for _fopen64... no
checking for memmem... yes
checking for mmap... yes
checking for sleep... yes
checking for setenv... yes
checking for putenv... yes
checking for strcasecmp... yes
checking for strncasecmp... yes
checking for stricmp... no
checking for strcmpi... no
checking for _stricmp... no
checking for _strcmpi... no
checking for strnicmp... no
checking for strncmpi... no
checking for _strnicmp... no
checking for _strncmpi... no
checking for strnlen... yes
checking for strlwr... no
checking for strupr... no
checking for strrev... no
checking for atoll... yes
checking for _atoi64... no
checking for snprintf... yes
checking for sprintf_s... no
checking for strcasestr... yes
checking for clGetKernelArgInfo... yes
checking for posix_memalign... yes
checking for yasm that supports "-g dwarf2 -f elf64"... 
checking for OS-specific feature macros needed...  -D_POSIX_SOURCE -D_GNU_SOURCE -D_XOPEN_SOURCE=600
checking size of size_t... 8
checking size of off_t... 8
configure: Fuzz check disabled
configure: Fuzzing (using libFuzzer) check disabled
configure: creating *_plug.c and OpenCL object rules
configure: creating Makefile dependencies
configure: creating ./john_build_rule.h
configure: creating ./config.status
config.status: creating Makefile
config.status: creating aes/Makefile
config.status: creating aes/aesni/Makefile
config.status: creating aes/openssl/Makefile
config.status: creating secp256k1/Makefile
config.status: creating ed25519-donna/Makefile
config.status: creating poly1305-donna/Makefile
config.status: creating autoconfig.h
config.status: linking x86-64.h to arch.h
config.status: executing default commands
configure: creating ./fmt_externs.h
configure: creating ./fmt_registers.h

Configured for building John the Ripper jumbo:

Target CPU ......................................... x86_64 AVX2, 64-bit LE
AES-NI support ..................................... depends on OpenSSL
Target OS .......................................... linux-gnu
Cross compiling .................................... no
Legacy arch header ................................. x86-64.h

Optional libraries/features found:
Memory map (share/page large files) ................ yes
Fork support ....................................... yes
OpenMP support ..................................... yes (not for fast formats)
OpenCL support ..................................... yes
Generic crypt(3) format ............................ yes
OpenSSL (many additional formats) .................. yes
libgmp (PRINCE mode and faster SRP formats) ........ no
128-bit integer (faster PRINCE mode) ............... yes
libz (7z, pkzip and some other formats) ............ yes
libbz2 (7z and gpg2john bz2 support) ............... yes
libpcap (vncpcap2john and SIPdump) ................. yes
Non-free unrar code (complete RAR support) ......... yes
librexgen (regex mode, see doc/README.librexgen) ... no
OpenMPI support (default disabled) ................. no
Experimental code (default disabled) ............... no
ZTEX USB-FPGA module 1.15y support ................. no

Install missing libraries to get any needed features that were omitted.

Configure finished.  Now "make -s clean && make -sj4" to compile.

$ make -s clean && make -sj4
pkcs12_plug.c: In function 'mbedtls_pkcs12_derivation_simd_sha1':
pkcs12_plug.c:448:9: warning: 'pkcs12_fill_salt_buffer_simd' accessing 26880 bytes in a region of size 64 [-Wstringop-overflow=]
  448 |         pkcs12_fill_salt_buffer_simd(salt_block, v, salt, saltlen, SSE_GROUP_SZ_SHA1);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c:448:9: note: referencing argument 1 of type 'unsigned char *[3360]'
pkcs12_plug.c:375:13: note: in a call to function 'pkcs12_fill_salt_buffer_simd'
  375 | static void pkcs12_fill_salt_buffer_simd(unsigned char *data[SIMD_MAX_GROUP_PFX], size_t data_len,
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c:449:9: warning: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 64 [-Wstringop-overflow=]
  449 |         pkcs12_fill_buffer_simd(pwd_block,  v, pwd,  pwdlen, SSE_GROUP_SZ_SHA1);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c:449:9: note: referencing argument 1 of type 'unsigned char *[3360]'
pkcs12_plug.c:449:9: warning: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 64 [-Wstringop-overflow=]
pkcs12_plug.c:449:9: note: referencing argument 3 of type 'const unsigned char *[3360]'
pkcs12_plug.c:449:9: warning: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 64 [-Wstringop-overflow=]
pkcs12_plug.c:449:9: note: referencing argument 4 of type 'size_t[3360]' {aka 'long unsigned int[3360]'}
pkcs12_plug.c:396:13: note: in a call to function 'pkcs12_fill_buffer_simd'
  396 | static void pkcs12_fill_buffer_simd(unsigned char *data[SIMD_MAX_GROUP_PFX], size_t data_len,
      |             ^~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c:497:17: warning: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 64 [-Wstringop-overflow=]
  497 |                 pkcs12_fill_buffer_simd( hash_block, v, (const unsigned char**)hash_output, hlens, SSE_GROUP_SZ_SHA1);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c:497:17: note: referencing argument 1 of type 'unsigned char *[3360]'
pkcs12_plug.c:497:17: warning: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 64 [-Wstringop-overflow=]
pkcs12_plug.c:497:17: note: referencing argument 3 of type 'const unsigned char *[3360]'
pkcs12_plug.c:497:17: warning: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 64 [-Wstringop-overflow=]
pkcs12_plug.c:497:17: note: referencing argument 4 of type 'size_t[3360]' {aka 'long unsigned int[3360]'}
pkcs12_plug.c:396:13: note: in a call to function 'pkcs12_fill_buffer_simd'
  396 | static void pkcs12_fill_buffer_simd(unsigned char *data[SIMD_MAX_GROUP_PFX], size_t data_len,
      |             ^~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c: In function 'mbedtls_pkcs12_derivation_simd_sha256':
pkcs12_plug.c:556:9: warning: 'pkcs12_fill_salt_buffer_simd' accessing 26880 bytes in a region of size 64 [-Wstringop-overflow=]
  556 |         pkcs12_fill_salt_buffer_simd(salt_block, v, salt, saltlen, SSE_GROUP_SZ_SHA256);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c:556:9: note: referencing argument 1 of type 'unsigned char *[3360]'
pkcs12_plug.c:375:13: note: in a call to function 'pkcs12_fill_salt_buffer_simd'
  375 | static void pkcs12_fill_salt_buffer_simd(unsigned char *data[SIMD_MAX_GROUP_PFX], size_t data_len,
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c:557:9: warning: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 64 [-Wstringop-overflow=]
  557 |         pkcs12_fill_buffer_simd(pwd_block,  v, pwd,  pwdlen, SSE_GROUP_SZ_SHA256);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c:557:9: note: referencing argument 1 of type 'unsigned char *[3360]'
pkcs12_plug.c:557:9: warning: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 64 [-Wstringop-overflow=]
pkcs12_plug.c:557:9: note: referencing argument 3 of type 'const unsigned char *[3360]'
pkcs12_plug.c:557:9: warning: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 64 [-Wstringop-overflow=]
pkcs12_plug.c:557:9: note: referencing argument 4 of type 'size_t[3360]' {aka 'long unsigned int[3360]'}
pkcs12_plug.c:396:13: note: in a call to function 'pkcs12_fill_buffer_simd'
  396 | static void pkcs12_fill_buffer_simd(unsigned char *data[SIMD_MAX_GROUP_PFX], size_t data_len,
      |             ^~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c:605:17: warning: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 64 [-Wstringop-overflow=]
  605 |                 pkcs12_fill_buffer_simd( hash_block, v, (const unsigned char**)hash_output, hlens, SSE_GROUP_SZ_SHA256);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c:605:17: note: referencing argument 1 of type 'unsigned char *[3360]'
pkcs12_plug.c:605:17: warning: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 64 [-Wstringop-overflow=]
pkcs12_plug.c:605:17: note: referencing argument 3 of type 'const unsigned char *[3360]'
pkcs12_plug.c:605:17: warning: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 64 [-Wstringop-overflow=]
pkcs12_plug.c:605:17: note: referencing argument 4 of type 'size_t[3360]' {aka 'long unsigned int[3360]'}
pkcs12_plug.c:396:13: note: in a call to function 'pkcs12_fill_buffer_simd'
  396 | static void pkcs12_fill_buffer_simd(unsigned char *data[SIMD_MAX_GROUP_PFX], size_t data_len,
      |             ^~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c: In function 'mbedtls_pkcs12_derivation_simd_sha512':
pkcs12_plug.c:705:9: warning: 'pkcs12_fill_salt_buffer_simd' accessing 26880 bytes in a region of size 32 [-Wstringop-overflow=]
  705 |         pkcs12_fill_salt_buffer_simd(salt_block, v, salt, saltlen, SSE_GROUP_SZ_SHA512);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c:705:9: note: referencing argument 1 of type 'unsigned char *[3360]'
pkcs12_plug.c:375:13: note: in a call to function 'pkcs12_fill_salt_buffer_simd'
  375 | static void pkcs12_fill_salt_buffer_simd(unsigned char *data[SIMD_MAX_GROUP_PFX], size_t data_len,
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c:706:9: warning: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 32 [-Wstringop-overflow=]
  706 |         pkcs12_fill_buffer_simd(pwd_block,  v, pwd,  pwdlen, SSE_GROUP_SZ_SHA512);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c:706:9: note: referencing argument 1 of type 'unsigned char *[3360]'
pkcs12_plug.c:706:9: warning: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 32 [-Wstringop-overflow=]
pkcs12_plug.c:706:9: note: referencing argument 3 of type 'const unsigned char *[3360]'
pkcs12_plug.c:706:9: warning: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 32 [-Wstringop-overflow=]
pkcs12_plug.c:706:9: note: referencing argument 4 of type 'size_t[3360]' {aka 'long unsigned int[3360]'}
pkcs12_plug.c:396:13: note: in a call to function 'pkcs12_fill_buffer_simd'
  396 | static void pkcs12_fill_buffer_simd(unsigned char *data[SIMD_MAX_GROUP_PFX], size_t data_len,
      |             ^~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c:753:17: warning: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 32 [-Wstringop-overflow=]
  753 |                 pkcs12_fill_buffer_simd( hash_block, v, (const unsigned char**)hash_output, hlens, SSE_GROUP_SZ_SHA512 );
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c:753:17: note: referencing argument 1 of type 'unsigned char *[3360]'
pkcs12_plug.c:753:17: warning: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 32 [-Wstringop-overflow=]
pkcs12_plug.c:753:17: note: referencing argument 3 of type 'const unsigned char *[3360]'
pkcs12_plug.c:753:17: warning: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 32 [-Wstringop-overflow=]
pkcs12_plug.c:753:17: note: referencing argument 4 of type 'size_t[3360]' {aka 'long unsigned int[3360]'}
pkcs12_plug.c:396:13: note: in a call to function 'pkcs12_fill_buffer_simd'
  396 | static void pkcs12_fill_buffer_simd(unsigned char *data[SIMD_MAX_GROUP_PFX], size_t data_len,
      |             ^~~~~~~~~~~~~~~~~~~~~~~
/usr/bin/ar: creating aes.a
/usr/bin/ar: creating poly1305-donna.a
/usr/bin/ar: creating ed25519-donna.a
/usr/bin/ar: creating secp256k1.a

Make process completed.

@solardiz
Copy link
Member

I try with clang and that build fine

$ cd src/
$ CC=/usr/bin/clang
$ ./configure --prefix /opt/john/1.9-c798c3f
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking whether to compile using MPI... no
checking for gcc... gcc

I think you actually ended up building with gcc. You didn't even export CC.

We already have an issue opened for the gcc warnings you observed, this is #5154.

I'll close this issue now since there isn't anything new in here that we need to track.

@solardiz
Copy link
Member

@bioinfornatics Incidentally, you might want to look into #5154 - what causes it (probably easy) and how to fix it best (probably tricky) - and send us a PR fixing it. We'd appreciate that. Thank you!

@bioinfornatics
Copy link
Author

Oh yes was gcc.
I confirm that the build fail using release 1.9 with both gcc and clang.
The build is succesful from the main branch.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dupe This issue already existed. When using this, always link to the original issue(s). portability
Projects
None yet
Development

No branches or pull requests

3 participants