Skip to content
This repository has been archived by the owner on Sep 22, 2022. It is now read-only.

false-positive "use-after-poison" from AddressSanitizer if Valgrind's API enabled #101

Closed
erthink opened this issue Jul 31, 2016 · 1 comment
Assignees

Comments

@erthink
Copy link
Owner

erthink commented Jul 31, 2016

ERROR: AddressSanitizer: use-after-poison on address 0x60e00000d6a8 at pc 0x7f8e54a29694 bp 0x7ffc9852d0b0 sp 0x7ffc9852d0a0
READ of size 8 at 0x60e00000d6a8 thread T0
    #0 0x7f8e54a29693 in lber_hug_memchk_setup /home/ly/Projects/reopenldap.git/libraries/libreldap/hipagut.c:427
    #1 0x7f8e54a6168b in ber_memcalloc_x /home/ly/Projects/reopenldap.git/libraries/libreldap/memory.c:211
    #2 0x7f8e54a7a9d2 in ldap_pvt_thread_rmutex_init /home/ly/Projects/reopenldap.git/libraries/libreldap/rmutex.c:71
    #3 0x7f8e54a978e7 in ldap_pvt_thread_initialize /home/ly/Projects/reopenldap.git/libraries/libreldap/threads.c:72
    #4 0x418bf6 in main /home/ly/Projects/reopenldap.git/servers/slapd/main.c:420
    #5 0x7f8e538a582f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #6 0x41ce48 in _start (/home/ly/Projects/reopenldap.git/servers/slapd/.libs/lt-slapd+0x41ce48)

0x60e00000d6a8 is located 8 bytes inside of 152-byte region [0x60e00000d6a0,0x60e00000d738)
allocated by thread T0 here:
    #0 0x7f8e54fd179a in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x9879a)
    #1 0x7f8e54a61671 in ber_memcalloc_x /home/ly/Projects/reopenldap.git/libraries/libreldap/memory.c:207
    #2 0x65741f  (/home/ly/Projects/reopenldap.git/servers/slapd/.libs/lt-slapd+0x65741f)

SUMMARY: AddressSanitizer: use-after-poison /home/ly/Projects/reopenldap.git/libraries/libreldap/hipagut.c:427 lber_hug_memchk_setup
Shadow bytes around the buggy address:
  0x0c1c7fff9a80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c1c7fff9a90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c1c7fff9aa0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c1c7fff9ab0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c1c7fff9ac0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x0c1c7fff9ad0: fa fa fa fa f7[f7]f7 f7 00 00 00 00 00 00 00 00
  0x0c1c7fff9ae0: 00 00 00 00 00 00 f7 fa fa fa fa fa fa fa fa fa
  0x0c1c7fff9af0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
  0x0c1c7fff9b00: fd fd fd fa fa fa fa fa fa fa fa fa fd fd fd fd
  0x0c1c7fff9b10: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fa
  0x0c1c7fff9b20: fa fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
@erthink
Copy link
Owner Author

erthink commented Jul 31, 2016

Fixed in the 'devel' branch

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant