Skip to content

fix: the kernel driver uses sprintf() to write forma... in veye_gxcam.c#18

Open
orbisai0security wants to merge 1 commit into
veyeimaging:mainfrom
orbisai0security:fix-sysfs-sprintf-buffer-overflow-v001
Open

fix: the kernel driver uses sprintf() to write forma... in veye_gxcam.c#18
orbisai0security wants to merge 1 commit into
veyeimaging:mainfrom
orbisai0security:fix-sysfs-sprintf-buffer-overflow-v001

Conversation

@orbisai0security
Copy link
Copy Markdown

Summary

Fix high severity security issue in driver_source/cam_drv_src/rpi-6.12.y/veye_gxcam.c.

Vulnerability

Field Value
ID V-001
Severity HIGH
Scanner multi_agent_ai
Rule V-001
File driver_source/cam_drv_src/rpi-6.12.y/veye_gxcam.c:1415
CWE CWE-120

Description: The kernel driver uses sprintf() to write formatted strings into sysfs attribute buffers without bounds checking. The sysfs show function receives a PAGE_SIZE buffer, but sprintf() does not enforce this limit. If cam->camera_model contains a string longer than PAGE_SIZE due to corrupted I2C data from a malicious or faulty camera device, a kernel heap buffer overflow occurs. The modern kernel API sysfs_emit() or scnprintf() should be used instead.

Changes

  • driver_source/cam_drv_src/rpi-6.12.y/veye_gxcam.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
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