In the Linux kernel, the following vulnerability has been resolved: ASoC: tlv320aic32x4: Prevent division by zero in divider callbacks A zero rate requested through clk_set_rate() or clk_round_rate() reaches clk_aic32x4_div_determine_rate() 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 determine_rate(). For example, if reading a parent divider's register fails, clk_aic32x4_div_recalc_rate() returns zero, which the clock framework caches as the parent's rate. A subsequent rate request for a child divider receives this value in best_parent_rate. 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 set_rate callback can receive a zero rate when an ancestor's rate changes. clk_calc_subtree() calculates descendant rates through recalc_rate() without calling their determine_rate callbacks. If reading a descendant divider's register fails, clk_aic32x4_div_recalc_rate() returns zero. This becomes the descendant's new_rate, which clk_change_rate() passes to clk_aic32x4_div_set_rate(), causing division by zero. Reject zero rates in both callbacks and reject a zero divisor in clk_aic32x4_div_determine_rate(). Found by Linux Verification Center (linuxtesting.org) with SVACE.
https://git.kernel.org/stable/c/eb2ce3e13f344b6916ab0e26100012453bc5f2d3
https://git.kernel.org/stable/c/ea0fbd5d0d0f532de2fad1bd342b02671bbdb580
https://git.kernel.org/stable/c/bef087dd545340aaa4e8db619b48573e268fee94
https://git.kernel.org/stable/c/ab0ab09f18dbd3f4b62ae557bd6723ff936e71f1
https://git.kernel.org/stable/c/8cf9607d2d855629260fc78e6b54ea7a98525708
https://git.kernel.org/stable/c/57ee418189f2ac4283e9f94c7d1c2f82d2e0cc1d
https://git.kernel.org/stable/c/0a71f66c8f3ee1f1592268d75766489e96c37525
https://git.kernel.org/stable/c/03ad686ff8963bd3db9b66cd26909cc07e618d22