CVE-2024-39461

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

MEDIUM
5.5
CVSS Score
Published: June 25, 2024 at 02:25 PM UTC
Updated: June 17, 2026 at 07:41 AM UTC
1 product affected across 1 vendorLinux Kernel

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.2%
SSVC
No known exploit

Description

In the Linux kernel, the following vulnerability has been resolved: clk: bcm: rpi: 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 raspberrypi_discover_clocks() due to ->num being assigned after ->hws has been accessed: UBSAN: array-index-out-of-bounds in drivers/clk/bcm/clk-raspberrypi.c:374:4 index 3 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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

6.6 ≤ v < 6.106.6 ≤ v < 6.6.346.6 ≤ v < 6.9.56.7 ≤ v < 6.9.56.6f316cdff8d677db9ad9c90acb44c4cd535b0ee27
Vendor states this is fixed in 6dc445c1905096b2ed4db1a84570375b4e00cc0f (fixed)
Vendor states this is fixed in 9562dbe5cdbb16ac887d27ef6f179980bb99193c (fixed)
Vendor states this is fixed in cdf9c7871d58d3df59d2775982e3533adb8ec920 (fixed)
Vendor states this is fixed in 6.10 (unaffected)
Vendor states this is fixed in 6.6 (unaffected)
Vendor states this is fixed in 6.6.34 (unaffected)
Vendor states this is fixed in 6.9.5 (unaffected)

References (3)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/6dc445c1905096b2ed4db1a84570375b4e00cc0f
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/9562dbe5cdbb16ac887d27ef6f179980bb99193c
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/cdf9c7871d58d3df59d2775982e3533adb8ec920

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-129

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card