zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.04k stars 6.18k forks source link

[Coverity CID: 368788] Use of 32-bit time_t in drivers/net/nsos_adapt.c #74767

Open zephyrbot opened 2 weeks ago

zephyrbot commented 2 weeks ago

Static code scan issues found in file:

https://github.com/zephyrproject-rtos/zephyr/tree/dcf42917c550714d2457947538b9e29d083e872e/drivers/net/nsos_adapt.c

Category: High impact quality Function: nsos_adapt_setsockopt Component: Drivers CID: 368788

Details:

https://github.com/zephyrproject-rtos/zephyr/blob/dcf42917c550714d2457947538b9e29d083e872e/drivers/net/nsos_adapt.c

Please fix or provide comments in coverity using the link:

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

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

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.

nashif commented 5 days ago

@mniestroj can you please take a look?

mniestroj commented 4 days ago

@nashif Not sure what the issue really is here. Is there a chance to get more context or be able to login to Coverity for the details if this issue?

nashif commented 4 days ago

image

This is probably related to https://github.com/zephyrproject-rtos/zephyr/issues/69109

mniestroj commented 3 days ago

Since we are using host (Linux) side setsockopt(..., SO_SNDTIMEO, ...), we are not able to do anything with how time_t is defined and what arguments (struct timeval which wraps time_t) are passed here to setsockopt().

I think we should mark that particular issue as false-positive.