Skip to content

drivers/eeprom: I2C EEPROM Read/Write Kernel Operations Crash#19476

Open
catalinv-ncc wants to merge 1 commit into
apache:masterfrom
catalinv-ncc:bug/I2C_EEPROM_Read_Write_Kernel_Operations_May_Cause_Device_Crash
Open

drivers/eeprom: I2C EEPROM Read/Write Kernel Operations Crash#19476
catalinv-ncc wants to merge 1 commit into
apache:masterfrom
catalinv-ncc:bug/I2C_EEPROM_Read_Write_Kernel_Operations_May_Cause_Device_Crash

Conversation

@catalinv-ncc

Copy link
Copy Markdown
Contributor

Summary

Stops kernel from crashing when a user land process calls the driver with a
NULL buffer. Full details in the issue: #19473

While this fixes the issue with a typical NULL pointer, fundamentally this will be
addressed with the implementation of access_ok().

https://man7.org/linux/man-pages/man2/access.2.html

Impact

If user passes NULL as buffer, the driver may crash. This is problematic for NuttX
protected and kernel builds.

Testing

Builds ok.

@catalinv-ncc
catalinv-ncc requested a review from acassis as a code owner July 19, 2026 00:00
@github-actions github-actions Bot added Area: Drivers Drivers issues Size: S The size of the change in this PR is small labels Jul 19, 2026
…e Crash

If user passes NULL as buffer, the driver may crash. This is problematic
for NuttX protected and kernel builds.

Details in the issue: apache#19473

While this fixes the issue with a typical NULL pointer, fundamentally this
will be addressed with the implementation of access_ok().

https://man7.org/linux/man-pages/man2/access.2.html

Signed-off-by: Catalin Visinescu <catalin_visinescu@yahoo.com>
@catalinv-ncc
catalinv-ncc force-pushed the bug/I2C_EEPROM_Read_Write_Kernel_Operations_May_Cause_Device_Crash branch from bbf10d9 to 2cc67d7 Compare July 19, 2026 00:03
@github-actions

Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

@linguini1

Copy link
Copy Markdown
Contributor

Are we sure the upper-half fs driver doesn't perform a null check? That would be a better place for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Drivers Drivers issues Size: S The size of the change in this PR is small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] I2C EEPROM Read/Write Kernel Operations May Cause a Device Crash

3 participants