Skip to content

fix: the sms response buffer handling in sm_at_sms in sm_at_sms.c#294

Open
orbisai0security wants to merge 1 commit into
nrfconnect:mainfrom
orbisai0security:fix-v-001-sms-buffer-overflow
Open

fix: the sms response buffer handling in sm_at_sms in sm_at_sms.c#294
orbisai0security wants to merge 1 commit into
nrfconnect:mainfrom
orbisai0security:fix-v-001-sms-buffer-overflow

Conversation

@orbisai0security
Copy link
Copy Markdown

Summary

Fix critical severity security issue in app/src/sm_at_sms.c.

Vulnerability

Field Value
ID V-001
Severity CRITICAL
Scanner multi_agent_ai
Rule V-001
File app/src/sm_at_sms.c:127

Description: The SMS response buffer handling in sm_at_sms.c uses unbounded sprintf() at line 127, strcpy() at line 137, and strcat() at line 149 to write into sms_ctx.concat_rsp_buf without any bounds checking. An attacker who can send an oversized SMS message payload can overflow the buffer, corrupting adjacent stack or heap memory. The three consecutive unsafe operations compound the overflow risk significantly.

Changes

  • app/src/sm_at_sms.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