Skip to content

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

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#L147

Category: Memory - corruptions
Function: gnss_luatos_air530z_init_chat
Component: Drivers
CID: 434741

Details:

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

141              .argv = data->chat_argv,
142              .argv_size = ARRAY_SIZE(data->chat_argv),
143              .unsol_matches = unsol_matches,
144              .unsol_matches_size = ARRAY_SIZE(unsol_matches),
145      };
146    
>>>     CID 434741:  Memory - corruptions  (OVERRUN)
>>>     Overrunning struct type modem_chat of 296 bytes by passing it to a function which accesses it at byte offset 311.
147      return modem_chat_init(&data->chat, &chat_config);
148     }
149    
150     static void luatos_air530z_init_dynamic_script(const struct device *dev)
151     {
152      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=434741

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