Skip to content

fix(anti-cheat): Resolve EAC callback use-after-free race condition#508

Open
ahmedheiba210 wants to merge 1 commit into
GeneralsOnlineDevelopmentTeam:mainfrom
ahmedheiba210:fix/eac-callback-uaf
Open

fix(anti-cheat): Resolve EAC callback use-after-free race condition#508
ahmedheiba210 wants to merge 1 commit into
GeneralsOnlineDevelopmentTeam:mainfrom
ahmedheiba210:fix/eac-callback-uaf

Conversation

@ahmedheiba210
Copy link
Copy Markdown

@ahmedheiba210 ahmedheiba210 commented May 30, 2026

Move the four Set*Callback registrations out of LoadPlugin into a new
RegisterHostCallbacks() helper, guarded by IsPluginLoaded(). Call this
helper once from LoadPlugin and again at the top of BeginSession().

Call ClearAllHostCallbacks() in EndSession() immediately after the
plugin's own EndSession to prevent a race condition during lobby teardown.
This flushes in-flight worker-thread callbacks and nulls pointers before
LeaveCurrentLobby() frees the lobby mesh.

Retain begin/end idempotency and the atomic session-active guard. The
guard protects against shipped DLLs that lack ClearAllHostCallbacks.

@ahmedheiba210 ahmedheiba210 changed the title Fix EAC anti-cheat callback use-after-free (worker-thread safe) bugfix May 30, 2026
@ahmedheiba210 ahmedheiba210 changed the title bugfix fix(anti-cheat): resolve EAC callback use-after-free race condition May 30, 2026
@ahmedheiba210 ahmedheiba210 force-pushed the fix/eac-callback-uaf branch from ba80200 to fb3ee3a Compare May 30, 2026 22:24
@ahmedheiba210 ahmedheiba210 changed the title fix(anti-cheat): resolve EAC callback use-after-free race condition fix(anti-cheat): Resolve EAC callback use-after-free race condition May 30, 2026
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