{"id":"CVE-2024-56684","state":"PUBLISHED","title":"mailbox: mtk-cmdq: fix wrong use of sizeof in cmdq_get_clocks()","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmailbox: mtk-cmdq: fix wrong use of sizeof in cmdq_get_clocks()\n\nIt should be size of the struct clk_bulk_data, not data pointer pass to\ndevm_kcalloc().","publishedAt":"2024-12-28T09:46:11.932Z","updatedAt":"2026-08-05T11:46:03.800Z","severity":{"score":8.4,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"aa1609f571caba0db102c611829d48adf226bb70","status":"affected","lessThan":"31986fad0cfdda8d8893230da04f5eb0774854d9","versionType":"git"},{"version":"aa1609f571caba0db102c611829d48adf226bb70","status":"affected","lessThan":"a9c7cb960fc6e056ebecebd136a127612b15630d","versionType":"git"},{"version":"aa1609f571caba0db102c611829d48adf226bb70","status":"affected","lessThan":"271ee263cc8771982809185007181ca10346fe73","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/mailbox/mtk-cmdq-mailbox.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.11","versionType":"semver"},{"version":"6.11.11","status":"unaffected","lessThanOrEqual":"6.11.*","versionType":"semver"},{"version":"6.12.2","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/mailbox/mtk-cmdq-mailbox.c"]}],"references":["https://git.kernel.org/stable/c/31986fad0cfdda8d8893230da04f5eb0774854d9","https://git.kernel.org/stable/c/a9c7cb960fc6e056ebecebd136a127612b15630d","https://git.kernel.org/stable/c/271ee263cc8771982809185007181ca10346fe73"],"weaknesses":[],"ingestedAt":"2026-10-29T20:08:12.933Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/56xxx/CVE-2024-56684.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-56684","state":"PUBLISHED","datePublished":"2024-12-28T09:46:11.932Z","dateUpdated":"2026-08-05T11:46:03.800Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-12-27T15:00:39.846Z"},"containers":{"cna":{"title":"mailbox: mtk-cmdq: fix wrong use of sizeof in cmdq_get_clocks()","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmailbox: mtk-cmdq: fix wrong use of sizeof in cmdq_get_clocks()\n\nIt should be size of the struct clk_bulk_data, not data pointer pass to\ndevm_kcalloc()."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"aa1609f571caba0db102c611829d48adf226bb70","status":"affected","lessThan":"31986fad0cfdda8d8893230da04f5eb0774854d9","versionType":"git"},{"version":"aa1609f571caba0db102c611829d48adf226bb70","status":"affected","lessThan":"a9c7cb960fc6e056ebecebd136a127612b15630d","versionType":"git"},{"version":"aa1609f571caba0db102c611829d48adf226bb70","status":"affected","lessThan":"271ee263cc8771982809185007181ca10346fe73","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/mailbox/mtk-cmdq-mailbox.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.11","versionType":"semver"},{"version":"6.11.11","status":"unaffected","lessThanOrEqual":"6.11.*","versionType":"semver"},{"version":"6.12.2","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.13","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/mailbox/mtk-cmdq-mailbox.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/31986fad0cfdda8d8893230da04f5eb0774854d9"},{"url":"https://git.kernel.org/stable/c/a9c7cb960fc6e056ebecebd136a127612b15630d"},{"url":"https://git.kernel.org/stable/c/271ee263cc8771982809185007181ca10346fe73"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":8.4,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The defect is in the MediaTek CMDQ mailbox platform driver's probe path (`cmdq_probe()` → `cmdq_get_clocks()`), reachable only on the local system when the driver binds to its DT node; there is no remote or network-facing path into this code.\nAC:L - The undersized `devm_kcalloc()` is exactly half the required size on every supported platform (gce_num 1 or 2, all arm64), so the out-of-bounds write occurs deterministically on every probe with no timing, layout, or state condition to win.\nPR:N - The heap corruption happens unconditionally during driver probe at boot on affected MediaTek SoCs, requiring no privileges or attacker interaction whatsoever; this matches the scoring of the equivalent probe-time allocation-size CVEs (CVE-2025-39869, CVE-2026-43274).\nUI:N - No victim action is needed — the driver probes automatically at boot on matching hardware, and the out-of-bounds reads recur on every runtime-resume and interrupt without any user involvement.\nS:U - The corruption is confined to kernel heap memory managed by the same kernel security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The half-sized array is subsequently read out of bounds by `clk_bulk_prepare()`/`clk_bulk_enable()`/`clk_bulk_unprepare()`, pulling a `struct clk *` from adjacent heap and dereferencing it; combined with the overlapping heap write this constitutes memory corruption leverageable for kernel memory disclosure.\nI:H - This is an out-of-bounds heap write of up to 16 bytes of pointer values (`clk_bulk_data.id` and `.clk`) past the end of the devres allocation, corrupting adjacent kernel objects — an OOB write is scored High.\nA:H - Corrupting the adjacent heap object and later dereferencing an out-of-bounds `struct clk *` in `clk_prepare()`/`clk_enable()` readily produces an oops or panic, and the overflow is flagged as slab-out-of-bounds under KASAN/SLUB redzoning."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:46:03.800Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.11","versionEndExcluding":"6.11.11"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.11","versionEndExcluding":"6.12.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.11","versionEndExcluding":"6.13"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}