Skip to content

fix: at hide_soinfo in hide_soinfo.c#14

Open
orbisai0security wants to merge 1 commit into
kkkbbb:masterfrom
orbisai0security:fix-v007-integer-overflow-malloc-hide-soinfo
Open

fix: at hide_soinfo in hide_soinfo.c#14
orbisai0security wants to merge 1 commit into
kkkbbb:masterfrom
orbisai0security:fix-v007-integer-overflow-malloc-hide-soinfo

Conversation

@orbisai0security

Copy link
Copy Markdown

Summary

Fix critical severity security issue in agent/src/hide_soinfo.c.

Vulnerability

Field Value
ID V-007
Severity CRITICAL
Scanner multi_agent_ai
Rule V-007
File agent/src/hide_soinfo.c:128

Description: At hide_soinfo.c line 128, the heap allocation size is computed by multiplying ehdr.e_shnum (read directly from an untrusted ELF binary header) by sizeof(Elf64_Shdr) (64 bytes). On 32-bit systems or when extended section counts are used (stored in section 0's sh_size field as a 32-bit value), an attacker can supply e_shnum=0xFFFFFFFF, causing the multiplication 0xFFFFFFFF * 64 to overflow the 32-bit size_t to a small value (e.g., 192 bytes). malloc() then allocates only 192 bytes, but the subsequent fread() attempts to read 0xFFFFFFFF * 64 bytes of section header data into this tiny buffer, causing a massive heap overflow. No overflow check exists before the multiplication.

Changes

  • agent/src/hide_soinfo.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
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