drivers/eeprom: I2C EEPROM Read/Write Kernel Operations Crash#19476
Open
catalinv-ncc wants to merge 1 commit into
Open
Conversation
…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
force-pushed
the
bug/I2C_EEPROM_Read_Write_Kernel_Operations_May_Cause_Device_Crash
branch
from
July 19, 2026 00:03
bbf10d9 to
2cc67d7
Compare
1 task
xiaoxiang781216
approved these changes
Jul 19, 2026
Contributor
|
Are we sure the upper-half fs driver doesn't perform a null check? That would be a better place for this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.