Skip to content

[Coverity CID: 434733] Out-of-bounds access in drivers/gnss/gnss_luatos_air530z.c #81911

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

Closed
zephyrbot opened this issue Nov 25, 2024 · 1 comment
Assignees
Labels
area: GNSS bug The issue is a bug, or the PR is fixing a bug Coverity A Coverity detected issue or its fix priority: high High impact/importance bug

Comments

@zephyrbot
Copy link
Collaborator

Static code scan issues found in file:

https://github.com/zephyrproject-rtos/zephyr/tree/v4.0.0/drivers/gnss/gnss_luatos_air530z.c#L126

Category: Memory - corruptions
Function: gnss_luatos_air530z_init_pipe
Component: Drivers
CID: 434733

Details:

https://github.com/zephyrproject-rtos/zephyr/blob/v4.0.0/drivers/gnss/gnss_luatos_air530z.c#L126

120              .receive_buf = data->uart_backend_receive_buf,
121              .receive_buf_size = sizeof(data->uart_backend_receive_buf),
122              .transmit_buf = data->uart_backend_transmit_buf,
123              .transmit_buf_size = ARRAY_SIZE(data->uart_backend_transmit_buf),
124      };
125    
>>>     CID 434733:  Memory - corruptions  (OVERRUN)
>>>     Overrunning struct type modem_backend_uart of 200 bytes by passing it to a function which accesses it at byte offset 207.
126      data->uart_pipe = modem_backend_uart_init(&data->uart_backend, &uart_backend_config);
127     }
128    
129     static int gnss_luatos_air530z_init_chat(const struct device *dev)
130     {
131      struct gnss_luatos_air530z_data *data = dev->data;

For more information about the violation, check the Coverity Reference. (CWE-119)

Please fix or provide comments in coverity using the link:

https://scan9.scan.coverity.com/#/project-view/29271/12996?selectedIssue=434733

Note: This issue was created automatically. Priority was set based on classification
of the file affected and the impact field in coverity. Assignees were set using the MAINTAINERS file.

@zephyrbot zephyrbot added area: GNSS bug The issue is a bug, or the PR is fixing a bug Coverity A Coverity detected issue or its fix priority: high High impact/importance bug labels Nov 25, 2024
@zephyrbot
Copy link
Collaborator Author

This coverity CID is not in the outstanding issues anymore, code might have changed or issue was resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: GNSS bug The issue is a bug, or the PR is fixing a bug Coverity A Coverity detected issue or its fix priority: high High impact/importance bug
Projects
None yet
Development

No branches or pull requests

2 participants