Skip to content

fix: the py32io_gpio_direction_input() function acce... in py32ioexp.c#7

Open
orbisai0security wants to merge 1 commit into
m5stack:mainfrom
orbisai0security:fix-v006-gpio-direction-input-bounds-check
Open

fix: the py32io_gpio_direction_input() function acce... in py32ioexp.c#7
orbisai0security wants to merge 1 commit into
m5stack:mainfrom
orbisai0security:fix-v006-gpio-direction-input-bounds-check

Conversation

@orbisai0security
Copy link
Copy Markdown

Summary

Fix high severity security issue in modules/py32ioexp-1.0/py32ioexp.c.

Vulnerability

Field Value
ID V-006
Severity HIGH
Scanner multi_agent_ai
Rule V-006
File modules/py32ioexp-1.0/py32ioexp.c:373

Description: The py32io_gpio_direction_input() function accepts an unsigned offset parameter representing a GPIO pin number. If this offset is not validated against chip->ngpio before being used to index into internal arrays or I2C register maps, an out-of-bounds read or write can occur. A local user with access to the GPIO character device (/dev/gpiochipN) or sysfs GPIO interface can supply an out-of-range offset value to trigger this condition.

Changes

  • modules/py32ioexp-1.0/py32ioexp.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