Skip to content

[Coverity CID: 434742] Out-of-bounds access in drivers/gnss/gnss_quectel_lcx6g.c #81905

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_quectel_lcx6g.c#L779

Category: Memory - corruptions
Function: quectel_lcx6g_init_chat
Component: Drivers
CID: 434742

Details:

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

773              .argv = data->chat_argv,
774              .argv_size = ARRAY_SIZE(data->chat_argv),
775              .unsol_matches = unsol_matches,
776              .unsol_matches_size = ARRAY_SIZE(unsol_matches),
777      };
778    
>>>     CID 434742:  Memory - corruptions  (OVERRUN)
>>>     Overrunning struct type modem_chat of 296 bytes by passing it to a function which accesses it at byte offset 311.
779      return modem_chat_init(&data->chat, &chat_config);
780     }
781    
782     static void quectel_lcx6g_init_pair_script(const struct device *dev)
783     {
784      struct quectel_lcx6g_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=434742

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