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

[Coverity CID: 235917] Out-of-bounds read in /zephyr/include/generated/syscalls/log_msg2.h (Generated Code) #35609

Closed
zephyrbot opened this issue May 25, 2021 · 2 comments
Labels
bug The issue is a bug, or the PR is fixing a bug Coverity A Coverity detected issue or its fix priority: medium Medium impact/importance bug

Comments

@zephyrbot
Copy link
Collaborator

Static code scan issues found in file:

https:/zephyrproject-rtos/zephyr/tree/374629af906a24add294b1c3b945128cb6a486e8//zephyr/include/generated/syscalls/log_msg2.h#L1

Category: Memory - illegal accesses
Function: z_log_msg2_runtime_vcreate
Component: Other
CID: 235917

Details:

41     #ifdef CONFIG_USERSPACE
42         if (z_syscall_trap()) {
43             uintptr_t more[] = {
44                 *(uintptr_t *)&fmt,
45                 *(uintptr_t *)&ap
46             };
>>>     CID 235917:  Memory - illegal accesses  (OVERRUN)
>>>     Overrunning array of 1 bytes at byte offset 3 by dereferencing pointer "(uintptr_t *)&level".
47             arch_syscall_invoke6(*(uintptr_t *)&domain_id, *(uintptr_t *)&source, *(uintptr_t *)&level, *(uintptr_t *)&data, *(uintptr_t *)&dlen, (uintptr_t) &more, K_SYSCALL_Z_LOG_MSG2_RUNTIME_VCREATE);
48             return;
49         }
50     #endif
51         compiler_barrier();
52         z_impl_z_log_msg2_runtime_vcreate(domain_id, source, level, data, dlen, fmt, ap);

Please fix or provide comments in coverity using the link:

https://scan9.coverity.com/reports.htm#v29271/p12996

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 CODEOWNERS file.

@zephyrbot zephyrbot added bug The issue is a bug, or the PR is fixing a bug Coverity A Coverity detected issue or its fix priority: medium Medium impact/importance bug labels May 25, 2021
@nashif
Copy link
Member

nashif commented May 25, 2021

see #35633

@nashif nashif closed this as completed May 25, 2021
@nashif
Copy link
Member

nashif commented May 25, 2021

see #35633

@nashif nashif reopened this May 25, 2021
@nashif nashif closed this as completed May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug Coverity A Coverity detected issue or its fix priority: medium Medium impact/importance bug
Projects
None yet
Development

No branches or pull requests

2 participants