[GH-ISSUE #2265] Memory leaks found with ASAN #1517

Closed
opened 2026-10-15 04:19:18 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @jfoug on GitHub (Sep 10, 2016).
Original GitHub issue: https://github.com/openwall/john/issues/2265

Testing: WoWSRP, Battlenet [SHA1 32/64 oSSL-exp]... (2xOMP) PASS

=================================================================
==5271==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 81920 byte(s) in 2560 object(s) allocated from:
    #0 0x7f8f12075e20 in malloc (/lib64/libasan.so.3+0xc6e20)
    #1 0x7f8f1194b0b7 in CRYPTO_malloc (/lib64/libcrypto.so.10+0x6e0b7)

Indirect leak of 597984 byte(s) in 10751 object(s) allocated from:
    #0 0x7f8f12075e20 in malloc (/lib64/libasan.so.3+0xc6e20)
    #1 0x7f8f1194b0b7 in CRYPTO_malloc (/lib64/libcrypto.so.10+0x6e0b7)

SUMMARY: AddressSanitizer: 679904 byte(s) leaked in 13311 allocation(s).
Testing: Clipperz, SRP [SHA256 32/64 oSSL-exp]... (2xOMP) PASS

=================================================================
==5281==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 81920 byte(s) in 2560 object(s) allocated from:
    #0 0x7f7a542c2e20 in malloc (/lib64/libasan.so.3+0xc6e20)
    #1 0x7f7a53b980b7 in CRYPTO_malloc (/lib64/libcrypto.so.10+0x6e0b7)

Indirect leak of 622552 byte(s) in 10751 object(s) allocated from:
    #0 0x7f7a542c2e20 in malloc (/lib64/libasan.so.3+0xc6e20)
    #1 0x7f7a53b980b7 in CRYPTO_malloc (/lib64/libcrypto.so.10+0x6e0b7)

SUMMARY: AddressSanitizer: 704472 byte(s) leaked in 13311 allocation(s).

Very important (I think), built without GMP.

$ ../run/john -list=format-all-details -format=wowsrp
Format label                         WoWSRP...

Algorithm name                       SHA1 32/64 oSSL-exp

There may be others, I will continue (testing 1 format at a time)

Originally created by @jfoug on GitHub (Sep 10, 2016). Original GitHub issue: https://github.com/openwall/john/issues/2265 ``` Testing: WoWSRP, Battlenet [SHA1 32/64 oSSL-exp]... (2xOMP) PASS ================================================================= ==5271==ERROR: LeakSanitizer: detected memory leaks Direct leak of 81920 byte(s) in 2560 object(s) allocated from: #0 0x7f8f12075e20 in malloc (/lib64/libasan.so.3+0xc6e20) #1 0x7f8f1194b0b7 in CRYPTO_malloc (/lib64/libcrypto.so.10+0x6e0b7) Indirect leak of 597984 byte(s) in 10751 object(s) allocated from: #0 0x7f8f12075e20 in malloc (/lib64/libasan.so.3+0xc6e20) #1 0x7f8f1194b0b7 in CRYPTO_malloc (/lib64/libcrypto.so.10+0x6e0b7) SUMMARY: AddressSanitizer: 679904 byte(s) leaked in 13311 allocation(s). ``` ``` Testing: Clipperz, SRP [SHA256 32/64 oSSL-exp]... (2xOMP) PASS ================================================================= ==5281==ERROR: LeakSanitizer: detected memory leaks Direct leak of 81920 byte(s) in 2560 object(s) allocated from: #0 0x7f7a542c2e20 in malloc (/lib64/libasan.so.3+0xc6e20) #1 0x7f7a53b980b7 in CRYPTO_malloc (/lib64/libcrypto.so.10+0x6e0b7) Indirect leak of 622552 byte(s) in 10751 object(s) allocated from: #0 0x7f7a542c2e20 in malloc (/lib64/libasan.so.3+0xc6e20) #1 0x7f7a53b980b7 in CRYPTO_malloc (/lib64/libcrypto.so.10+0x6e0b7) SUMMARY: AddressSanitizer: 704472 byte(s) leaked in 13311 allocation(s). ``` Very important (I think), built without GMP. ``` $ ../run/john -list=format-all-details -format=wowsrp Format label WoWSRP... Algorithm name SHA1 32/64 oSSL-exp ``` There may be others, I will continue (testing 1 format at a time)
Author
Owner

@frank-dittrich commented on GitHub (Sep 10, 2016):

CRYPTO_malloc (/lib64/libcrypto.so.10+0x6e0b7)

Can you post the ./john --list=build-info output?
Are you testing this on your fedora 22, which reached EOL a long time ago?

<!-- gh-comment-id:246078350 --> @frank-dittrich commented on GitHub (Sep 10, 2016): > `CRYPTO_malloc (/lib64/libcrypto.so.10+0x6e0b7)` Can you post the `./john --list=build-info` output? Are you testing this on your fedora 22, which reached EOL a _long_ time ago?
Author
Owner

@jfoug commented on GitHub (Sep 10, 2016):

I already have the fix for oSSL (BN) big numbers.

<!-- gh-comment-id:246080085 --> @jfoug commented on GitHub (Sep 10, 2016): I already have the fix for oSSL (BN) big numbers.
Author
Owner

@jfoug commented on GitHub (Sep 10, 2016):

Same problem on fedora-22 and fedora-24

<!-- gh-comment-id:246080393 --> @jfoug commented on GitHub (Sep 10, 2016): Same problem on fedora-22 and fedora-24
Author
Owner

@jfoug commented on GitHub (Sep 10, 2016):

26990f8

<!-- gh-comment-id:246081043 --> @jfoug commented on GitHub (Sep 10, 2016): 26990f8
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#1517
No description provided.