{"id":"CVE-2025-38401","state":"PUBLISHED","title":"mtk-sd: Prevent memory corruption from DMA map failure","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmtk-sd: Prevent memory corruption from DMA map failure\n\nIf msdc_prepare_data() fails to map the DMA region, the request is\nnot prepared for data receiving, but msdc_start_data() proceeds\nthe DMA with previous setting.\nSince this will lead a memory corruption, we have to stop the\nrequest operation soon after the msdc_prepare_data() fails to\nprepare it.","publishedAt":"2025-07-25T12:53:44.961Z","updatedAt":"2026-08-05T12:01:37.420Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/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":"208489032bdd8d4a7de50f3057c175058f271956","status":"affected","lessThan":"5ac9e9e2e9cd6247d8c2d99780eae4556049e1cc","versionType":"git"},{"version":"208489032bdd8d4a7de50f3057c175058f271956","status":"affected","lessThan":"d54771571f74a82c59830a32e76af78a8e57ac69","versionType":"git"},{"version":"208489032bdd8d4a7de50f3057c175058f271956","status":"affected","lessThan":"48bf4f3dfcdab02b22581d8e350a2d23130b72c0","versionType":"git"},{"version":"208489032bdd8d4a7de50f3057c175058f271956","status":"affected","lessThan":"63e8953f16acdcb23e2d4dd8a566d3c34df3e200","versionType":"git"},{"version":"208489032bdd8d4a7de50f3057c175058f271956","status":"affected","lessThan":"61cdd663564674ea21ceb50aa9d3697cbe9e45f9","versionType":"git"},{"version":"208489032bdd8d4a7de50f3057c175058f271956","status":"affected","lessThan":"3419bc6a7b65cbbb91417bb9970208478e034c79","versionType":"git"},{"version":"208489032bdd8d4a7de50f3057c175058f271956","status":"affected","lessThan":"a5f5f67b284d81776d4a3eb1f8607e4b7f91f11c","versionType":"git"},{"version":"208489032bdd8d4a7de50f3057c175058f271956","status":"affected","lessThan":"f5de469990f19569627ea0dd56536ff5a13beaa3","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/mmc/host/mtk-sd.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.2","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.2","versionType":"semver"},{"version":"5.4.296","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.240","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.187","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.144","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.97","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.37","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.15.6","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/mmc/host/mtk-sd.c"]}],"references":["https://git.kernel.org/stable/c/5ac9e9e2e9cd6247d8c2d99780eae4556049e1cc","https://git.kernel.org/stable/c/d54771571f74a82c59830a32e76af78a8e57ac69","https://git.kernel.org/stable/c/48bf4f3dfcdab02b22581d8e350a2d23130b72c0","https://git.kernel.org/stable/c/63e8953f16acdcb23e2d4dd8a566d3c34df3e200","https://git.kernel.org/stable/c/61cdd663564674ea21ceb50aa9d3697cbe9e45f9","https://git.kernel.org/stable/c/3419bc6a7b65cbbb91417bb9970208478e034c79","https://git.kernel.org/stable/c/a5f5f67b284d81776d4a3eb1f8607e4b7f91f11c","https://git.kernel.org/stable/c/f5de469990f19569627ea0dd56536ff5a13beaa3","https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html","https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/38xxx/CVE-2025-38401.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-38401","state":"PUBLISHED","datePublished":"2025-07-25T12:53:44.961Z","dateUpdated":"2026-08-05T12:01:37.420Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T04:51:24.012Z"},"containers":{"cna":{"title":"mtk-sd: Prevent memory corruption from DMA map failure","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmtk-sd: Prevent memory corruption from DMA map failure\n\nIf msdc_prepare_data() fails to map the DMA region, the request is\nnot prepared for data receiving, but msdc_start_data() proceeds\nthe DMA with previous setting.\nSince this will lead a memory corruption, we have to stop the\nrequest operation soon after the msdc_prepare_data() fails to\nprepare it."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"208489032bdd8d4a7de50f3057c175058f271956","status":"affected","lessThan":"5ac9e9e2e9cd6247d8c2d99780eae4556049e1cc","versionType":"git"},{"version":"208489032bdd8d4a7de50f3057c175058f271956","status":"affected","lessThan":"d54771571f74a82c59830a32e76af78a8e57ac69","versionType":"git"},{"version":"208489032bdd8d4a7de50f3057c175058f271956","status":"affected","lessThan":"48bf4f3dfcdab02b22581d8e350a2d23130b72c0","versionType":"git"},{"version":"208489032bdd8d4a7de50f3057c175058f271956","status":"affected","lessThan":"63e8953f16acdcb23e2d4dd8a566d3c34df3e200","versionType":"git"},{"version":"208489032bdd8d4a7de50f3057c175058f271956","status":"affected","lessThan":"61cdd663564674ea21ceb50aa9d3697cbe9e45f9","versionType":"git"},{"version":"208489032bdd8d4a7de50f3057c175058f271956","status":"affected","lessThan":"3419bc6a7b65cbbb91417bb9970208478e034c79","versionType":"git"},{"version":"208489032bdd8d4a7de50f3057c175058f271956","status":"affected","lessThan":"a5f5f67b284d81776d4a3eb1f8607e4b7f91f11c","versionType":"git"},{"version":"208489032bdd8d4a7de50f3057c175058f271956","status":"affected","lessThan":"f5de469990f19569627ea0dd56536ff5a13beaa3","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/mmc/host/mtk-sd.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.2","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.2","versionType":"semver"},{"version":"5.4.296","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.240","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.187","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.144","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.97","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.37","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.15.6","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/mmc/host/mtk-sd.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/5ac9e9e2e9cd6247d8c2d99780eae4556049e1cc"},{"url":"https://git.kernel.org/stable/c/d54771571f74a82c59830a32e76af78a8e57ac69"},{"url":"https://git.kernel.org/stable/c/48bf4f3dfcdab02b22581d8e350a2d23130b72c0"},{"url":"https://git.kernel.org/stable/c/63e8953f16acdcb23e2d4dd8a566d3c34df3e200"},{"url":"https://git.kernel.org/stable/c/61cdd663564674ea21ceb50aa9d3697cbe9e45f9"},{"url":"https://git.kernel.org/stable/c/3419bc6a7b65cbbb91417bb9970208478e034c79"},{"url":"https://git.kernel.org/stable/c/a5f5f67b284d81776d4a3eb1f8607e4b7f91f11c"},{"url":"https://git.kernel.org/stable/c/f5de469990f19569627ea0dd56536ff5a13beaa3"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable path is the MMC/SD block request path reached through ordinary local file or block-device I/O on the eMMC/SD device; no network or remote peer is involved.\nAC:L - The only precondition is a dma_map_sg() failure, which a local attacker directly induces by exhausting swiotlb bounce buffers, a restricted-dma-pool, or M4U IOVA space with concurrent large O_DIRECT I/O and memory pressure, then reliably lands the corrupt transfer since every subsequent request re-arms the stale BD ring.\nPR:L - Any unprivileged local user can submit MMC requests simply by reading/writing files on the eMMC- or SD-backed filesystem and can generate the DMA-resource pressure needed; no capability or root check exists anywhere on the path.\nUI:N - The corrupt DMA is started by the driver itself as soon as a mapping failure occurs during normal I/O; no victim action is required.\nS:U - The corruption is device DMA into kernel memory managed by the same kernel security authority; no VM, sandbox, or IOMMU translation boundary is crossed.\nC:H - On write transfers the controller streams the contents of stale, already-unmapped and potentially reallocated kernel pages out to the SD/eMMC medium, and the resulting corruption is leverageable for broader kernel memory disclosure.\nI:H - On read transfers the hardware writes attacker-supplied card data into freed/reused kernel memory at stale physical addresses, an uncontrolled kernel write primitive suitable for control-flow hijacking — the commit itself states this \"will lead a memory corruption\".\nA:H - The mismatched descriptor state triggers DMA protect/checksum errors and data timeouts, and DMA into reallocated kernel memory readily produces oopses and panics."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:01:37.420Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.2","versionEndExcluding":"5.4.296"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.2","versionEndExcluding":"5.10.240"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.2","versionEndExcluding":"5.15.187"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.2","versionEndExcluding":"6.1.144"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.2","versionEndExcluding":"6.6.97"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.2","versionEndExcluding":"6.12.37"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.2","versionEndExcluding":"6.15.6"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.2","versionEndExcluding":"6.16"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html"},{"url":"https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html"}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2025-11-03T17:37:35.519Z"}}]}}}