Repository navigation
Conversation
File : libssh2_priv.h Notes : musl prints `redirecting incorrect #include <sys/poll.h> to <poll.h>` http://git.musl-libc.org/cgit/musl/commit/include/sys/poll.h?id=54446d730cfb17c5f7bcf57f139458678f5066cc poll is defined by POSIX to be in poll.h: http://pubs.opengroup.org/onlinepubs/7908799/xsh/poll.html Credit : Orivej Desh
File: libgcrypt.c Notes : Added calls to gcry_sexp_release to free memory allocated by gcry_sexp_find_token Credit : Reporter : beckmi PR by: Alexander Curtiss
The endgame being plugging the leak caused by us misusing libgcrypt bignums from binary functions. If the DH exchange was interrupted, we'd reload P & G on top of the still live values.
tiennou
added a commit
that referenced
this pull request
Jul 4, 2019
Caught by ASAN:
=================================================================
==73797==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60700001bcf0 at pc 0x00010026198d bp 0x7ffeefbfed30 sp 0x7ffeefbfe4d8
READ of size 69 at 0x60700001bcf0 thread T0
2019-07-04 08:35:30.292502+0200 atos[73890:2639175] examining /Users/USER/*/libssh2_clar [73797]
#0 0x10026198c in wrap_memchr (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x1f98c)
#1 0x1000f8e66 in file_read_publickey userauth.c:633
#2 0x1000f2dc9 in userauth_publickey_fromfile userauth.c:1513
libssh2#3 0x1000f2948 in libssh2_userauth_publickey_fromfile_ex userauth.c:1590
libssh2#4 0x10000e254 in test_userauth_publickey__ed25519_auth_ok publickey.c:69
libssh2#5 0x1000090c3 in clar_run_test clar.c:260
libssh2#6 0x1000038f3 in clar_run_suite clar.c:343
libssh2#7 0x100003272 in clar_test_run clar.c:522
libssh2#8 0x10000c3cc in main runner.c:60
libssh2#9 0x7fff5b43b3d4 in start (libdyld.dylib:x86_64+0x163d4)
0x60700001bcf0 is located 0 bytes to the right of 80-byte region [0x60700001bca0,0x60700001bcf0)
allocated by thread T0 here:
#0 0x10029e053 in wrap_malloc (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x5c053)
#1 0x1000b4978 in libssh2_default_alloc session.c:67
#2 0x1000f8aba in file_read_publickey userauth.c:597
libssh2#3 0x1000f2dc9 in userauth_publickey_fromfile userauth.c:1513
libssh2#4 0x1000f2948 in libssh2_userauth_publickey_fromfile_ex userauth.c:1590
libssh2#5 0x10000e254 in test_userauth_publickey__ed25519_auth_ok publickey.c:69
libssh2#6 0x1000090c3 in clar_run_test clar.c:260
libssh2#7 0x1000038f3 in clar_run_suite clar.c:343
libssh2#8 0x100003272 in clar_test_run clar.c:522
libssh2#9 0x10000c3cc in main runner.c:60
libssh2#10 0x7fff5b43b3d4 in start (libdyld.dylib:x86_64+0x163d4)
SUMMARY: AddressSanitizer: heap-buffer-overflow (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x1f98c) in wrap_memchr
Shadow bytes around the buggy address:
0x1c0e00003740: fd fd fd fd fd fd fd fd fd fd fa fa fa fa fd fd
0x1c0e00003750: fd fd fd fd fd fd fd fa fa fa fa fa 00 00 00 00
0x1c0e00003760: 00 00 00 00 00 00 fa fa fa fa 00 00 00 00 00 00
0x1c0e00003770: 00 00 00 fa fa fa fa fa fd fd fd fd fd fd fd fd
0x1c0e00003780: fd fd fa fa fa fa fd fd fd fd fd fd fd fd fd fa
=>0x1c0e00003790: fa fa fa fa 00 00 00 00 00 00 00 00 00 00[fa]fa
0x1c0e000037a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x1c0e000037b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x1c0e000037c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x1c0e000037d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x1c0e000037e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
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
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
Shadow gap: cc
tiennou
added a commit
that referenced
this pull request
Jul 16, 2019
…ibssh2#386) File: userauth.c Credit: Etienne Samson Notes: Caught by ASAN: ================================================================= ==73797==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60700001bcf0 at pc 0x00010026198d bp 0x7ffeefbfed30 sp 0x7ffeefbfe4d8 READ of size 69 at 0x60700001bcf0 thread T0 2019-07-04 08:35:30.292502+0200 atos[73890:2639175] examining /Users/USER/*/libssh2_clar [73797] #0 0x10026198c in wrap_memchr (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x1f98c) #1 0x1000f8e66 in file_read_publickey userauth.c:633 #2 0x1000f2dc9 in userauth_publickey_fromfile userauth.c:1513 libssh2#3 0x1000f2948 in libssh2_userauth_publickey_fromfile_ex userauth.c:1590 libssh2#4 0x10000e254 in test_userauth_publickey__ed25519_auth_ok publickey.c:69 libssh2#5 0x1000090c3 in clar_run_test clar.c:260 libssh2#6 0x1000038f3 in clar_run_suite clar.c:343 libssh2#7 0x100003272 in clar_test_run clar.c:522 libssh2#8 0x10000c3cc in main runner.c:60 libssh2#9 0x7fff5b43b3d4 in start (libdyld.dylib:x86_64+0x163d4) 0x60700001bcf0 is located 0 bytes to the right of 80-byte region [0x60700001bca0,0x60700001bcf0) allocated by thread T0 here: #0 0x10029e053 in wrap_malloc (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x5c053) #1 0x1000b4978 in libssh2_default_alloc session.c:67 #2 0x1000f8aba in file_read_publickey userauth.c:597 libssh2#3 0x1000f2dc9 in userauth_publickey_fromfile userauth.c:1513 libssh2#4 0x1000f2948 in libssh2_userauth_publickey_fromfile_ex userauth.c:1590 libssh2#5 0x10000e254 in test_userauth_publickey__ed25519_auth_ok publickey.c:69 libssh2#6 0x1000090c3 in clar_run_test clar.c:260 libssh2#7 0x1000038f3 in clar_run_suite clar.c:343 libssh2#8 0x100003272 in clar_test_run clar.c:522 libssh2#9 0x10000c3cc in main runner.c:60 libssh2#10 0x7fff5b43b3d4 in start (libdyld.dylib:x86_64+0x163d4) SUMMARY: AddressSanitizer: heap-buffer-overflow (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x1f98c) in wrap_memchr Shadow bytes around the buggy address: 0x1c0e00003740: fd fd fd fd fd fd fd fd fd fd fa fa fa fa fd fd 0x1c0e00003750: fd fd fd fd fd fd fd fa fa fa fa fa 00 00 00 00 0x1c0e00003760: 00 00 00 00 00 00 fa fa fa fa 00 00 00 00 00 00 0x1c0e00003770: 00 00 00 fa fa fa fa fa fd fd fd fd fd fd fd fd 0x1c0e00003780: fd fd fa fa fa fa fd fd fd fd fd fd fd fd fd fa =>0x1c0e00003790: fa fa fa fa 00 00 00 00 00 00 00 00 00 00[fa]fa 0x1c0e000037a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x1c0e000037b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x1c0e000037c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x1c0e000037d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x1c0e000037e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 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 Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb Shadow gap: cc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.