clk: samsung: Fix UBSAN panic in samsung_clk_init()
Published Apr 18, 2025
5.5
MEDIUMCVSS 3.1
EPSS 0.28%
Description
With UBSAN_ARRAY_BOUNDS=y, I'm hitting the below panic due to dereferencing `ctx->clk_data.hws` before setting `ctx->clk_data.num = nr_clks`. Move that up to fix the crash.
UBSAN: array index out of bounds: 00000000f2005512 [#1] PREEMPT SMP <snip> Call trace: samsung_clk_init+0x110/0x124 (P) samsung_clk_init+0x48/0x124 (L) samsung_cmu_register_one+0x3c/0xa0 exynos_arm64_register_cmu+0x54/0x64 __gs101_cmu_top_of_clk_init_declare+0x28/0x60 ...
Affected products
-
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version StatusaffectedConstraints
- Version
-
- Version 5.5StatusaffectedConstraints-
- Version 0StatusunaffectedConstraints<5.5
- Version 5.10.236StatusunaffectedConstraints<=5.10.*
- Version 5.15.180StatusunaffectedConstraints<=5.15.*
- Version 6.1.134StatusunaffectedConstraints<=6.1.*
- Version 6.12.23StatusunaffectedConstraints<=6.12.*
- Version 6.13.11StatusunaffectedConstraints<=6.13.*
- Version 6.14.2StatusunaffectedConstraints<=6.14.*
- Version 6.15StatusunaffectedConstraints<=*
- Version 6.6.87StatusunaffectedConstraints<=6.6.*
- Version
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
| Vendor | Product | Default status | Versions | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Linux | Linux | unaffected |
| |||||||||||||||||||||||||||||||||
| Linux | Linux | affected |
|
- ≥ 5.5 · < 5.10.236
- ≥ 5.11 · < 5.15.180
- ≥ 5.16 · < 6.1.134
- ≥ 6.2 · < 6.6.87
- ≥ 6.7 · < 6.12.23
- ≥ 6.13 · < 6.13.11
- ≥ 6.14 · < 6.14.2
No data.
Red Hat Enterprise Linux 10
kernel
Not affected
Red Hat Enterprise Linux 6
kernel
Not affected
Red Hat Enterprise Linux 7
kernel
Not affected
Red Hat Enterprise Linux 7
kernel-rt
Not affected
Red Hat Enterprise Linux 8
kernel
Not affected
Red Hat Enterprise Linux 8
kernel-rt
Not affected
Red Hat Enterprise Linux 9
kernel
Not affected
Red Hat Enterprise Linux 9
kernel-rt
Not affected
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 10 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 6 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 7 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 7 | kernel-rt | Not affected | n/a |
| Red Hat Enterprise Linux 8 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 8 | kernel-rt | Not affected | n/a |
| Red Hat Enterprise Linux 9 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 9 | kernel-rt | Not affected | n/a |
No package ranges for this CVE.
Remediation
No remediation recorded yet.
References (15)
- https://access.redhat.com/security/cve/CVE-2025-39728 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=2360932 Issue Tracking
- https://git.kernel.org/stable/c/00307934eb94aaa0a99addfb37b9fe206f945004 Patch
- https://git.kernel.org/stable/c/0fef48f4a70e45a93e73c39023c3a6ea624714d6 Patch
- https://git.kernel.org/stable/c/157de9e48007a20c65d02fc0229a16f38134a72d Patch
- https://git.kernel.org/stable/c/24307866e0ac0a5ddb462e766ceda5e27a6fbbe3 Patch
- https://git.kernel.org/stable/c/4d29a6dcb51e346595a15b49693eeb728925ca43 Patch
- https://git.kernel.org/stable/c/a1500b98cd81a32fdfb9bc63c33bb9f0c2a0a1bf Patch
- https://git.kernel.org/stable/c/d19d7345a7bcdb083b65568a11b11adffe0687af Patch
- https://git.kernel.org/stable/c/d974e177369c034984cece9d7d4fada9f8b9c740 Patch
- https://lists.debian.org/debian-lts-announce/2025/05/msg00030.html
- https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html
- https://lore.kernel.org/linux-cve-announce/2025041820-CVE-2025-39728-8713@gregkh/T
- https://nvd.nist.gov/vuln/detail/CVE-2025-39728
- https://www.cve.org/CVERecord?id=CVE-2025-39728
Change history (0)
No recorded changes yet.