CVE-2024-39461
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
25/06/2024
Last modified:
03/09/2024
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
clk: bcm: rpi: Assign ->num before accessing ->hws<br />
<br />
Commit f316cdff8d67 ("clk: Annotate struct clk_hw_onecell_data with<br />
__counted_by") annotated the hws member of &#39;struct clk_hw_onecell_data&#39;<br />
with __counted_by, which informs the bounds sanitizer about the number<br />
of elements in hws, so that it can warn when hws is accessed out of<br />
bounds. As noted in that change, the __counted_by member must be<br />
initialized with the number of elements before the first array access<br />
happens, otherwise there will be a warning from each access prior to the<br />
initialization because the number of elements is zero. This occurs in<br />
raspberrypi_discover_clocks() due to ->num being assigned after ->hws<br />
has been accessed:<br />
<br />
UBSAN: array-index-out-of-bounds in drivers/clk/bcm/clk-raspberrypi.c:374:4<br />
index 3 is out of range for type &#39;struct clk_hw *[] __counted_by(num)&#39; (aka &#39;struct clk_hw *[]&#39;)<br />
<br />
Move the ->num initialization to before the first access of ->hws, which<br />
clears up the warning.
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.6 (including) | 6.6.34 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.7 (including) | 6.9.5 (excluding) |
To consult the complete list of CPE names with products and versions, see this page



