CVE-2024-39462

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-39462
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-39462.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-39462
Downstream
Related
Published
2024-06-25T14:25:02Z
Modified
2025-10-17T07:45:11.985733Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
clk: bcm: dvp: Assign ->num before accessing ->hws
Details

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

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

Commit f316cdff8d67 ("clk: Annotate struct clkhwonecelldata with _countedby") annotated the hws member of 'struct clkhwonecelldata' with _countedby, 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 _countedby 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 clkdvpprobe() 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 clkhw *[] _countedby(num)' (aka 'struct clkhw *[]')

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

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
f316cdff8d677db9ad9c90acb44c4cd535b0ee27
Fixed
0dc913217fb79096597005bba9ba738e2db5cd02
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
f316cdff8d677db9ad9c90acb44c4cd535b0ee27
Fixed
a1dd92fca0d6b58b55ed0484f75d4205dbb77010
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
f316cdff8d677db9ad9c90acb44c4cd535b0ee27
Fixed
9368cdf90f52a68120d039887ccff74ff33b4444

Affected versions

v6.*

v6.5
v6.5-rc2
v6.5-rc3
v6.5-rc4
v6.5-rc5
v6.5-rc6
v6.5-rc7
v6.6
v6.6-rc1
v6.6-rc2
v6.6-rc3
v6.6-rc4
v6.6-rc5
v6.6-rc6
v6.6-rc7
v6.6.1
v6.6.10
v6.6.11
v6.6.12
v6.6.13
v6.6.14
v6.6.15
v6.6.16
v6.6.17
v6.6.18
v6.6.19
v6.6.2
v6.6.20
v6.6.21
v6.6.22
v6.6.23
v6.6.24
v6.6.25
v6.6.26
v6.6.27
v6.6.28
v6.6.29
v6.6.3
v6.6.30
v6.6.31
v6.6.32
v6.6.33
v6.6.4
v6.6.5
v6.6.6
v6.6.7
v6.6.8
v6.6.9
v6.7
v6.7-rc1
v6.7-rc2
v6.7-rc3
v6.7-rc4
v6.7-rc5
v6.7-rc6
v6.7-rc7
v6.7-rc8
v6.8
v6.8-rc1
v6.8-rc2
v6.8-rc3
v6.8-rc4
v6.8-rc5
v6.8-rc6
v6.8-rc7
v6.9
v6.9-rc1
v6.9-rc2
v6.9-rc3
v6.9-rc4
v6.9-rc5
v6.9-rc6
v6.9-rc7
v6.9.1
v6.9.2
v6.9.3
v6.9.4

Database specific

vanir_signatures

[
    {
        "signature_type": "Line",
        "target": {
            "file": "drivers/clk/bcm/clk-bcm2711-dvp.c"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0dc913217fb79096597005bba9ba738e2db5cd02",
        "deprecated": false,
        "id": "CVE-2024-39462-580d3093",
        "signature_version": "v1",
        "digest": {
            "line_hashes": [
                "338313242255175669823898800964851826523",
                "271131221636875338899059488140976668608",
                "171429801190507999582637033250929662541",
                "215265476618152484616288124192293029332",
                "94774563595580621174858485419273149380",
                "169337286119513084587323991679316601807",
                "179335528795556947924876998754968811522"
            ],
            "threshold": 0.9
        }
    },
    {
        "signature_type": "Line",
        "target": {
            "file": "drivers/clk/bcm/clk-bcm2711-dvp.c"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a1dd92fca0d6b58b55ed0484f75d4205dbb77010",
        "deprecated": false,
        "id": "CVE-2024-39462-72aa92de",
        "signature_version": "v1",
        "digest": {
            "line_hashes": [
                "338313242255175669823898800964851826523",
                "271131221636875338899059488140976668608",
                "171429801190507999582637033250929662541",
                "215265476618152484616288124192293029332",
                "94774563595580621174858485419273149380",
                "169337286119513084587323991679316601807",
                "179335528795556947924876998754968811522"
            ],
            "threshold": 0.9
        }
    },
    {
        "signature_type": "Function",
        "target": {
            "function": "clk_dvp_probe",
            "file": "drivers/clk/bcm/clk-bcm2711-dvp.c"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a1dd92fca0d6b58b55ed0484f75d4205dbb77010",
        "deprecated": false,
        "id": "CVE-2024-39462-97069ae7",
        "signature_version": "v1",
        "digest": {
            "length": 1618.0,
            "function_hash": "67677365452061051875375359504997336856"
        }
    },
    {
        "signature_type": "Line",
        "target": {
            "file": "drivers/clk/bcm/clk-bcm2711-dvp.c"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9368cdf90f52a68120d039887ccff74ff33b4444",
        "deprecated": false,
        "id": "CVE-2024-39462-bab0c214",
        "signature_version": "v1",
        "digest": {
            "line_hashes": [
                "338313242255175669823898800964851826523",
                "271131221636875338899059488140976668608",
                "171429801190507999582637033250929662541",
                "215265476618152484616288124192293029332",
                "94774563595580621174858485419273149380",
                "169337286119513084587323991679316601807",
                "179335528795556947924876998754968811522"
            ],
            "threshold": 0.9
        }
    },
    {
        "signature_type": "Function",
        "target": {
            "function": "clk_dvp_probe",
            "file": "drivers/clk/bcm/clk-bcm2711-dvp.c"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9368cdf90f52a68120d039887ccff74ff33b4444",
        "deprecated": false,
        "id": "CVE-2024-39462-ce073b28",
        "signature_version": "v1",
        "digest": {
            "length": 1618.0,
            "function_hash": "67677365452061051875375359504997336856"
        }
    },
    {
        "signature_type": "Function",
        "target": {
            "function": "clk_dvp_probe",
            "file": "drivers/clk/bcm/clk-bcm2711-dvp.c"
        },
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0dc913217fb79096597005bba9ba738e2db5cd02",
        "deprecated": false,
        "id": "CVE-2024-39462-f44cc7e7",
        "signature_version": "v1",
        "digest": {
            "length": 1618.0,
            "function_hash": "67677365452061051875375359504997336856"
        }
    }
]

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.6.0
Fixed
6.6.34
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.9.5