==476094==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x50200001fb1c at pc 0x762644676ef1 bp 0x7ffe7619d0c0 sp 0x7ffe7619c868
READ of size 13 at 0x50200001fb1c thread T0
#0 0x762644676ef0 in strlen /usr/src/debug/gcc/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:391
#1 0x59232a0935b7 in tputs /home/michael/projects/eggdrop/src/net.c:1380
#2 0x76263fafba29 in write_to_server .././server.mod/server.c:173
#3 0x76263fb0f4cd in deq_msg .././server.mod/server.c:251
#4 0x76263fb3431f in server_secondly .././server.mod/server.c:2034
#5 0x59232a06d425 in mainloop main.c:742
#6 0x59232a070e43 in main main.c:1213
#7 0x762643234e07 (/usr/lib/libc.so.6+0x25e07) (BuildId: 98b3d8e0b8c534c769cb871c438b4f8f3a8e4bf3)
#8 0x762643234ecb in __libc_start_main (/usr/lib/libc.so.6+0x25ecb) (BuildId: 98b3d8e0b8c534c769cb871c438b4f8f3a8e4bf3)
#9 0x592329fc2484 in _start (/home/michael/eggdrop/eggdrop-1.10.0+0x216484) (BuildId: 1a9b352f6ffbbc5269ca3149783ede67585b1833)
0x50200001fb1c is located 0 bytes after 12-byte region [0x50200001fb10,0x50200001fb1c)
allocated by thread T0 here:
#0 0x7626446fd891 in malloc /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_malloc_linux.cpp:69
#1 0x59232a073457 in n_malloc /home/michael/projects/eggdrop/src/mem.c:342
SUMMARY: AddressSanitizer: heap-buffer-overflow /usr/src/debug/gcc/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:391 in strlen
Shadow bytes around the buggy address:
0x50200001f880: fa fa fd fd fa fa 00 03 fa fa fd fd fa fa fd fd
0x50200001f900: fa fa fd fd fa fa fd fa fa fa fd fd fa fa fd fd
0x50200001f980: fa fa 00 03 fa fa fd fd fa fa fd fa fa fa fd fd
0x50200001fa00: fa fa fd fd fa fa fd fa fa fa fd fd fa fa fd fd
0x50200001fa80: fa fa fd fd fa fa 00 01 fa fa fd fd fa fa fd fa
=>0x50200001fb00: fa fa 00[04]fa fa 00 07 fa fa fa fa fa fa fa fa
0x50200001fb80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x50200001fc00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x50200001fc80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x50200001fd00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x50200001fd80: 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
==476094==ABORTING
Found by: michaelortmann Patch by: michaelortmann Fixes:
One-line summary:
Additional description (if needed):
Test cases demonstrating functionality (if applicable): Fixes the following 2 issues: 1. Before:
After:
[19:22:02] Warning: Got NOTICE CTCP reply longer than 512 bytes: Bogus server?
2.: