Skip to content

fix: remove unsafe exec() in lvl_script_commands.c#4800

Merged
Loobinex merged 1 commit into
dkfans:masterfrom
orbisai0security:fix-v006-heap-buffer-overflow-set-game-rule
May 24, 2026
Merged

fix: remove unsafe exec() in lvl_script_commands.c#4800
Loobinex merged 1 commit into
dkfans:masterfrom
orbisai0security:fix-v006-heap-buffer-overflow-set-game-rule

Conversation

@orbisai0security
Copy link
Copy Markdown
Contributor

Summary

Fix high severity security issue in src/lvl_script_commands.c.

Vulnerability

Field Value
ID V-006
Severity HIGH
Scanner multi_agent_ai
Rule V-006
File src/lvl_script_commands.c:5312
CWE CWE-190

Description: The game loads and executes level scripts that control game behavior. The script parsing code in lvl_script_commands.c and config_magic.c processes user-supplied level files without sufficient input validation. Combined with the integer overflow in allocation (V-004) and potential use-after-free (V-005), a maliciously crafted level file can trigger memory corruption leading to arbitrary code execution.

Changes

  • src/lvl_script_commands.c

Verification

  • Build passes
  • Scanner re-scan confirms fix
  • LLM code review passed

Automated security fix by OrbisAI Security

Automated security fix generated by OrbisAI Security
@Loobinex Loobinex merged commit fce7dce into dkfans:master May 24, 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.

2 participants