Back

MEDIUM

iio: adc: ad7124: fix division by zero in ad7124_set_channel_odr()

Published Nov 9, 2024

Description

In the ad7124_write_raw() function, parameter val can potentially be zero. This may lead to a division by zero when DIV_ROUND_CLOSEST() is called within ad7124_set_channel_odr(). The ad7124_write_raw() function is invoked through the sequence: iio_write_channel_raw() -> iio_write_channel_attribute() -> iio_channel_write(), with no checks in place to ensure val is non-zero.

Affected products

Remediation

No remediation recorded yet.

Weaknesses (1)

References (11)

Change history (0)

No recorded changes yet.

Sources
CVE.org / MITRE
Status PUBLISHED
Assigner Linux
Published Nov 9, 2024
Updated May 11, 2026
Reserved Oct 21, 2024
CISA Vulnrichment
Updated Oct 1, 2025
NVD
Status Modified
Modified Jun 17, 2026
Red Hat
Severity Moderate
Public date Nov 9, 2024