# CVE-2024-39462: clk: bcm: dvp: Assign ->num before accessing ->hws

- Severity: Critical 9.8 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.01%, higher than 64% of CVEs (2026-12-01)
- Published: 2024-06-25T14:25:02.196Z
- Modified: 2026-06-17T07:41:57.760Z
- Weaknesses: CWE-400
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

clk: bcm: dvp: Assign ->num before accessing ->hws

Commit f316cdff8d67 ("clk: Annotate struct clk_hw_onecell_data with
__counted_by") annotated the hws member of 'struct clk_hw_onecell_data'
with __counted_by, which informs the bounds sanitizer about the number
of elements in hws, so that it can warn when hws is accessed out of
bounds. As noted in that change, the __counted_by member must be
initialized with the number of elements before the first array access
happens, otherwise there will be a warning from each access prior to the
initialization because the number of elements is zero. This occurs in
clk_dvp_probe() due to ->num being assigned after ->hws has been
accessed:

  UBSAN: array-index-out-of-bounds in drivers/clk/bcm/clk-bcm2711-dvp.c:59:2
  index 0 is out of range for type 'struct clk_hw *[] __counted_by(num)' (aka 'struct clk_hw *[]')

Move the ->num initialization to before the first access of ->hws, which
clears up the warning.

(As written by CVE List.)

## Affected

- Linux Linux: from f316cdff8d677db9ad9c90acb44c4cd535b0ee27 before 0dc913217fb79096597005bba9ba738e2db5cd02; from f316cdff8d677db9ad9c90acb44c4cd535b0ee27 before a1dd92fca0d6b58b55ed0484f75d4205dbb77010; from f316cdff8d677db9ad9c90acb44c4cd535b0ee27 before 9368cdf90f52a68120d039887ccff74ff33b4444; 6.6 (not affected: before 6.6; from 6.6.34 up to 6.6.*; from 6.9.5 up to 6.9.*; from 6.10 up to *)
- linux linux_kernel: 6.6; from f316cdff8d67 before 0dc913217fb7; from f316cdff8d67 before a1dd92fca0d6; from f316cdff8d67 before 9368cdf90f52; from 6.6 before 6.6.34; from 6.7 before 6.9.5 (not affected: before 6.6; from 6.6.34 up to 6.7; from 6.9.5 up to 6.10; 6.10-rc1)

## References

- <https://git.kernel.org/stable/c/0dc913217fb79096597005bba9ba738e2db5cd02> (patch)
- <https://git.kernel.org/stable/c/a1dd92fca0d6b58b55ed0484f75d4205dbb77010> (patch)
- <https://git.kernel.org/stable/c/9368cdf90f52a68120d039887ccff74ff33b4444> (patch)

## Sources

- CVE List: [CVE-2024-39462](https://www.cve.org/CVERecord?id=CVE-2024-39462), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2024-39462](https://nvd.nist.gov/vuln/detail/CVE-2024-39462), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-39462 · Whole record: https://cve.day/CVE-2024-39462.json · Rebuilt by cve.day 2026-11-25T22:58:42.224Z
