Skip to content

fix(core): Use Signature pattern instead of symbol name for function calls - #14

Open
Dolly132 wants to merge 4 commits into
srcdslab:masterfrom
Dolly132:main-dolly1
Open

fix(core): Use Signature pattern instead of symbol name for function calls#14
Dolly132 wants to merge 4 commits into
srcdslab:masterfrom
Dolly132:main-dolly1

Conversation

@Dolly132

Copy link
Copy Markdown

This PR aims to solve #13

There is no real test case to confirm that this PR 100% fixes this issue, but it should definitely fix it
In the previous version of CSSFixes, for patches that NOP out specific function calls (Like Msg, and ConMsg), it was getting the actual function address from the shared library (tier0), therefore in rare cases when server crashes and restarts itself automatically, the extension fails to find anything to patch for the patches that require NOPing out Msg and ConMsg function calls.

So I came up with an idea, instead of resolving the symbol name of the function in the shared library and getting its function address by statically dlopening the tier0.so, instead I replaced it with a first matching pattern that calls the targeted function where the last 5 bytes refer to the call instruction for that targeted function, address is calculated by this so the rest of the library has the same address (Unlike when it's statically done from the shared library, with dlopen)

However, I can't gurantee that this will fix the issue 100%, but it's worth a try

I made tests where this new change exactly matches what it was doing before

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.

1 participant