[GH-ISSUE #860] add --with-asan to configure #465

Closed
opened 2026-10-14 03:09:15 +07:00 by bsakaguchi · 50 comments
Owner

Originally created by @jfoug on GitHub (Nov 22, 2014).
Original GitHub issue: https://github.com/openwall/john/issues/860

Asked by @kholia in another thread. Just here so no one forgets.

@kholia do you know of ANY package, where this is in the configure already?

Originally created by @jfoug on GitHub (Nov 22, 2014). Original GitHub issue: https://github.com/openwall/john/issues/860 Asked by @kholia in another thread. Just here so no one forgets. @kholia do you know of ANY package, where this is in the configure already?
Author
Owner

@kholia commented on GitHub (Dec 17, 2014):

@jfoug @magnumripper I tried to get this working in https://github.com/kholia/JohnTheRipper/tree/ASan but no luck, so far.

<!-- gh-comment-id:67302812 --> @kholia commented on GitHub (Dec 17, 2014): @jfoug @magnumripper I tried to get this working in https://github.com/kholia/JohnTheRipper/tree/ASan but no luck, so far.
Author
Owner

@jfoug commented on GitHub (Dec 17, 2014):

I posted line comments on your commit. What you have is close. However, where you tried to tie it into CFLAGS, those CFLAGS were just a temp transient setting, and were undone shortly after.

I am not sure we want to add this one to J1. I would rather see it get some testing from the people asking for it, prior to releasing it to general pub. ALSO, if there are issues ASAN is showing, then we should get all those fixed so that it works 'clean' before sending it out to the world, AND there appears to be issues.

<!-- gh-comment-id:67320645 --> @jfoug commented on GitHub (Dec 17, 2014): I posted line comments on your commit. What you have is close. However, where you tried to tie it into CFLAGS, those CFLAGS were just a temp transient setting, and were undone shortly after. I am not sure we want to add this one to J1. I would rather see it get some testing from the people asking for it, prior to releasing it to general pub. ALSO, if there are issues ASAN is showing, then we should get all those fixed so that it works 'clean' before sending it out to the world, AND there appears to be issues.
Author
Owner

@kholia commented on GitHub (Dec 17, 2014):

I would love to see this in J1. I am already trying to fix the issues as we speak.

<!-- gh-comment-id:67321211 --> @kholia commented on GitHub (Dec 17, 2014): I would love to see this in J1. I am already trying to fix the issues as we speak.
Author
Owner

@jfoug commented on GitHub (Dec 17, 2014):

If we can get a fully 'clean' run prior to J1, then I see no problem adding this.

However, we 'should' enhance it some (checking for the libs checking for -fsanitize=address being valid for the compiler, etc). I guess we can leave it like it is, to blindly set it, and know that it is for a 'serious' developer. BUT note, this is a new 'feature', and those can and almost always DO bite you in the ass.

<!-- gh-comment-id:67321584 --> @jfoug commented on GitHub (Dec 17, 2014): If we can get a fully 'clean' run prior to J1, then I see no problem adding this. However, we 'should' enhance it some (checking for the libs checking for -fsanitize=address being valid for the compiler, etc). I guess we can leave it like it is, to blindly set it, and know that it is for a 'serious' developer. BUT note, this is a new 'feature', and those can and almost always DO bite you in the ass.
Author
Owner

@kholia commented on GitHub (Dec 17, 2014):

I wouldn't worry too much about this patch. It's not the default and it is meant to be used by "hardcore" developers only ;)

<!-- gh-comment-id:67326088 --> @kholia commented on GitHub (Dec 17, 2014): I wouldn't worry too much about this patch. It's not the default and it is meant to be used by "hardcore" developers only ;)
Author
Owner

@jfoug commented on GitHub (Dec 17, 2014):

Yes, BUT it shows up on ./configure --help TRUST ME, the more stupid the user, the more likely you will hear from them because they enable this and can not figure out why JtR will not run for them.

<!-- gh-comment-id:67327349 --> @jfoug commented on GitHub (Dec 17, 2014): Yes, BUT it shows up on ./configure --help TRUST ME, the more stupid the user, the more likely you will hear from them because they enable this and can not figure out why JtR will not run for them.
Author
Owner

@frank-dittrich commented on GitHub (Dec 17, 2014):

At least the description has to be enhanced so that fewer users will try it.
Otherwise, we can leave that in now, may be even make asan enabled if the compiler supports it, and decide before releasing jumbo1 whether we just change the default to disabled or remove the feature for the release.

<!-- gh-comment-id:67327938 --> @frank-dittrich commented on GitHub (Dec 17, 2014): At least the description has to be enhanced so that fewer users will try it. Otherwise, we can leave that in now, may be even make asan enabled if the compiler supports it, and decide before releasing jumbo1 whether we just change the default to disabled or remove the feature for the release.
Author
Owner

@frank-dittrich commented on GitHub (Dec 17, 2014):

With asan enabled, I get

$ make -s
BF_std.c: In function ‘BF_std_crypt._omp_fn.0’:
BF_std.c:718:9: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without
 #pragma omp parallel for default(none) private(t) shared(n, BF_init_state, BF_init_key, BF_exp_key, salt, BF_magic_w, BF_out)
         ^
/usr/bin/ar: creating aes.a

Make process completed.
<!-- gh-comment-id:67328038 --> @frank-dittrich commented on GitHub (Dec 17, 2014): With asan enabled, I get ``` $ make -s BF_std.c: In function ‘BF_std_crypt._omp_fn.0’: BF_std.c:718:9: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without #pragma omp parallel for default(none) private(t) shared(n, BF_init_state, BF_init_key, BF_exp_key, salt, BF_magic_w, BF_out) ^ /usr/bin/ar: creating aes.a Make process completed. ```
Author
Owner

@frank-dittrich commented on GitHub (Dec 17, 2014):

And running --test=0:

