fix: add buffer-length check in validation.c - #182
Conversation
…feature/cli-refresh
…feature/cli-refresh
…feature/cli-refresh
…feature/cli-refresh
- CHANGELOG: 2026-03-21 + [0.1.0-RC2] sections merged - GOALS/CONTRIBUTING/DEVELOPERS: combine checklist + VISION + FabricShell + keygen - Drop conflicted docs/*.html; scripts/clean-jsdoc-html.js + make:docs - make:api/make:docs use scripts/list-jsdoc-type-files.js (recursive for HTML) Made-with: Cursor
Extensive work on ARC security, including mainnet preparation
Automated security fix generated by OrbisAI Security
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Not up to standards ⛔
|
Summary
Fix critical severity security issue in
src/validation.c.Vulnerability
V-001src/validation.c:408Description: The function fabric_safe_string_copy() uses strcpy() without proper bounds checking, despite performing a length check. If the check is bypassed or if src_len equals dest_size, strcpy() will copy src_len + 1 bytes (including null terminator), causing a 1-byte buffer overflow.
Evidence
Exploitation scenario: Call fabric_safe_string_copy() with a source string exactly dest_size bytes long.
Scanner confirmation: multi_agent_ai rule
V-001flagged this pattern.Production code: This file is in the production codebase, not test-only code.
Threat Model Context
This is a Node.js library - vulnerabilities affect downstream consumers who use this package.
Changes
src/validation.cBehavior Preservation
The change is scoped to 1 file on the vulnerable path; it only tightens handling of untrusted input and leaves valid inputs unaffected.
Automated security fix by OrbisAI Security