Skip to content

fix: use bounded strlcpy/snprintf in jni-c-toxcore.c#795

Draft
orbisai0security wants to merge 1 commit into
zoff99:zoff99/dev003from
orbisai0security:fix-v-001-strcpy-overflow-jni-c-toxcore
Draft

fix: use bounded strlcpy/snprintf in jni-c-toxcore.c#795
orbisai0security wants to merge 1 commit into
zoff99:zoff99/dev003from
orbisai0security:fix-v-001-strcpy-overflow-jni-c-toxcore

Conversation

@orbisai0security
Copy link
Copy Markdown

Summary

Fix critical severity security issue in jni-c-toxcore/jni-c-toxcore.c.

Vulnerability

Field Value
ID V-001
Severity CRITICAL
Scanner multi_agent_ai
Rule V-001
File jni-c-toxcore/jni-c-toxcore.c:499

Description: At line 499 of jni-c-toxcore.c, strcpy(fmt_copy, fmt) copies a format string into a fixed-size buffer without any bounds checking. If the fmt parameter originates from network-supplied Tox protocol data (e.g., a peer-supplied message or format string), an attacker can supply a string longer than the destination buffer, overwriting adjacent stack or heap memory and potentially achieving arbitrary code execution on the Android device.

Changes

  • jni-c-toxcore/jni-c-toxcore.c

Verification

  • Build passes
  • Scanner re-scan confirms fix
  • LLM code review passed

Automated security fix by OrbisAI Security

Automated security fix generated by OrbisAI Security
@zoff99 zoff99 marked this pull request as draft May 19, 2026 12:44
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