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.01k stars 6.16k forks source link

[Coverity CID: 316244] Untrusted divisor in drivers/sensor/bme680/bme680.c #58583

Open zephyrbot opened 1 year ago

zephyrbot commented 1 year ago

Static code scan issues found in file:

https://github.com/zephyrproject-rtos/zephyr/tree/dae79cefaabf63086946a48ccca4094f26f146c8/drivers/sensor/bme680/bme680.c

Category: Insecure data handling Function: bme680_init Component: Drivers CID: 316244

Details:

https://github.com/zephyrproject-rtos/zephyr/blob/dae79cefaabf63086946a48ccca4094f26f146c8/drivers/sensor/bme680/bme680.c

Please fix or provide comments in coverity using the link:

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

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

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.

github-actions[bot] commented 11 months ago

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

fabiobaltieri commented 11 months ago

@MaureenHelm could you look into this? (not too sure what the error is, guess a potential divide by zero? The only ones I see are in bme680_calc_press, it's all a bit confusing)

github-actions[bot] commented 9 months ago

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.

ubieda commented 2 weeks ago

EDIT: I think I misunderstood the tool: this is not what coverity was outlining. I'm looking deeper now to understand. Apologies for any confusion!