You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@milagro.apache.org by GitBox <gi...@apache.org> on 2022/12/20 07:50:15 UTC

[GitHub] [incubator-milagro-crypto-c] matthiasgoergens opened a new issue, #97: Use of uninitialized values

matthiasgoergens opened a new issue, #97:
URL: https://github.com/apache/incubator-milagro-crypto-c/issues/97

   When building with memory sanitizer, I am getting a lot of problems like the following:
   
   ```
   ==68141==WARNING: MemorySanitizer: use-of-uninitialized-value
       #0 0x7feab3c79dca in FF_2048_modmul ff_2048.c
       #1 0x7feab3c7a818 in FF_2048_ct_2w_pow (/home/matthias/incubator-milagro-crypto-c/target/default/lib/libamcl_rsa_2048.so.2+0x77818)
       #2 0x7feab3c7e0e0 in FF_2048_ct_pow_2 (/home/matthias/incubator-milagro-crypto-c/target/default/lib/libamcl_rsa_2048.so.2+0x7b0e0)
       #3 0x555bd4507b73 in main (/home/matthias/incubator-milagro-crypto-c/target/default/bin/test_ff_consistency_2048+0xb6b73)
       #4 0x7feab390628f in __libc_start_call_main /usr/src/debug/glibc/glibc/csu/../sysdeps/nptl/libc_start_call_main.h:58:16
       #5 0x7feab3906349 in __libc_start_main@GLIBC_2.2.5 /usr/src/debug/glibc/glibc/csu/../csu/libc-start.c:381:3
       #6 0x555bd4474404 in _start /build/glibc/src/glibc/csu/../sysdeps/x86_64/start.S:115
   
     Uninitialized value was stored to memory at
       #0 0x7feab3c0ea76 in BIG_1024_58_cmove (/home/matthias/incubator-milagro-crypto-c/target/default/lib/libamcl_rsa_2048.so.2+0xba76)
   
     Uninitialized value was stored to memory at
       #0 0x7feab3c0ea76 in BIG_1024_58_cmove (/home/matthias/incubator-milagro-crypto-c/target/default/lib/libamcl_rsa_2048.so.2+0xba76)
   
     Uninitialized value was stored to memory at
       #0 0x7feab3c0ea76 in BIG_1024_58_cmove (/home/matthias/incubator-milagro-crypto-c/target/default/lib/libamcl_rsa_2048.so.2+0xba76)
   
     Uninitialized value was stored to memory at
       #0 0x7feab3c0ea76 in BIG_1024_58_cmove (/home/matthias/incubator-milagro-crypto-c/target/default/lib/libamcl_rsa_2048.so.2+0xba76)
   
     Uninitialized value was stored to memory at
       #0 0x7feab3c0ea76 in BIG_1024_58_cmove (/home/matthias/incubator-milagro-crypto-c/target/default/lib/libamcl_rsa_2048.so.2+0xba76)
   
     Uninitialized value was stored to memory at
       #0 0x7feab3c0ea76 in BIG_1024_58_cmove (/home/matthias/incubator-milagro-crypto-c/target/default/lib/libamcl_rsa_2048.so.2+0xba76)
   
     Uninitialized value was created by an allocation of 'vla' in the stack frame of function 'FF_2048_ct_2w_pow'
       #0 0x7feab3c7a170 in FF_2048_ct_2w_pow (/home/matthias/incubator-milagro-crypto-c/target/default/lib/libamcl_rsa_2048.so.2+0x77170)
   
   SUMMARY: MemorySanitizer: use-of-uninitialized-value ff_2048.c in FF_2048_modmul
   Exiting
   ```
   
   As far as I can tell, this specific example is caused by `FF_WWW_ct_2w_pow` not always initialising `ws`.  But there are more examples in the code.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@milagro.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@milagro.apache.org
For additional commands, e-mail: issues-help@milagro.apache.org