Skip to content

fix: multiple memcpy operations in luat_vfs in luat_vfs.c#137

Open
orbisai0security wants to merge 1 commit into
openLuat:masterfrom
orbisai0security:fix-vfs-memcpy-bounds-check-v001
Open

fix: multiple memcpy operations in luat_vfs in luat_vfs.c#137
orbisai0security wants to merge 1 commit into
openLuat:masterfrom
orbisai0security:fix-vfs-memcpy-bounds-check-v001

Conversation

@orbisai0security

Copy link
Copy Markdown

Summary

Fix critical severity security issue in luat/vfs/luat_vfs.c.

Vulnerability

Field Value
ID V-001
Severity CRITICAL
Scanner multi_agent_ai
Rule V-001
File luat/vfs/luat_vfs.c:350

Description: Multiple memcpy operations in luat_vfs.c use lengths derived from source strings (strlen + 1) without verifying that the destination buffer is large enough to hold the data. At line 350, file_path_len is computed from _DirName but the allocated file_path buffer size is not validated against the actual string length before copying. At line 358, ents[i].d_name is appended to file_path without checking remaining buffer capacity. An attacker who can influence directory names or mount point strings can trigger a heap or stack overflow.

Changes

  • luat/vfs/luat_vfs.c

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
@sonarqubecloud

Copy link
Copy Markdown

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