Skip to content

fix: the vendored flatcc portable header pstdint in pstdint.h#887

Open
orbisai0security wants to merge 1 commit into
apache:mainfrom
orbisai0security:fix-pstdint-sprintf-buffer-overflow
Open

fix: the vendored flatcc portable header pstdint in pstdint.h#887
orbisai0security wants to merge 1 commit into
apache:mainfrom
orbisai0security:fix-pstdint-sprintf-buffer-overflow

Conversation

@orbisai0security
Copy link
Copy Markdown

Summary

Fix high severity security issue in thirdparty/flatcc/include/flatcc/portable/pstdint.h.

Vulnerability

Field Value
ID V-001
Severity HIGH
Scanner multi_agent_ai
Rule V-001
File thirdparty/flatcc/include/flatcc/portable/pstdint.h:833
CWE CWE-120

Description: The vendored flatcc portable header pstdint.h uses unbounded sprintf() calls to format integer values (including INT64 and UINT64 maximum values) into fixed-size stack buffers str0 and str1. No maximum output length is specified in any of the nine sprintf calls. If the fixed-size buffers are smaller than the maximum formatted representation of INT64/UINT64 values (up to 20 decimal digits plus sign and null terminator = 22 bytes minimum), a stack buffer overflow occurs at library initialization time. This is a latent code defect in vendored code rather than a directly injectable attack, but represents a real memory safety risk.

Changes

  • thirdparty/flatcc/include/flatcc/portable/pstdint.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.

1 participant