Skip to content

fix: add buffer-length check in uri.c#10

Merged
darold merged 1 commit into
darold:masterfrom
orbisai0security:fix-heap-buffer-overflow-header-callback
May 27, 2026
Merged

fix: add buffer-length check in uri.c#10
darold merged 1 commit into
darold:masterfrom
orbisai0security:fix-heap-buffer-overflow-header-callback

Conversation

@orbisai0security
Copy link
Copy Markdown
Contributor

Summary

Fix high severity security issue in uri.c.

Vulnerability

Field Value
ID V-003
Severity HIGH
Scanner multi_agent_ai
Rule V-003
File uri.c:1356
Assessment Confirmed exploitable
CWE CWE-120

Description: The libcurl write callback at uri.c:1356 copies received data into a buffer using memcpy without validating that p->size + realsize does not exceed the allocated capacity of p->data. A malicious remote server can send responses larger than the buffer allocation, causing a heap buffer overflow. Since the attacker controls the remote endpoint, they can precisely control the overflow data.

Evidence

Exploitation scenario: 1...

Scanner confirmation: multi_agent_ai rule V-003 flagged this pattern.

Production code: This file is in the production codebase, not test-only code.

Changes

  • uri.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
@darold darold merged commit e3dc16a into darold:master May 27, 2026
0 of 7 checks passed
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