Skip to content

fix: use bounded strlcpy/snprintf in girnode.c#4

Open
orbisai0security wants to merge 1 commit into
winlibs:masterfrom
orbisai0security:fix-strcpy-bounds-check-girnode
Open

fix: use bounded strlcpy/snprintf in girnode.c#4
orbisai0security wants to merge 1 commit into
winlibs:masterfrom
orbisai0security:fix-strcpy-bounds-check-girnode

Conversation

@orbisai0security
Copy link
Copy Markdown

Summary

Fix critical severity security issue in girepository/girnode.c.

Vulnerability

Field Value
ID V-001
Severity CRITICAL
Scanner multi_agent_ai
Rule V-001
File girepository/girnode.c:2578

Description: The call to strcpy((char *)&data[start], str) at girnode.c:2578 copies a string into a buffer at a computed offset without any bounds checking. The destination buffer size is not validated against the length of 'str' before the copy. If an attacker can influence the content or length of 'str' through a crafted GIR XML file or typelib binary, they can overflow the destination buffer, overwriting adjacent heap memory and corrupting heap metadata.

Changes

  • girepository/girnode.c

Verification

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

Automated security fix generated by OrbisAI Security

Signed-off-by: orbisai0security <mediratta01.pally@gmail.com>
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