{"id":"CVE-2026-80748","state":"PUBLISHED","title":"mmc: loongson2: Fix sg iteration in data reorder functions","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmmc: loongson2: Fix sg iteration in data reorder functions\n\nIn ls2k0500_mmc_reorder_cmd_data() and ls2k2000_mmc_reorder_cmd_data(),\nthe for_each_sg() macro already iterates over the scatterlist entries,\nwith 'sg' pointing to the current entry. However, the code incorrectly\nuses '&sg[i]' and 'sg_dma_len(&sg[i])' inside the loop, which treats\n'sg' as an array base and indexes it again, leading to access of\nwrong sg entries (or out-of-bounds if the list is not an array).","publishedAt":"2026-09-03T08:26:29.532Z","updatedAt":"2026-09-04T04:58:28.127Z","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":"2115772014bdac368317e997ed15016cf2792665","status":"affected","lessThan":"8f7f7a6d5aed8f346a1c936fba02033c73a337dc","versionType":"git"},{"version":"2115772014bdac368317e997ed15016cf2792665","status":"affected","lessThan":"db368164383c46f256ed8152a41ae9300e615028","versionType":"git"},{"version":"2115772014bdac368317e997ed15016cf2792665","status":"affected","lessThan":"00179ed9fbe07799676e2cb63c4e7f0e7cd80a5c","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/mmc/host/loongson2-mmc.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.17","versionType":"semver"},{"version":"6.18.46","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.10","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","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/loongson2-mmc.c"]}],"references":["https://git.kernel.org/stable/c/8f7f7a6d5aed8f346a1c936fba02033c73a337dc","https://git.kernel.org/stable/c/db368164383c46f256ed8152a41ae9300e615028","https://git.kernel.org/stable/c/00179ed9fbe07799676e2cb63c4e7f0e7cd80a5c"],"weaknesses":[],"ingestedAt":"2026-10-29T20:13:07.220Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/80xxx/CVE-2026-80748.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-80748","state":"PUBLISHED","datePublished":"2026-09-03T08:26:29.532Z","dateUpdated":"2026-09-04T04:58:28.127Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-08-26T14:34:25.790Z"},"containers":{"cna":{"title":"mmc: loongson2: Fix sg iteration in data reorder functions","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmmc: loongson2: Fix sg iteration in data reorder functions\n\nIn ls2k0500_mmc_reorder_cmd_data() and ls2k2000_mmc_reorder_cmd_data(),\nthe for_each_sg() macro already iterates over the scatterlist entries,\nwith 'sg' pointing to the current entry. However, the code incorrectly\nuses '&sg[i]' and 'sg_dma_len(&sg[i])' inside the loop, which treats\n'sg' as an array base and indexes it again, leading to access of\nwrong sg entries (or out-of-bounds if the list is not an array)."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"2115772014bdac368317e997ed15016cf2792665","status":"affected","lessThan":"8f7f7a6d5aed8f346a1c936fba02033c73a337dc","versionType":"git"},{"version":"2115772014bdac368317e997ed15016cf2792665","status":"affected","lessThan":"db368164383c46f256ed8152a41ae9300e615028","versionType":"git"},{"version":"2115772014bdac368317e997ed15016cf2792665","status":"affected","lessThan":"00179ed9fbe07799676e2cb63c4e7f0e7cd80a5c","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/mmc/host/loongson2-mmc.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.17","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.17","versionType":"semver"},{"version":"6.18.46","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.10","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","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/loongson2-mmc.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/8f7f7a6d5aed8f346a1c936fba02033c73a337dc"},{"url":"https://git.kernel.org/stable/c/db368164383c46f256ed8152a41ae9300e615028"},{"url":"https://git.kernel.org/stable/c/00179ed9fbe07799676e2cb63c4e7f0e7cd80a5c"}],"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 flaw is in the Loongson-2K MMC host driver reached via local block I/O and MMC ioctls (SD writes trigger SD_APP_SEND_NUM_WR_BLKS; card init issues SD_SWITCH/SCR), not via any network protocol; it affects LoongArch desktops, kiosks, and embedded systems with SD/eMMC slots.\nAC:L - An attacker with SD-backed storage access can reliably drive the post-DMA reorder path on every qualifying transfer; the double-indexed for_each_sg bug deterministically accesses wrong scatterlist entries whenever sg_len exceeds one, without races or uncontrollable memory layout.\nPR:L - Any unprivileged local user writing to an SD-backed filesystem or opening the mmc block device can trigger the vulnerable reorder functions; no CAP_SYS_ADMIN, init-namespace root, or user-namespace capability is required.\nUI:N - Exploitation requires only the attacker's own writes, MMC_IOC_CMD ioctl sequences, or kernel auto-enumeration after SD insertion; no separate victim mount, login, or cooperative action is needed.\nS:U - Scatterlist mis-indexing corrupts kernel heap memory within the host kernel security boundary; this is standard local privilege-escalation impact, not VM escape, IOMMU bypass, or cross-container authority change.\nC:H - sg_virt(&sg[i]) on a mis-advanced pointer reads from wrong or out-of-bounds scatterlist entries, exposing adjacent kernel memory; out-of-bounds reads are rated High and can leak pointers usable for further exploitation.\nI:H - The reorder loop writes bitrev8x4/cpu_to_be32-transformed values through the mis-indexed scatterlist pointer, performing out-of-bounds kernel memory writes that can corrupt adjacent objects and enable arbitrary code execution.\nA:H - Corrupting adjacent kernel structures via the out-of-bounds scatterlist write can cause immediate kernel oops or panic; memory corruption bugs in interrupt context are rated High availability impact even when not fully weaponized."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-09-04T04:58:28.127Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.17","versionEndExcluding":"6.18.46"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.17","versionEndExcluding":"7.1.10"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.17","versionEndExcluding":"7.2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}