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

Crash fix: strcpy-param-overlap #1613

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

michaelortmann
Copy link
Member

@michaelortmann michaelortmann commented Jun 13, 2024

Found by: michaelortmann
Patch by: michaelortmann
Fixes:

One-line summary:
Fix strcpy-param-overlap (AddressSanitizer crash)

Additional description (if needed):
Also revert bug introduced by #1157

Test cases demonstrating functionality (if applicable):
Test 1

.files
.cd ../../
=================================================================
==100130==ERROR: AddressSanitizer: strcpy-param-overlap: memory ranges [0x502000035d70,0x502000035d75) and [0x502000035d73, 0x502000035d78) overlap
    #0 0x777c8f6f5ccd in strcpy /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_interceptors.cpp:561
    #1 0x777c89ccafc6 in resolve_dir .././filesys.mod/files.c:174
[...]

Test2

[16:15:06] [@] :testuser!michael@Clk-8553FB0D MODE #test +l 1000000
[16:15:06] #test: mode change '+l 1000000' by testuser!michael@Clk-8553FB0D
[16:15:14] [@] :testuser!michael@Clk-8553FB0D MODE #test +k 9a
[16:15:14] #test: mode change '+k 9a' by testuser!michael@Clk-8553FB0D
.reset
[16:15:19] tcl: builtin dcc call: *dcc:reset -HQ 1 
[16:15:19] #-HQ# reset all
Resetting channel info for all channels...
[16:15:19] [!m] MODE #test +b
[16:15:19] [m->] MODE #test +b
[16:15:19] [!m] MODE #test +e
[16:15:19] [m->] MODE #test +e
[16:15:19] [!m] MODE #test +I
[16:15:19] [m->] MODE #test +I
[16:15:19] [!m] MODE #test
[16:15:19] [m->] MODE #test
[16:15:19] [!m] WHO #test c%chnufat,222
[16:15:19] [!m] TOPIC #test
[16:15:19] [@] :irc.example.org 368 BotA #test :End of Channel Ban List
[16:15:19] [@] :irc.example.org 349 BotA #test :End of Channel Exception List
[16:15:19] [@] :irc.example.org 347 BotA #test :End of Channel Invite List
[16:15:19] [@] :irc.example.org 324 BotA #test +klnt 9a 1000000
=================================================================
==153831==ERROR: AddressSanitizer: strcpy-param-overlap: memory ranges [0x5290000ca0a1,0x5290000ca0a9) and [0x5290000ca0a4, 0x5290000ca0ac) overlap
    #0 0x736df12f5ccd in strcpy /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_interceptors.cpp:561
    #1 0x736dec143bda in got324 .././irc.mod/chan.c:1035

@michaelortmann michaelortmann changed the title Fix strcpy-param-overlap Fix strcpy-param-overlap (AddressSanitizer crash) Jun 13, 2024
@michaelortmann michaelortmann changed the title Fix strcpy-param-overlap (AddressSanitizer crash) Crash fix: strcpy-param-overlap Jul 9, 2024
@vanosg vanosg added this to the v1.10.1 milestone Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants