Skip to content

fix: remove unsafe exec() in spi_stm32.c#4

Open
orbisai0security wants to merge 1 commit into
hitomi2500:masterfrom
orbisai0security:fix-strcpy-buffer-overflow-spi-stm32
Open

fix: remove unsafe exec() in spi_stm32.c#4
orbisai0security wants to merge 1 commit into
hitomi2500:masterfrom
orbisai0security:fix-strcpy-buffer-overflow-spi-stm32

Conversation

@orbisai0security
Copy link
Copy Markdown

Summary

Fix critical severity security issue in fpga_firmware/software/wasca_test9/spi_stm32.c.

Vulnerability

Field Value
ID V-001
Severity CRITICAL
Scanner multi_agent_ai
Rule V-001
File fpga_firmware/software/wasca_test9/spi_stm32.c:436

Description: The spi_stm32.c file uses strcpy() at lines 436-437 to copy build_date and build_time strings into fixed-size fields of the max_ver_buff structure (wl_verinfo_max_t). strcpy() performs no bounds checking whatsoever. If either source string exceeds the destination field size — which can be triggered by a crafted SPI packet supplying an oversized string — adjacent stack or heap memory is silently overwritten. On embedded MCUs without stack canaries (which are not confirmed to be enabled), this directly enables redirection of execution to attacker-controlled code.

Changes

  • old/fpga_firmware/software/wasca_test9/spi_stm32.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