eggdrop icon indicating copy to clipboard operation
eggdrop copied to clipboard

Use after free

Open michaelortmann opened this issue 1 year ago • 0 comments

I killed the bot in terminal with ctrl+c and got:

*** ACK, I've been terminated!
[10:57:17.%f] Writing user file...
=================================================================
==719370==ERROR: AddressSanitizer: heap-use-after-free on address 0x50200001dfb0 at pc 0x73326306cbd0 bp 0x7ffd079aab00 sp 0x7ffd079aa278
READ of size 2 at 0x50200001dfb0 thread T0
    #0 0x73326306cbcf in printf_common /usr/src/debug/gcc/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors_format.inc:563
    #1 0x733263086b93 in vfprintf /usr/src/debug/gcc/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:1648
    #2 0x733263088d56 in __fprintf_chk /usr/src/debug/gcc/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:1710
    #3 0x5e2753b4e344 in fprintf /usr/include/bits/stdio2.h:111
    #4 0x5e2753b4e344 in def_write_userfile /home/michael/projects/eggdrop/src/userent.c:112
    #5 0x5e2753b5ec44 in write_user /home/michael/projects/eggdrop/src/userrec.c:527
    #6 0x5e2753b5f49f in write_userfile /home/michael/projects/eggdrop/src/userrec.c:668
    #7 0x5e2753af3e55 in kill_bot /home/michael/projects/eggdrop/src/misc.c:1548
    #8 0x5e2753ae0ecb in got_term main.c:376

Version eggdrop v1.10.0+compilecleaning

michaelortmann avatar Feb 08 '25 10:02 michaelortmann