Will run 8 OpenMP threads
Testing: descrypt, traditional crypt(3) [DES 128/128 AVX-16]... (8xOMP) PASS
Testing: bsdicrypt, BSDI crypt(3) ("_J9..", 725 iterations) [DES 128/128 AVX-16]... (8xOMP) =================================================================
==8299== ERROR: AddressSanitizer: global-buffer-overflow on address 0x000000822d61 at pc 0x40ad56 bp 0x7fff011d92d0 sp 0x7fff011d92c0
READ of size 1 at 0x000000822d61 thread T0
    #0 0x40ad55 (/home/fd/git/JtR/run/john+0x40ad55)
    #1 0x429c19 (/home/fd/git/JtR/run/john+0x429c19)
    #2 0x73d5c1 (/home/fd/git/JtR/run/john+0x73d5c1)
    #3 0x73dd8e (/home/fd/git/JtR/run/john+0x73dd8e)
    #4 0x73f0d6 (/home/fd/git/JtR/run/john+0x73f0d6)
    #5 0x7620f7 (/home/fd/git/JtR/run/john+0x7620f7)
    #6 0x763561 (/home/fd/git/JtR/run/john+0x763561)
    #7 0x3bc2621d64 (/usr/lib64/libc-2.18.so+0x21d64)
    #8 0x4061b0 (/home/fd/git/JtR/run/john+0x4061b0)
0x000000822d61 is located 0 bytes to the right of global variable '_.LC28 (BSDI_fmt.c)' (0x822d60) of size 1
  '_.LC28 (BSDI_fmt.c)' is ascii string ''
Shadow bytes around the buggy address:
  0x0000800fc550: f9 f9 f9 f9 00 00 05 f9 f9 f9 f9 f9 00 00 02 f9
  0x0000800fc560: f9 f9 f9 f9 00 00 05 f9 f9 f9 f9 f9 00 02 f9 f9
  0x0000800fc570: f9 f9 f9 f9 00 00 05 f9 f9 f9 f9 f9 00 02 f9 f9
  0x0000800fc580: f9 f9 f9 f9 00 00 05 f9 f9 f9 f9 f9 00 07 f9 f9
  0x0000800fc590: f9 f9 f9 f9 00 00 05 f9 f9 f9 f9 f9 00 01 f9 f9
=>0x0000800fc5a0: f9 f9 f9 f9 00 00 05 f9 f9 f9 f9 f9[01]f9 f9 f9
  0x0000800fc5b0: f9 f9 f9 f9 00 00 00 00 00 00 00 00 00 00 00 00
  0x0000800fc5c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0000800fc5d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0000800fc5e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0000800fc5f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:     fa
  Heap righ redzone:     fb
  Freed Heap region:     fd
  Stack left redzone:    f1
  Stack mid redzone:     f2
  Stack right redzone:   f3
  Stack partial redzone: f4
  Stack after return:    f5
  Stack use after scope: f8
  Global redzone:        f9
  Global init order:     f6
  Poisoned by user:      f7
  ASan internal:         fe
==8299== ABORTING

<!-- gh-comment-id:67328285 --> @frank-dittrich commented on GitHub (Dec 17, 2014): And running --test=0: ```$ ./john --test=0 Will run 8 OpenMP threads Testing: descrypt, traditional crypt(3) [DES 128/128 AVX-16]... (8xOMP) PASS Testing: bsdicrypt, BSDI crypt(3) ("_J9..", 725 iterations) [DES 128/128 AVX-16]... (8xOMP) ================================================================= ==8299== ERROR: AddressSanitizer: global-buffer-overflow on address 0x000000822d61 at pc 0x40ad56 bp 0x7fff011d92d0 sp 0x7fff011d92c0 READ of size 1 at 0x000000822d61 thread T0 #0 0x40ad55 (/home/fd/git/JtR/run/john+0x40ad55) #1 0x429c19 (/home/fd/git/JtR/run/john+0x429c19) #2 0x73d5c1 (/home/fd/git/JtR/run/john+0x73d5c1) #3 0x73dd8e (/home/fd/git/JtR/run/john+0x73dd8e) #4 0x73f0d6 (/home/fd/git/JtR/run/john+0x73f0d6) #5 0x7620f7 (/home/fd/git/JtR/run/john+0x7620f7) #6 0x763561 (/home/fd/git/JtR/run/john+0x763561) #7 0x3bc2621d64 (/usr/lib64/libc-2.18.so+0x21d64) #8 0x4061b0 (/home/fd/git/JtR/run/john+0x4061b0) 0x000000822d61 is located 0 bytes to the right of global variable '_.LC28 (BSDI_fmt.c)' (0x822d60) of size 1 '_.LC28 (BSDI_fmt.c)' is ascii string '' Shadow bytes around the buggy address: 0x0000800fc550: f9 f9 f9 f9 00 00 05 f9 f9 f9 f9 f9 00 00 02 f9 0x0000800fc560: f9 f9 f9 f9 00 00 05 f9 f9 f9 f9 f9 00 02 f9 f9 0x0000800fc570: f9 f9 f9 f9 00 00 05 f9 f9 f9 f9 f9 00 02 f9 f9 0x0000800fc580: f9 f9 f9 f9 00 00 05 f9 f9 f9 f9 f9 00 07 f9 f9 0x0000800fc590: f9 f9 f9 f9 00 00 05 f9 f9 f9 f9 f9 00 01 f9 f9 =>0x0000800fc5a0: f9 f9 f9 f9 00 00 05 f9 f9 f9 f9 f9[01]f9 f9 f9 0x0000800fc5b0: f9 f9 f9 f9 00 00 00 00 00 00 00 00 00 00 00 00 0x0000800fc5c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0000800fc5d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0000800fc5e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0000800fc5f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap righ redzone: fb Freed Heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 ASan internal: fe ==8299== ABORTING ``` ```
Author
Owner

@jfoug commented on GitHub (Dec 17, 2014):

I get those bugs also Frank.

It is frequently 1 byte before the 'tests' element of the format. I think there is some 'core' issue (probably with the cost code, or something with the tests), that is writing blindly to memory.

Some formats seem fine. Others fail. You can do -test=0 -form=format to test each one, and start to see the 'pattern'. THIS was why I was saying getting asan working at config time, is NOT a great idea, unless we can get it working cleanly.

<!-- gh-comment-id:67330663 --> @jfoug commented on GitHub (Dec 17, 2014): I get those bugs also Frank. It is frequently 1 byte before the 'tests' element of the format. I think there is some 'core' issue (probably with the cost code, or something with the tests), that is writing blindly to memory. Some formats seem fine. Others fail. You can do -test=0 -form=format to test each one, and start to see the 'pattern'. THIS was why I was saying getting asan working at config time, is NOT a great idea, unless we can get it working cleanly.
Author
Owner

@kholia commented on GitHub (Dec 17, 2014):

We will get it working cleanly. I have already started committing some patches to exclude "known-good" methods.

<!-- gh-comment-id:67330897 --> @kholia commented on GitHub (Dec 17, 2014): We _will_ get it working cleanly. I have already started committing some patches to exclude "known-good" methods.
Author
Owner

@jfoug commented on GitHub (Dec 17, 2014):

Here is an exmple showing 1 to the left of the first test string:

jimfougeron@jimfougeron-vb-14-04:/JtR/bleed/src$ ../run/john -test=0 -form=bfegg
Will run 4 OpenMP threads
Testing: bfegg, Eggdrop [Blowfish 32/64]... (4xOMP) =================================================================
==13240== ERROR: AddressSanitizer: global-buffer-overflow on address 0x0000008552bf at pc 0x748bfd bp 0x7fff0afb8c00 sp 0x7fff0afb8bf8
READ of size 1 at 0x0000008552bf thread T0
    #0 0x748bfc (/JtR/bleed/run/john+0x748bfc)
    #1 0x731407 (/JtR/bleed/run/john+0x731407)
    #2 0x732e6f (/JtR/bleed/run/john+0x732e6f)
    #3 0x75644d (/JtR/bleed/run/john+0x75644d)
    #4 0x7578ad (/JtR/bleed/run/john+0x7578ad)
    #5 0x7fdb68191ec4 (/lib/x86_64-linux-gnu/libc-2.19.so+0x21ec4)
    #6 0x40666d (/JtR/bleed/run/john+0x40666d)
0x0000008552bf is located 1 bytes to the left of global variable '*.LC6 (BFEgg_fmt_plug.c)' (0x8552c0) of size 14
  '*.LC6 (BFEgg_fmt_plug.c)' is ascii string '+9F93o1OxwgK1'
0x0000008552bf is located 62 bytes to the right of global variable '_itoa64 (BFEgg_fmt_plug.c)' (0x855240) of size 65
  '_itoa64 (BFEgg_fmt_plug.c)' is ascii string './0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
Shadow bytes around the buggy address:
  0x000080102a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x000080102a10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x000080102a20: 00 00 00 00 00 00 00 00 06 f9 f9 f9 f9 f9 f9 f9
  0x000080102a30: 00 f9 f9 f9 f9 f9 f9 f9 00 07 f9 f9 f9 f9 f9 f9
  0x000080102a40: 01 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 00 00 00 00
=>0x000080102a50: 01 f9 f9 f9 f9 f9 f9[f9]00 06 f9 f9 f9 f9 f9 f9
  0x000080102a60: 07 f9 f9 f9 f9 f9 f9 f9 00 06 f9 f9 f9 f9 f9 f9
  0x000080102a70: 07 f9 f9 f9 f9 f9 f9 f9 00 06 f9 f9 f9 f9 f9 f9
  0x000080102a80: 00 f9 f9 f9 f9 f9 f9 f9 00 06 f9 f9 f9 f9 f9 f9
  0x000080102a90: 00 02 f9 f9 f9 f9 f9 f9 00 06 f9 f9 f9 f9 f9 f9
  0x000080102aa0: 07 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:     fa
  Heap righ redzone:     fb
  Freed Heap region:     fd
  Stack left redzone:    f1
  Stack mid redzone:     f2
  Stack right redzone:   f3
  Stack partial redzone: f4
  Stack after return:    f5
  Stack use after scope: f8
  Global redzone:        f9
  Global init order:     f6
  Poisoned by user:      f7
  ASan internal:         fe
==13240== ABORTING

I know (hope) you are working on this @kholia The good thing about this, is that it gets some of these fixed NOW, things that actually may be BAD for us.

<!-- gh-comment-id:67331263 --> @jfoug commented on GitHub (Dec 17, 2014): Here is an exmple showing 1 to the left of the first test string: ``` jimfougeron@jimfougeron-vb-14-04:/JtR/bleed/src$ ../run/john -test=0 -form=bfegg Will run 4 OpenMP threads Testing: bfegg, Eggdrop [Blowfish 32/64]... (4xOMP) ================================================================= ==13240== ERROR: AddressSanitizer: global-buffer-overflow on address 0x0000008552bf at pc 0x748bfd bp 0x7fff0afb8c00 sp 0x7fff0afb8bf8 READ of size 1 at 0x0000008552bf thread T0 #0 0x748bfc (/JtR/bleed/run/john+0x748bfc) #1 0x731407 (/JtR/bleed/run/john+0x731407) #2 0x732e6f (/JtR/bleed/run/john+0x732e6f) #3 0x75644d (/JtR/bleed/run/john+0x75644d) #4 0x7578ad (/JtR/bleed/run/john+0x7578ad) #5 0x7fdb68191ec4 (/lib/x86_64-linux-gnu/libc-2.19.so+0x21ec4) #6 0x40666d (/JtR/bleed/run/john+0x40666d) 0x0000008552bf is located 1 bytes to the left of global variable '*.LC6 (BFEgg_fmt_plug.c)' (0x8552c0) of size 14 '*.LC6 (BFEgg_fmt_plug.c)' is ascii string '+9F93o1OxwgK1' 0x0000008552bf is located 62 bytes to the right of global variable '_itoa64 (BFEgg_fmt_plug.c)' (0x855240) of size 65 '_itoa64 (BFEgg_fmt_plug.c)' is ascii string './0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' Shadow bytes around the buggy address: 0x000080102a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x000080102a10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x000080102a20: 00 00 00 00 00 00 00 00 06 f9 f9 f9 f9 f9 f9 f9 0x000080102a30: 00 f9 f9 f9 f9 f9 f9 f9 00 07 f9 f9 f9 f9 f9 f9 0x000080102a40: 01 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 00 00 00 00 =>0x000080102a50: 01 f9 f9 f9 f9 f9 f9[f9]00 06 f9 f9 f9 f9 f9 f9 0x000080102a60: 07 f9 f9 f9 f9 f9 f9 f9 00 06 f9 f9 f9 f9 f9 f9 0x000080102a70: 07 f9 f9 f9 f9 f9 f9 f9 00 06 f9 f9 f9 f9 f9 f9 0x000080102a80: 00 f9 f9 f9 f9 f9 f9 f9 00 06 f9 f9 f9 f9 f9 f9 0x000080102a90: 00 02 f9 f9 f9 f9 f9 f9 00 06 f9 f9 f9 f9 f9 f9 0x000080102aa0: 07 f9 f9 f9 f9 f9 f9 f9 00 00 00 00 00 00 00 00 Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap righ redzone: fb Freed Heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 ASan internal: fe ==13240== ABORTING ``` I know (hope) you are working on this @kholia The good thing about this, is that it gets some of these fixed NOW, things that actually may be BAD for us.
Author
Owner

