CVE-2026-99944: ASoC: tlv320aic32x4: Prevent division by zero in divider callbacks
In the Linux kernel, the following vulnerability has been resolved:
ASoC: tlv320aic32x4: Prevent division by zero in divider callbacks
A zero rate requested through clksetrate() or clkroundrate() reaches clkaic32x4divdeterminerate() when the minimum rate is zero. Clamping the requested rate to the allowed range leaves it unchanged, causing division by zero when calculating the divisor.
A zero parent rate can also cause division by zero in determinerate(). For example, if reading a parent divider's register fails, clkaic32x4divrecalcrate() returns zero, which the clock framework caches as the parent's rate. A subsequent rate request for a child divider receives this value in bestparentrate. With a nonzero requested rate, the calculated divisor is zero. It passes the existing upper-bound check and causes division by zero in the resulting rate calculation.
The setrate callback can receive a zero rate when an ancestor's rate changes. clkcalcsubtree() calculates descendant rates through recalcrate() without calling their determinerate callbacks. If reading a descendant divider's register fails, clkaic32x4divrecalcrate() returns zero. This becomes the descendant's newrate, which clkchangerate() passes to clkaic32x4divsetrate(), causing division by zero.
Reject zero rates in both callbacks and reject a zero divisor in clkaic32x4divdeterminerate().
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In the tlv320aic32x4 divider callbacks, reject zero rates in both determine_rate() and set_rate(), and reject a zero divisor in clk_aic32x4_div_determine_rate() when the minimum rate is zero.