Remote crash exploit via malformed ScEvent clone sync packet (b3258 +0x1701C90)
What happened?
A player on the server sent a crafted clone sync packet that crashed every client on the server simultaneously. The crash happens inside the ScEvent sync node linked list unlink operation at offset +0x1701C90.
The attacker needs to be inside a vehicle. When they trigger it, everyone crashes including themselves, then they reconnect and repeat.
I captured a full memory dump during a controlled reproduction and analyzed it with WinDbg. The crash is caused by a non-canonical pointer (0x400000003d9eb4c2) being loaded into rcx at +0x1701C88 from attacker-controlled next->next data inside the ScEvent node, then used as a write target at +0x1701C90 with no validation.
There is a heap spray in the dump confirming the packet was manually crafted: pattern 0x82828282 -> 0x02020202 -> 0x81818181 inside a valid RAGE allocation (0x0aadbeef header confirmed).
This is not the same crash as PR #4100. That one is at +0xF2BC09 (archetype dereference). This one is at +0x1701C90 (linked list write) and has no existing fix.
Expected result
Malformed sync packets should be rejected or validated before the linked list unlink operation processes them.
Reproduction steps
- A player joins the server and gets inside a vehicle
- All clients on the server crash simultaneously with ACCESS_VIOLATION c0000005 at FiveM_b3258_GTAProcess+0x1701C90
- The attacker reconnects and repeats
Note: I am the victim in this case, not the attacker. The above is what was observed. The exact packet crafting method is unknown to me, but the full memory dump confirms the crash path and the intentional heap spray pattern.
Full dump (11GB): https://mega.nz/file/0QMkjJjJ#gNYAG8vW2XG4fhkZUiMBBpFj66tVh--8jU61BNHvnx8
Importancy
Crash
Area(s)
FiveM
Specific version(s)
Artifact 34629
Additional information
Crash details from dump:
Fault address: FiveM_b3258_GTAProcess+0x1701C90 Exception: 0xC0000005 write to 0x400000003d9eb4d2 Node type: ScEvent (ASCII confirmed in dump at 0x29f8b7ce030) Entity netID: 298, entityID: 300
The unlink function at +0x1701C70 reads next->next at +0x1C7B, writes it to list_head at +0x1C7F, then loads it back into rcx at +0x1C88 with no canonical check before the write at +0x1C90. Adding a canonical address check between +0x1C88 and +0x1C90 would fix this specific path.
Full dump attached: a58cf9d0-48ee-48e2-be5b-138cf3f4700b-full.dmp
Hi, please avoid posting full dumps publicly since it contains sensitive information.
From my own experience, I can tell you that unfortunately there are again too many crash exploits circulating, and the team doesnt have the resources to address them right now, so as always, just be patient.
A fix for these crashes, caused by the same cheat, has been deployed to Canary/Latest(Unstable). Please instruct your players to switch to it from the main menu in order not to be crashed.
GTA5_b3258.exe+11ACA90
GTA5_b3258.exe+EC1568
GTA5_b3258.exe+EBE09F
GTA5_b3258.exe+F8B3F0
GTA5_b3258.exe+F55048
GTA5_b3258.exe+F55048
GTA5_b3258.exe+1701C90
(these are for build 3258, for newer builds the numbers might be different)
If you notice any new issues around vehicles, report them ASAP :slight_smile:. Also keep an eye out for issues with NPCs that are given a task to drive a car/boat or fly a plane/helicopter, if you have these on your server.
Hi @the-big-gs I’m experiencing a very similar issue on my side as well.
I’ve had multiple crashes affecting different clients, and the crash dumps consistently show an ACCESS_VIOLATION (0xC0000005) inside FiveM_b3570_GTAProcess.exe.
The main crash I’m seeing is: FiveM_b3570_GTAProcess+0xb8c487 with: INVALID_POINTER_READ and the failing instruction: mov rcx, qword ptr [rbx+68h]
It seems to be related to the same ScEvent / clone sync area, although the offset is different from the one reported here.
Hv'u found any new information about this issue since the original report? Any additional findings, related crash patterns, or possible temporary mitigations would be really helpful.
Hi @the-big-gs I’m experiencing a very similar issue on my side as well.
I’ve had multiple crashes affecting different clients, and the crash dumps consistently show an
ACCESS_VIOLATION (0xC0000005)insideFiveM_b3570_GTAProcess.exe.The main crash I’m seeing is:
FiveM_b3570_GTAProcess+0xb8c487with:INVALID_POINTER_READand the failing instruction:mov rcx, qword ptr [rbx+68h]It seems to be related to the same
ScEvent/ clone sync area, although the offset is different from the one reported here.Hv'u found any new information about this issue since the original report? Any additional findings, related crash patterns, or possible temporary mitigations would be really helpful.
I have provided a fix for this crash, this needs to be reviewed by the team and will hopefully get merged next week!
I have provided a fix for this crash, this needs to be reviewed by the team and will hopefully get merged next week!
@divocbn That’s great news! Do u've a link to the issue or PR where u submitted the fix? I’d like to follow the progress and keep an eye on the review.
I have provided a fix for this crash, this needs to be reviewed by the team and will hopefully get merged next week!
@divocbn That’s great news! Do u've a link to the issue or PR where u submitted the fix? I’d like to follow the progress and keep an eye on the review.
I have sent it to @radium-cfx, but Gogsi has provided a script solution to mitigate this crash here: https://github.com/citizenfx/fivem/issues/4134#issuecomment-5373878144