@kholia commented on GitHub (Dec 17, 2014):

Also, try ./unused/analisa_test_runner.sh. It's pretty awesome ;)

<!-- gh-comment-id:67331976 --> @kholia commented on GitHub (Dec 17, 2014): Also, try `./unused/analisa_test_runner.sh`. It's pretty awesome ;)
Author
Owner

@frank-dittrich commented on GitHub (Dec 17, 2014):

I think you didn't commit ./unused/analisa_test_runner.sh

<!-- gh-comment-id:67340943 --> @frank-dittrich commented on GitHub (Dec 17, 2014): I think you didn't commit ./unused/analisa_test_runner.sh
Author
Owner

@jfoug commented on GitHub (Dec 17, 2014):

I have it.

<!-- gh-comment-id:67341678 --> @jfoug commented on GitHub (Dec 17, 2014): I have it.
Author
Owner

@frank-dittrich commented on GitHub (Dec 17, 2014):

OK, I just didn't fetch the latest commits.

BTW: If we just silence all asan warnings (and add // XXX comments), why do we need --enable-asan?

(bleeding-jumbo)src $ git grep -C 1 -n ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS
DES_std.c-619-
DES_std.c:620:ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS void DES_std_set_key(char *key)
DES_std.c-621-{
--
dynamic_fmt.c-6832-// XXX fix me at some point!
dynamic_fmt.c:6833:ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS
dynamic_fmt.c-6834-int dynamic_SETUP(DYNAMIC_Setup *Setup, struct fmt_main *pFmt)
--
misc.h-110-    defined(__SANITIZE_ADDRESS__)  /* GCC 4.8.x */
misc.h:111:  #define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS \
misc.h-112-        __attribute__((no_address_safety_analysis)) \
--
misc.h-114-#else
misc.h:115:  #define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS
misc.h-116-#endif
--
rakp_fmt_plug.c-177-// this set_key() usage pattern is known to be OK
rakp_fmt_plug.c:178:ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS static void set_key(char *key, int index)
rakp_fmt_plug.c-179-{

There are even some rather old ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS changes:

d0fed913 (Dhiru Kholia         2013-09-29 13:58:57 +0530 6832) // XXX fix me at some point!
d0fed913 (Dhiru Kholia         2013-09-29 13:58:57 +0530 6833) ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS
c32083f4 (JimF                 2012-07-13 21:52:18 -0500 6834) int dynamic_SETUP(DYNAMIC_Setup *Setup, struct fmt_main *pFmt)
<!-- gh-comment-id:67355824 --> @frank-dittrich commented on GitHub (Dec 17, 2014): OK, I just didn't fetch the latest commits. BTW: If we just silence all asan warnings (and add // XXX comments), why do we need --enable-asan? ``` (bleeding-jumbo)src $ git grep -C 1 -n ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS DES_std.c-619- DES_std.c:620:ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS void DES_std_set_key(char *key) DES_std.c-621-{ -- dynamic_fmt.c-6832-// XXX fix me at some point! dynamic_fmt.c:6833:ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS dynamic_fmt.c-6834-int dynamic_SETUP(DYNAMIC_Setup *Setup, struct fmt_main *pFmt) -- misc.h-110- defined(__SANITIZE_ADDRESS__) /* GCC 4.8.x */ misc.h:111: #define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS \ misc.h-112- __attribute__((no_address_safety_analysis)) \ -- misc.h-114-#else misc.h:115: #define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS misc.h-116-#endif -- rakp_fmt_plug.c-177-// this set_key() usage pattern is known to be OK rakp_fmt_plug.c:178:ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS static void set_key(char *key, int index) rakp_fmt_plug.c-179-{ ``` There are even some rather old ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS changes: ``` d0fed913 (Dhiru Kholia 2013-09-29 13:58:57 +0530 6832) // XXX fix me at some point! d0fed913 (Dhiru Kholia 2013-09-29 13:58:57 +0530 6833) ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS c32083f4 (JimF 2012-07-13 21:52:18 -0500 6834) int dynamic_SETUP(DYNAMIC_Setup *Setup, struct fmt_main *pFmt) ```
Author
Owner

@frank-dittrich commented on GitHub (Dec 17, 2014):

how do I convert that stack into something readable:

READ of size 1 at 0x000000f4481f thread T0
    #0 0xa094e6 (/home/fd/git/JtR/run/john+0xa094e6)
    #1 0xa0a846 (/home/fd/git/JtR/run/john+0xa0a846)
    #2 0x9ebb2f (/home/fd/git/JtR/run/john+0x9ebb2f)
    #3 0x9edb08 (/home/fd/git/JtR/run/john+0x9edb08)
    #4 0xa16555 (/home/fd/git/JtR/run/john+0xa16555)
    #5 0xa179bf (/home/fd/git/JtR/run/john+0xa179bf)
    #6 0x3bc2621d64 (/usr/lib64/libc-2.18.so+0x21d64)
    #7 0x405df0 (/home/fd/git/JtR/run/john+0x405df0)

Not even with a debug build it is showing source code lines...

<!-- gh-comment-id:67357649 --> @frank-dittrich commented on GitHub (Dec 17, 2014): how do I convert that stack into something readable: ``` READ of size 1 at 0x000000f4481f thread T0 #0 0xa094e6 (/home/fd/git/JtR/run/john+0xa094e6) #1 0xa0a846 (/home/fd/git/JtR/run/john+0xa0a846) #2 0x9ebb2f (/home/fd/git/JtR/run/john+0x9ebb2f) #3 0x9edb08 (/home/fd/git/JtR/run/john+0x9edb08) #4 0xa16555 (/home/fd/git/JtR/run/john+0xa16555) #5 0xa179bf (/home/fd/git/JtR/run/john+0xa179bf) #6 0x3bc2621d64 (/usr/lib64/libc-2.18.so+0x21d64) #7 0x405df0 (/home/fd/git/JtR/run/john+0x405df0) ``` Not even with a debug build it is showing source code lines...
Author
Owner
<!-- gh-comment-id:67357724 --> @kholia commented on GitHub (Dec 17, 2014): Use http://llvm.org/klaus/compiler-rt/raw/release_35/lib/asan/scripts/asan_symbolize.py
Author
Owner

@frank-dittrich commented on GitHub (Dec 17, 2014):

Thanks. You should add this information and other useful tips to doc/AddressSanitizer-HOWTO.txt, after a big warning that using --enable-asan really is just for developers.

<!-- gh-comment-id:67358176 --> @frank-dittrich commented on GitHub (Dec 17, 2014): Thanks. You should add this information and other useful tips to `doc/AddressSanitizer-HOWTO.txt`, after a big warning that using --enable-asan really is just for developers.
Author
Owner

@kholia commented on GitHub (Dec 17, 2014):

Let's get the fixes in first and stop worrying about nosey (but simultaneously dumb) users.

<!-- gh-comment-id:67358705 --> @kholia commented on GitHub (Dec 17, 2014): Let's get the fixes in first and stop worrying about nosey (but simultaneously dumb) users.
Author
Owner

@frank-dittrich commented on GitHub (Dec 17, 2014):

OK, pasting that stack into that tool gives:

(bleeding-jumbo)run $ ./asan_symbolize.py
    #0 0xa094e6 (/home/fd/git/JtR/run/john+0xa094e6)
    #1 0xa0a846 (/home/fd/git/JtR/run/john+0xa0a846)
    #2 0x9ebb2f (/home/fd/git/JtR/run/john+0x9ebb2f)
    #3 0x9edb08 (/home/fd/git/JtR/run/john+0x9edb08)
    #4 0xa16555 (/home/fd/git/JtR/run/john+0xa16555)
    #5 0xa179bf (/home/fd/git/JtR/run/john+0xa179bf)
    #6 0x3bc2621d64 (/usr/lib64/libc-2.18.so+0x21d64)
    #7 0x405df0 (/home/fd/git/JtR/run/john+0x405df0)
llvm-symbolizer: for the -functions option: 'short' is invalid value for boolean argument! Try 0 or 1
    #0 0xa094e6 in fmt_self_test_body /home/fd/git/JtR/src/formats.c:405
    #1 0xa0a846 in fmt_self_test /home/fd/git/JtR/src/formats.c:611
    #2 0x9ebb2f in benchmark_format /home/fd/git/JtR/src/bench.c:171
    #3 0x9edb08 in benchmark_all /home/fd/git/JtR/src/bench.c:537 (discriminator 3)
    #4 0xa16555 in john_run /home/fd/git/JtR/src/john.c:1282
    #5 0xa179bf in main /home/fd/git/JtR/src/john.c:1651
    #6 0x3bc2621d64 in ?? ??:0
    #7 0x405df0 in _start ??:?

formats.c:405

if (((unsigned char*)salt)[format->params.salt_size-1] == 0xAF)

This is a real bug.
LM is not a salted format, so accessing salt)[format->params.salt_size-1] definitely is a bug that should be fixed in core as well.

<!-- gh-comment-id:67359747 --> @frank-dittrich commented on GitHub (Dec 17, 2014): OK, pasting that stack into that tool gives: ``` (bleeding-jumbo)run $ ./asan_symbolize.py #0 0xa094e6 (/home/fd/git/JtR/run/john+0xa094e6) #1 0xa0a846 (/home/fd/git/JtR/run/john+0xa0a846) #2 0x9ebb2f (/home/fd/git/JtR/run/john+0x9ebb2f) #3 0x9edb08 (/home/fd/git/JtR/run/john+0x9edb08) #4 0xa16555 (/home/fd/git/JtR/run/john+0xa16555) #5 0xa179bf (/home/fd/git/JtR/run/john+0xa179bf) #6 0x3bc2621d64 (/usr/lib64/libc-2.18.so+0x21d64) #7 0x405df0 (/home/fd/git/JtR/run/john+0x405df0) llvm-symbolizer: for the -functions option: 'short' is invalid value for boolean argument! Try 0 or 1 #0 0xa094e6 in fmt_self_test_body /home/fd/git/JtR/src/formats.c:405 #1 0xa0a846 in fmt_self_test /home/fd/git/JtR/src/formats.c:611 #2 0x9ebb2f in benchmark_format /home/fd/git/JtR/src/bench.c:171 #3 0x9edb08 in benchmark_all /home/fd/git/JtR/src/bench.c:537 (discriminator 3) #4 0xa16555 in john_run /home/fd/git/JtR/src/john.c:1282 #5 0xa179bf in main /home/fd/git/JtR/src/john.c:1651 #6 0x3bc2621d64 in ?? ??:0 #7 0x405df0 in _start ??:? ``` formats.c:405 ``` if (((unsigned char*)salt)[format->params.salt_size-1] == 0xAF) ``` This is a real bug. LM is not a salted format, so accessing salt)[format->params.salt_size-1] definitely is a bug that should be fixed in core as well.
Author
Owner

@kholia commented on GitHub (Dec 17, 2014):

@frank-dittrich good catch 👍

Is this a reasonable patch?

diff --git a/src/formats.c b/src/formats.c
index 2589124..207c69a 100644
--- a/src/formats.c
+++ b/src/formats.c
@@ -402,7 +402,7 @@ static char *fmt_self_test_body(struct fmt_main *format,
                        } else {
                                memset(salt, 0xAF, format->params.salt_size);
                                salt = format->methods.salt(ciphertext);
-                               if (((unsigned char*)salt)[format->params.salt_size-1] == 0xAF)
+                               if (format->methods.salt != fmt_default_salt && ((unsigned char*)salt)[format->params.salt_size-1] == 0xAF)
                                {
                                        memset(salt, 0xC3, format->params.salt_size);
                                        salt = format->methods.salt(ciphertext);

<!-- gh-comment-id:67360904 --> @kholia commented on GitHub (Dec 17, 2014): @frank-dittrich good catch :+1: Is this a reasonable patch? ``` diff --git a/src/formats.c b/src/formats.c index 2589124..207c69a 100644 --- a/src/formats.c +++ b/src/formats.c @@ -402,7 +402,7 @@ static char *fmt_self_test_body(struct fmt_main *format, } else { memset(salt, 0xAF, format->params.salt_size); salt = format->methods.salt(ciphertext); - if (((unsigned char*)salt)[format->params.salt_size-1] == 0xAF) + if (format->methods.salt != fmt_default_salt && ((unsigned char*)salt)[format->params.salt_size-1] == 0xAF) { memset(salt, 0xC3, format->params.salt_size); salt = format->methods.salt(ciphertext); ```
Author
Owner

@frank-dittrich commented on GitHub (Dec 17, 2014):

I already committed a patch, but than realized that Jims commit 4df19364e8 aleady fixed it.
So I have to revert my commit ccad62ea6a.

Next time I'll check whether my fix is still necessary before pushing the change...

<!-- gh-comment-id:67361230 --> @frank-dittrich commented on GitHub (Dec 17, 2014): I already committed a patch, but than realized that Jims commit 4df19364e8ff265e40cbe97a626d67a5d87b23d4 aleady fixed it. So I have to revert my commit ccad62ea6af7336dbaa8a992bfd0c6e07c71eb87. Next time I'll check whether my fix is still necessary before pushing the change...
Author
Owner

@kholia commented on GitHub (Dec 17, 2014):

@frank-dittrich @jfoug Great work! 👍

ASan support is already paying itself off ;)

<!-- gh-comment-id:67362661 --> @kholia commented on GitHub (Dec 17, 2014): @frank-dittrich @jfoug Great work! :+1: ASan support is already paying itself off ;)
Author
Owner

@jfoug commented on GitHub (Dec 17, 2014):

Can we put this python file into unused?

<!-- gh-comment-id:67363841 --> @jfoug commented on GitHub (Dec 17, 2014): Can we put this python file into unused?
Author
Owner

@frank-dittrich commented on GitHub (Dec 17, 2014):

Why would we need to ship it? Just download somewhere into your $PATH?
Otherwise, we'd need to read the license. And we'd get support requests for bugs which we would need to report upstream-

<!-- gh-comment-id:67364272 --> @frank-dittrich commented on GitHub (Dec 17, 2014): Why would we need to ship it? Just download somewhere into your $PATH? Otherwise, we'd need to read the license. And we'd get support requests for bugs which we would need to report upstream-
Author
Owner

@kholia commented on GitHub (Dec 17, 2014):

Also, GCC 4.9.x does this decoding stuff automatically :-)

<!-- gh-comment-id:67366577 --> @kholia commented on GitHub (Dec 17, 2014): Also, GCC 4.9.x does this decoding stuff automatically :-)
Author
Owner

@jfoug commented on GitHub (Dec 17, 2014):

I think I have found a function which is giving false warnings. YES, we do read past the end of the buffer, and it gets caught. This is a common method @magnumripper has been doing. The file is:

hmacMD5_fmt_plug.c line 209. What we are doing is reading the password 1 32 bit value at a time.

<!-- gh-comment-id:67368071 --> @jfoug commented on GitHub (Dec 17, 2014): I think I have found a function which is giving false warnings. YES, we do read past the end of the buffer, and it gets caught. This is a common method @magnumripper has been doing. The file is: hmacMD5_fmt_plug.c line 209. What we are doing is reading the password 1 32 bit value at a time.
Author
Owner

@jfoug commented on GitHub (Dec 17, 2014):

@kholia is the only way to work around problems like I list above, by using the ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS attrib? I did that, and the warning went away. I also only use that attrib IF we are building in MMX_COEF mode.

I did comment that change, listing why it was done.

<!-- gh-comment-id:67369280 --> @jfoug commented on GitHub (Dec 17, 2014): @kholia is the only way to work around problems like I list above, by using the ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS attrib? I did that, and the warning went away. I also only use that attrib IF we are building in MMX_COEF mode. I did comment that change, listing why it was done.
Author
Owner

@kholia commented on GitHub (Dec 17, 2014):

@jfoug yes, ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS can be used to mark such "known-good" functions. It is not ideal but a man's gotta do what a man's gotta do.

<!-- gh-comment-id:67369882 --> @kholia commented on GitHub (Dec 17, 2014): @jfoug yes, `ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS` can be used to mark such "known-good" functions. It is not ideal but a man's gotta do what a man's gotta do.
Author
Owner

@jfoug commented on GitHub (Dec 17, 2014):

It would be better to be able to mark the exact line, vs throwing away the whole function

I know exactly WHY magnum did what he did. It makes loading much faster. You do possibly read past end of buffer (by up to 3 bytes), but nothing is written, it cause no problems, this is only done on Intel systems, etc. Thus, the code is ugly, 'bad-practice', BUT is faster and works. I guess there 'could' be a problem, if the 3 bytes were on a memory page not loaded (such as mmap stuff, I guess). but we would have heard SOMETHING about this before now. This is done in many formats.

<!-- gh-comment-id:67370442 --> @jfoug commented on GitHub (Dec 17, 2014): It would be better to be able to mark the exact line, vs throwing away the whole function I know exactly WHY magnum did what he did. It makes loading much faster. You do possibly read past end of buffer (by up to 3 bytes), but nothing is written, it cause no problems, this is only done on Intel systems, etc. Thus, the code is ugly, 'bad-practice', BUT is faster and works. I guess there 'could' be a problem, if the 3 bytes were on a memory page not loaded (such as mmap stuff, I guess). but we would have heard SOMETHING about this before now. This is done in many formats.
Author
Owner

@jfoug commented on GitHub (Dec 17, 2014):

I am keeping this comment updated: github.com/magnumripper/JohnTheRipper@4df19364e8 as we work through these.

<!-- gh-comment-id:67371351 --> @jfoug commented on GitHub (Dec 17, 2014): I am keeping this comment updated: https://github.com/magnumripper/JohnTheRipper/commit/4df19364e8ff265e40cbe97a626d67a5d87b23d4 as we work through these.
Author
Owner

@frank-dittrich commented on GitHub (Dec 17, 2014):

What if you make a new function out of the offending statement? May be a function that will be inlined anyway? Or some macro which converts the statement into a called function when built with asan support?

<!-- gh-comment-id:67383723 --> @frank-dittrich commented on GitHub (Dec 17, 2014): What if you make a new function out of the offending statement? May be a function that will be inlined anyway? Or some macro which converts the statement into a called function when built with asan support?
Author
Owner

@jfoug commented on GitHub (Dec 17, 2014):

They are all a single deref of a uint32 pointer. That pointer was set to the original password. So what we are doing is accessing the password 4 bytes at a time, until we detect the end of the password. However, we have already READ the last bytes (might be 4 that are valid, might only be 1). That is what is tripping us up. There 'may' be a way to work around this, using #define magic. I will look at it when I get done. I will have a list of exactly which formats are doing this. I think I can do it, BUT it will give us 2 different build states. One will be with a tiny function, if ASAN is enabled, the other will be 'normal' build. I guess it will give us ASAN for everything other that that one instruction (which we KNOW we are handing properly), but still allowing ASAN for the entire rest of the set_key function.

