Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unittest for blowfish appears to be incorrect. #46

Open
verpeteren opened this issue Jan 8, 2016 · 0 comments
Open

Unittest for blowfish appears to be incorrect. #46

verpeteren opened this issue Jan 8, 2016 · 0 comments
Assignees
Labels

Comments

@verpeteren
Copy link
Contributor

This unittest is failing with ./configure --debug --unit-test -asume-yes

[ RUN      ] Blowfish.Simple
=================================================================
==23129==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffc6e41bf11 at pc 0x0000005fb1e0 bp 0x7ffc6e41acb0 sp 0x7ffc6e41aca8
READ of size 1 at 0x7ffc6e41bf11 thread T0
    #0 0x5fb1df (/data/buildbot/nidium_slave/debian8.2_amd64/libapenetwork_Debug_debian8_2_amd64_master/build/tests/bin/nativenetwork-unittests+0x5fb1df)
    #1 0x555edf (/data/buildbot/nidium_slave/debian8.2_amd64/libapenetwork_Debug_debian8_2_amd64_master/build/tests/bin/nativenetwork-unittests+0x555edf)
    #2 0x630832 (/data/buildbot/nidium_slave/debian8.2_amd64/libapenetwork_Debug_debian8_2_amd64_master/build/tests/bin/nativenetwork-unittests+0x630832)
    #3 0x61f900 (/data/buildbot/nidium_slave/debian8.2_amd64/libapenetwork_Debug_debian8_2_amd64_master/build/tests/bin/nativenetwork-unittests+0x61f900)
    #4 0x60518a (/data/buildbot/nidium_slave/debian8.2_amd64/libapenetwork_Debug_debian8_2_amd64_master/build/tests/bin/nativenetwork-unittests+0x60518a)
    #5 0x605fed (/data/buildbot/nidium_slave/debian8.2_amd64/libapenetwork_Debug_debian8_2_amd64_master/build/tests/bin/nativenetwork-unittests+0x605fed)
    #6 0x606816 (/data/buildbot/nidium_slave/debian8.2_amd64/libapenetwork_Debug_debian8_2_amd64_master/build/tests/bin/nativenetwork-unittests+0x606816)
    #7 0x60e900 (/data/buildbot/nidium_slave/debian8.2_amd64/libapenetwork_Debug_debian8_2_amd64_master/build/tests/bin/nativenetwork-unittests+0x60e900)
    #8 0x62cb32 (/data/buildbot/nidium_slave/debian8.2_amd64/libapenetwork_Debug_debian8_2_amd64_master/build/tests/bin/nativenetwork-unittests+0x62cb32)
    #9 0x621f50 (/data/buildbot/nidium_slave/debian8.2_amd64/libapenetwork_Debug_debian8_2_amd64_master/build/tests/bin/nativenetwork-unittests+0x621f50)
    #10 0x60e59a (/data/buildbot/nidium_slave/debian8.2_amd64/libapenetwork_Debug_debian8_2_amd64_master/build/tests/bin/nativenetwork-unittests+0x60e59a)
    #11 0x5fba90 (/data/buildbot/nidium_slave/debian8.2_amd64/libapenetwork_Debug_debian8_2_amd64_master/build/tests/bin/nativenetwork-unittests+0x5fba90)
    #12 0x5fba5e (/data/buildbot/nidium_slave/debian8.2_amd64/libapenetwork_Debug_debian8_2_amd64_master/build/tests/bin/nativenetwork-unittests+0x5fba5e)
    #13 0x7f68126bbb44 (/lib/x86_64-linux-gnu/libc.so.6+0x21b44)
    #14 0x53b9ec (/data/buildbot/nidium_slave/debian8.2_amd64/libapenetwork_Debug_debian8_2_amd64_master/build/tests/bin/nativenetwork-unittests+0x53b9ec)

Address 0x7ffc6e41bf11 is located in stack of thread T0 at offset 4465 in frame
    #0 0x555e0f (/data/buildbot/nidium_slave/debian8.2_amd64/libapenetwork_Debug_debian8_2_amd64_master/build/tests/bin/nativenetwork-unittests+0x555e0f)

  This frame has 2 object(s):
    [32, 4200) 'ctx'
    [4464, 4465) 'key' <== Memory access at offset 4465 overflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
      (longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-overflow ??:0 ??
Shadow bytes around the buggy address:
  0x10000dc7b790: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10000dc7b7a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10000dc7b7b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10000dc7b7c0: 00 f2 f2 f2 f2 f2 f2 f2 f2 f2 f2 f2 f2 f2 f2 f2
  0x10000dc7b7d0: f2 f2 f2 f2 f2 f2 f2 f2 f2 f2 f2 f2 f2 f2 f2 f2
=>0x10000dc7b7e0: f2 f2[01]f3 00 00 00 00 00 00 00 00 00 00 00 00
  0x10000dc7b7f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10000dc7b800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10000dc7b810: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10000dc7b820: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x10000dc7b830: 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 right 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
  Container overflow:      fc
  ASan internal:           fe
==23129==ABORTING
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants