Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: counter: Fix possible out-of-bounds access in MCP7940N driver #84533

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Lefucjusz
Copy link
Contributor

This PR fixes the issue of possible out-of-bounds
access if write_data_block function was misused.

Size argument of the function was only validated
against the maximum allowed value, not the real
size of the data struct to be read, what could
cause accessing data past the boundary of the struct.

Should fix #81930.

This PR fixes the issue of possible out-of-bounds
access if write_data_block function was misused.

Size argument of the function was only validated
against the maximum allowed value, not the real
size of the data struct to be read, what could
cause accessing data past the boundary of the struct.

Should fix zephyrproject-rtos#81930.

Signed-off-by: Marcin Lyda <[email protected]>
@Lefucjusz Lefucjusz force-pushed the fix_mcp7940_out_of_bounds_access branch from 437f700 to 7c576ac Compare January 24, 2025 18:48
@Lefucjusz Lefucjusz changed the title drivers: rtc: Fix possible out-of-bounds access in MCP7940N driver drivers: counter: Fix possible out-of-bounds access in MCP7940N driver Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Coverity CID: 434686] Out-of-bounds access in drivers/counter/rtc_mcp7940n.c
3 participants