{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-39462","id":"CVE-2024-39462","title":"clk: bcm: dvp: Assign ->num before accessing ->hws","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nclk: bcm: dvp: Assign ->num before accessing ->hws\n\nCommit f316cdff8d67 (\"clk: Annotate struct clk_hw_onecell_data with\n__counted_by\") annotated the hws member of 'struct clk_hw_onecell_data'\nwith __counted_by, which informs the bounds sanitizer about the number\nof elements in hws, so that it can warn when hws is accessed out of\n","descriptionLong":"In the Linux kernel, the following vulnerability has been resolved:\n\nclk: bcm: dvp: Assign ->num before accessing ->hws\n\nCommit f316cdff8d67 (\"clk: Annotate struct clk_hw_onecell_data with\n__counted_by\") annotated the hws member of 'struct clk_hw_onecell_data'\nwith __counted_by, which informs the bounds sanitizer about the number\nof elements in hws, so that it can warn when hws is accessed out of\nbounds. As noted in that change, the __counted_by member must be\ninitialized with the number of elements before the first array access\nhappens, otherwise there will be a warning from each access prior to the\ninitialization because the number of elements is zero. This occurs in\nclk_dvp_probe() due to ->num being assigned after ->hws has been\naccessed:\n\n  UBSAN: array-index-out-of-bounds in drivers/clk/bcm/clk-bcm2711-dvp.c:59:2\n  index 0 is out of range for type 'struct clk_hw *[] __counted_by(num)' (aka 'struct clk_hw *[]')\n\nMove the ->num initialization to before the first access of ->hws, which\nclears up the warning.","published":"2024-06-25T14:25:02.196Z","updated":"2026-10-28T02:30:54.958507675Z","reserved":"2024-06-25T14:23:23.744Z","status":"Analyzed","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"CISA-ADP"},"metrics":[{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"CISA-ADP"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"critical","source":"OSV"}],"rating":"critical","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"f316cdff8d677db9ad9c90acb44c4cd535b0ee27","lessThan":"0dc913217fb79096597005bba9ba738e2db5cd02","status":"affected","versionType":"git"},{"version":"f316cdff8d677db9ad9c90acb44c4cd535b0ee27","lessThan":"a1dd92fca0d6b58b55ed0484f75d4205dbb77010","status":"affected","versionType":"git"},{"version":"f316cdff8d677db9ad9c90acb44c4cd535b0ee27","lessThan":"9368cdf90f52a68120d039887ccff74ff33b4444","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.6","status":"affected"},{"version":"0","lessThan":"6.6","status":"unaffected","versionType":"semver"},{"version":"6.6.34","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.9.5","lessThanOrEqual":"6.9.*","status":"unaffected","versionType":"semver"},{"version":"6.10","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":["CWE-400"],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/0dc913217fb79096597005bba9ba738e2db5cd02","tags":["x_transferred","Patch","web"]},{"url":"https://git.kernel.org/stable/c/a1dd92fca0d6b58b55ed0484f75d4205dbb77010","tags":["x_transferred","Patch","web"]},{"url":"https://git.kernel.org/stable/c/9368cdf90f52a68120d039887ccff74ff33b4444","tags":["x_transferred","Patch","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/39xxx/CVE-2024-39462.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-39462","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"total"},"epss":0.01013,"epssPercentile":0.63937,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-39462","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-39462","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-39462","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-39462","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}