<!-- gh-comment-id:67386164 --> @jfoug commented on GitHub (Dec 17, 2014): They are all a single deref of a uint32 pointer. That pointer was set to the original password. So what we are doing is accessing the password 4 bytes at a time, until we detect the end of the password. However, we have already READ the last bytes (might be 4 that are valid, might only be 1). That is what is tripping us up. There 'may' be a way to work around this, using #define magic. I will look at it when I get done. I will have a list of exactly which formats are doing this. I think I can do it, BUT it will give us 2 different build states. One will be with a tiny function, if ASAN is enabled, the other will be 'normal' build. I guess it will give us ASAN for everything other that that one instruction (which we KNOW we are handing properly), but still allowing ASAN for the entire rest of the set_key function.
Author
Owner

@magnumripper commented on GitHub (Dec 17, 2014):

BUT it will give us 2 different build states. One will be with a tiny function, if ASAN is enabled, the other will be 'normal' build.

Please refrain from doing anything of the sort. Isn't it better to just live with the FPs and learn which to ignore?

BTW, is there no way to "teach" ASAN (eg. using a config file) about our specific FPs so it won't complain again? That would be a whole lot cleaner than polluting our code.

<!-- gh-comment-id:67390502 --> @magnumripper commented on GitHub (Dec 17, 2014): > BUT it will give us 2 different build states. One will be with a tiny function, if ASAN is enabled, the other will be 'normal' build. Please refrain from doing anything of the sort. Isn't it better to just live with the FPs and learn which to ignore? BTW, is there no way to "teach" ASAN (eg. using a config file) about our specific FPs so it won't complain again? That would be a whole lot cleaner than polluting our code.
Author
Owner

@jfoug commented on GitHub (Dec 17, 2014):

Agreed. What we are doing is normally a BAD THING. But we are doing it with (I hope) full knowledge. Yes if there is some way to tell it to ignore this certain pattern, that would be best. Or even some override like what we have for a function to instead turn it off for a statement

But right now, for CPU, I think we are good. I just ran a full -test=0 -form=cpu and it completed.

I can not test GPU. I run my Ubuntu out of a VM, and can not access GPU from there. Cygwin can compile with ASAN, but does not have -lasan so building is SOL.

<!-- gh-comment-id:67391585 --> @jfoug commented on GitHub (Dec 17, 2014): Agreed. What we are doing is normally a BAD THING. But we are doing it with (I hope) full knowledge. Yes if there is some way to tell it to ignore this certain pattern, that would be best. Or even some override like what we have for a function to instead turn it off for a statement But right now, for CPU, I think we are good. I just ran a full -test=0 -form=cpu and it completed. I can not test GPU. I run my Ubuntu out of a VM, and can not access GPU from there. Cygwin can compile with ASAN, but does not have -lasan so building is SOL.
Author
Owner

@frank-dittrich commented on GitHub (Dec 18, 2014):

Either doc/AddressSanitizer-HOWTO.txt or ./config --help still needs to be enhanced to stop regular users from enabling this "feature".

<!-- gh-comment-id:67448307 --> @frank-dittrich commented on GitHub (Dec 18, 2014): Either doc/AddressSanitizer-HOWTO.txt or ./config --help still needs to be enhanced to stop regular users from enabling this "feature".
Author
Owner

@frank-dittrich commented on GitHub (Dec 18, 2014):

BUT it will give us 2 different build states. One will be with a tiny function, if ASAN is enabled, the other will be 'normal' build.

This will currently happen for functions that the compiler would otherwise inline, see the macro definition:

misc.h-#if /* is ASAN enabled? */ \
misc.h-    __has_feature(address_sanitizer) /* Clang */ || \
misc.h-    defined(__SANITIZE_ADDRESS__)  /* GCC 4.8.x */
misc.h:  #define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS \
misc.h-        __attribute__((no_address_safety_analysis)) \
misc.h-        __attribute__((noinline))
misc.h-#else
misc.h:  #define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS
misc.h-#endif
<!-- gh-comment-id:67448430 --> @frank-dittrich commented on GitHub (Dec 18, 2014): > BUT it will give us 2 different build states. One will be with a tiny function, if ASAN is enabled, the other will be 'normal' build. This will currently happen for functions that the compiler would otherwise inline, see the macro definition: ``` misc.h-#if /* is ASAN enabled? */ \ misc.h- __has_feature(address_sanitizer) /* Clang */ || \ misc.h- defined(__SANITIZE_ADDRESS__) /* GCC 4.8.x */ misc.h: #define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS \ misc.h- __attribute__((no_address_safety_analysis)) \ misc.h- __attribute__((noinline)) misc.h-#else misc.h: #define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS misc.h-#endif ```
Author
Owner

@jfoug commented on GitHub (Dec 18, 2014):

Either doc/AddressSanitizer-HOWTO.txt or ./config --help

What should the ./configure --help say? Currently, it says this:

Build with AddressSanitizer

<!-- gh-comment-id:67458424 --> @jfoug commented on GitHub (Dec 18, 2014): > Either doc/AddressSanitizer-HOWTO.txt or ./config --help What should the ./configure --help say? Currently, it says this: `Build with AddressSanitizer`
Author
Owner

@frank-dittrich commented on GitHub (Dec 18, 2014):

On 12/18/2014 10:02 AM, JimF wrote:

Either doc/AddressSanitizer-HOWTO.txt or ./config --help

What should the ./configure --help say? Currently, it says this:

|Build with AddressSanitizer|

Just say that it is ony needed for developers and it will make john run
slower. That should prevent most regular users from enabling it.

<!-- gh-comment-id:67458587 --> @frank-dittrich commented on GitHub (Dec 18, 2014): On 12/18/2014 10:02 AM, JimF wrote: > ``` > Either doc/AddressSanitizer-HOWTO.txt or ./config --help > ``` > > What should the ./configure --help say? Currently, it says this: > > |Build with AddressSanitizer| Just say that it is ony needed for developers and it will make john run slower. That should prevent most regular users from enabling it.
Author
Owner

@jfoug commented on GitHub (Dec 18, 2014):

Same goes for other debugging stuff. Memdbg is also in this class. It does less than addr sanitizer, but does some things better, and has a much smaller runtime footprint. But it does slow down jtr. The extended version slows down jtr A LOT, since it does not free memory (right away), and the memory walk can be time consuming.

I am looking at simply removing the configure help 'listing' this (pretty easy, but leaves a blank line). Is this something that would be acceptable? This addition really SHOULD NOT be used by a non-developer/tester who is in the know for why/how it is.

<!-- gh-comment-id:67459220 --> @jfoug commented on GitHub (Dec 18, 2014): Same goes for other debugging stuff. Memdbg is also in this class. It does less than addr sanitizer, but does some things better, and has a much smaller runtime footprint. But it does slow down jtr. The extended version slows down jtr A LOT, since it does not free memory (right away), and the memory walk can be time consuming. I am looking at simply removing the configure help 'listing' this (pretty easy, but leaves a blank line). Is this something that would be acceptable? This addition really SHOULD NOT be used by a non-developer/tester who is in the know for why/how it is.
Author
Owner

@frank-dittrich commented on GitHub (Dec 18, 2014):

But just removing the info from --help output would also hide the information from users who do know how to use it and who could save us effort by providing better bug reports or fixes.
I think the warning that it is only for developers and make john run slower is good enough. May be add the same warning to other debug options.

<!-- gh-comment-id:67459740 --> @frank-dittrich commented on GitHub (Dec 18, 2014): But just removing the info from --help output would also hide the information from users who do know how to use it and who could save us effort by providing better bug reports or fixes. I think the warning that it is only for developers and make john run slower is good enough. May be add the same warning to other debug options.
Author
Owner

@jfoug commented on GitHub (Dec 18, 2014):

I am going to try to do this in one 'swoop'. I am going to try to add a '*' to each line and then show the * on address sanitizer (on the next line), so that I can make 1 comment about these are for development/QA work, and will cause runtime performance impacts.

<!-- gh-comment-id:67459987 --> @jfoug commented on GitHub (Dec 18, 2014): I am going to try to do this in one 'swoop'. I am going to try to add a '*' to each line and then show the \* on address sanitizer (on the next line), so that I can make 1 comment about these are for development/QA work, and will cause runtime performance impacts.
Author
Owner

@frank-dittrich commented on GitHub (Dec 18, 2014):

I see the summary already has

Debug options (these hurt performance):
Memdbg memory debugging settings ............ disabled
AddressSanitizer ("ASAN") ................... disabled

Should these hurt performance be changed to these hurt performance when enabled or enabling these hurts performance?

<!-- gh-comment-id:67460384 --> @frank-dittrich commented on GitHub (Dec 18, 2014): I see the summary already has ``` Debug options (these hurt performance): Memdbg memory debugging settings ............ disabled AddressSanitizer ("ASAN") ................... disabled ``` Should `these hurt performance` be changed to `these hurt performance when enabled` or `enabling these hurts performance`?
Author
Owner

@jfoug commented on GitHub (Dec 18, 2014):

How about verbiage like this (I just read your message above also, that is another area we can improve)

Installation directories:

By default, `make install' will install all the files in `../run'
You can specify location other than `../run' using `--prefix',
for instance `--prefix=$HOME/bin'.

Development/QA options

Some --enable-xxx options are listed with a `*' preceding their description. These
are developer/QA testing options, and should not be enabled unless you know what
you are doing with them. These will significantly degrade the runtime performance
and or memory usage of JtR. and are not designed for a normal user build

System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]

Optional Features:
  --disable-option-checking  ignore unrecognized --enable/--with options
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  --enable-memdbg         * Enable memdbg memory debugging (safe level)
  --enable-memdbg-ex      * Enable memdbg memory debugging (expanded level)
  --enable-asan           * Build with AddressSanitizer
  --disable-openmp-for-fast-formats
                          Disable OpenMP for fast formats
<!-- gh-comment-id:67461687 --> @jfoug commented on GitHub (Dec 18, 2014): How about verbiage like this (I just read your message above also, that is another area we can improve) ``` Installation directories: By default, `make install' will install all the files in `../run' You can specify location other than `../run' using `--prefix', for instance `--prefix=$HOME/bin'. Development/QA options Some --enable-xxx options are listed with a `*' preceding their description. These are developer/QA testing options, and should not be enabled unless you know what you are doing with them. These will significantly degrade the runtime performance and or memory usage of JtR. and are not designed for a normal user build System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-memdbg * Enable memdbg memory debugging (safe level) --enable-memdbg-ex * Enable memdbg memory debugging (expanded level) --enable-asan * Build with AddressSanitizer --disable-openmp-for-fast-formats Disable OpenMP for fast formats ```
Author
Owner

@jfoug commented on GitHub (Dec 18, 2014):

and I might remove the '*' from --enable-memdbg It really is pretty safe AND useful. If anything, it would generate 'good' information from users that user parts of the code in ways that developers do not (i.e. finding un-exercised bugs)

<!-- gh-comment-id:67461918 --> @jfoug commented on GitHub (Dec 18, 2014): and I might remove the '*' from --enable-memdbg It really is pretty safe AND useful. If anything, it would generate 'good' information from users that user parts of the code in ways that developers do not (i.e. finding un-exercised bugs)
Author
Owner

@jfoug commented on GitHub (Dec 18, 2014):

I would think these hurt performance when enabled would be good wording. That is has better meaning (to me) whether they are either current enabled or disabled.

<!-- gh-comment-id:67462655 --> @jfoug commented on GitHub (Dec 18, 2014): I would think `these hurt performance when enabled` would be good wording. That is has better meaning (to me) whether they are either current enabled or disabled.
Author
Owner

@jfoug commented on GitHub (Dec 18, 2014):

I wonder if Debug options (these hurt performance when enabled) would be better as Developer options (these hurt performance when enabled) ?

<!-- gh-comment-id:67463019 --> @jfoug commented on GitHub (Dec 18, 2014): I wonder if `Debug options (these hurt performance when enabled)` would be better as `Developer options (these hurt performance when enabled)` ?
Author
Owner

@jfoug commented on GitHub (Dec 18, 2014):

@frank-dittrich

Please validate 4314fb5

<!-- gh-comment-id:67469584 --> @jfoug commented on GitHub (Dec 18, 2014): @frank-dittrich Please validate 4314fb5
Author
Owner

@magnumripper commented on GitHub (Dec 18, 2014):

I think we can close this. Any future issue should become a new Git issue.

<!-- gh-comment-id:67515559 --> @magnumripper commented on GitHub (Dec 18, 2014): I think we can close this. Any future issue should become a new Git issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#465
No description provided.