Skip to content

fix: the macro defined in bge/util in util.h#1475

Closed
orbisai0security wants to merge 1 commit into
bazaar-org:mainfrom
orbisai0security:fix-v-002-use-after-free-util-h
Closed

fix: the macro defined in bge/util in util.h#1475
orbisai0security wants to merge 1 commit into
bazaar-org:mainfrom
orbisai0security:fix-v-002-use-after-free-util-h

Conversation

@orbisai0security
Copy link
Copy Markdown

Summary

Fix high severity security issue in bge/util.h.

Vulnerability

Field Value
ID V-002
Severity HIGH
Scanner multi_agent_ai
Rule V-002
File bge/util.h:78

Description: The macro defined in bge/util.h at line 78 calls g_free(self) without subsequently setting self to NULL. This pattern is replicated across bge-animation.c (lines 808 and 817, where the same ptr variable appears to be freed twice) and bge-wdgt-spec.c (lines 1028 and 4203). When a freed pointer is not nullified, any subsequent dereference of that pointer — through a retained reference in a widget structure, animation state, or callback — constitutes a use-after-free. The double-free pattern in bge-animation.c (ptr freed at both line 808 and 817) is particularly concerning as it can corrupt heap allocator metadata directly.

Changes

  • bge/util.h

Verification

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

Automated security fix by OrbisAI Security

Automated security fix generated by Orbis Security AI
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