Malformed .MDL triggers an Access Violation on GoldSRC (hl.exe)
A malformed player model file causes an invalid pointer write in the GoldSRC engine when loaded, leading to a crash. The reporter claims this could be exploited for remote code execution on a client.
- Triaged in 5 months
- Fixed in 8 months
- Paid in 5 months
- Disclosed after 8 months
A malformed player .MDL triggers an exploitable Access Violation on GoldSRC engine games (Half-Life) upon invocation, which could lead to remote code execution on a client.
###Crash Information FAILURE_ID_HASH_STRING: um:invalid_pointer_write_exploitable_c0000005_hw.dll!createinterface Event Type: Exception Exception Faulting Address: 0x4c01000 First Chance Exception Type: STATUS_ACCESS_VIOLATION (0xC0000005) Exception Sub-Type: Write Access Violation
FOLLOWUP_IP: hw!CreateInterface+282aa 03a554ea d95efc fstp dword ptr [esi-4]
PROBLEM_CLASSES:
ID: [0n309]
Type: [@ACCESS_VIOLATION]
Class: Addendum
Scope: BUCKET_ID
Name: Omit
Data: Omit
PID: [Unspecified]
TID: [0x6e30]
Frame: [0] : hw!CreateInterface
ID: [0n282]
Type: [INVALID_POINTER_WRITE]
Class: Primary
Scope: DEFAULT_BUCKET_ID (Failure Bucket ID prefix)
BUCKET_ID
Name: Add
Data: Omit
PID: [Unspecified]
TID: [0x6e30]
Frame: [0] : hw!CreateInterface
ID: [0n156]
Type: [ZEROED_STACK]
Class: Addendum
Scope: BUCKET_ID
Name: Add
Data: Omit
PID: [0x300]
TID: [0x6e30]
Frame: [0] : hw!CreateInterface
ID: [0n115]
Type: [EXPLOITABLE]
Class: Addendum
Scope: DEFAULT_BUCKET_ID (Failure Bucket ID prefix)
BUCKET_ID
Name: Add
Data: Omit
PID: [0x300]
TID: [0x6e30]
Frame: [0] : hw!CreateInterface
BUGCHECK_STR: APPLICATION_FAULT_INVALID_POINTER_WRITE_ZEROED_STACK_EXPLOITABLE
###Steps for Reproducing the Crash Place the attached .MDL in the games "Gman" multiplayer model folder (Steam\steamapps\common\Half-Life\valve\models\player\gman) Load the attached .MDL by setting the player character to "Gman" from the games multiplayer menu. Then, start a local game by typing "map crossfire" in console. Finally, execute the command "thirdperson" in console. The game will crash.
Impact
An attacker hosting a malicious server could compromise a remote client by having them download a custom model, triggering remote code execution on the victim's computer.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the model parser does not validate a field, causing an out-of-bounds write when the model is loaded.
Impact
An attacker hosting a malicious server could compromise a remote client by having them download a custom model, potentially leading to remote code execution.
What the attacker needed
Victim joins a malicious server; victim downloads a custom model; game loads the model
How it was found
- Place the malformed model file in the game's player model folder.
- Select the 'Gman' player model from the multiplayer menu.
- Start a local game with the console command 'map crossfire'.
- Execute the console command 'thirdperson' to trigger the crash.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A game model file is supposed to contain only shape data, but a malformed one can make the game write to a bad memory address. This crashes the game and might let an attacker run their own code on your computer if you join a malicious server.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.