Skip to content

fix: in bms in bms.c#904

Open
orbisai0security wants to merge 1 commit into
vedderb:masterfrom
orbisai0security:fix-bms-strcpy-buffer-overflow-v001
Open

fix: in bms in bms.c#904
orbisai0security wants to merge 1 commit into
vedderb:masterfrom
orbisai0security:fix-bms-strcpy-buffer-overflow-v001

Conversation

@orbisai0security
Copy link
Copy Markdown

Summary

Fix critical severity security issue in bms.c.

Vulnerability

Field Value
ID V-001
Severity CRITICAL
Scanner multi_agent_ai
Rule V-001
File bms.c:540
CWE CWE-120

Description: In bms.c at line 540, strcpy copies m_values.status into send_buffer at offset ind without any length validation. The content of m_values.status is populated from CAN bus packets (bms.c:341), meaning an attacker with CAN bus access can craft packets that fill m_values.status with data exceeding the remaining capacity of send_buffer, causing a stack or heap buffer overflow.

Changes

  • bms.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
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