{"id":"CVE-2024-41026","state":"PUBLISHED","title":"mmc: davinci_mmc: Prevent transmitted data size from exceeding sgm's length","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nmmc: davinci_mmc: Prevent transmitted data size from exceeding sgm's length\n\nNo check is done on the size of the data to be transmiited. This causes\na kernel panic when this size exceeds the sg_miter's length.\n\nLimit the number of transmitted bytes to sgm->length.","publishedAt":"2024-07-29T14:31:43.056Z","updatedAt":"2026-08-05T11:34:48.544Z","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":"ed01d210fd910f7fa7933638df14ffb8d4aac2a9","status":"affected","lessThan":"c561c4ecce712f94b442db5960e281f13b28df2e","versionType":"git"},{"version":"ed01d210fd910f7fa7933638df14ffb8d4aac2a9","status":"affected","lessThan":"16198eef11c1929374381d7f6271b4bf6aa44615","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/mmc/host/davinci_mmc.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.9","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.9","versionType":"semver"},{"version":"6.9.10","status":"unaffected","lessThanOrEqual":"6.9.*","versionType":"semver"},{"version":"6.10","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/davinci_mmc.c"]}],"references":["https://git.kernel.org/stable/c/c561c4ecce712f94b442db5960e281f13b28df2e","https://git.kernel.org/stable/c/16198eef11c1929374381d7f6271b4bf6aa44615"],"weaknesses":[],"ingestedAt":"2026-10-29T20:07:39.287Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2024/41xxx/CVE-2024-41026.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-41026","state":"PUBLISHED","datePublished":"2024-07-29T14:31:43.056Z","dateUpdated":"2026-08-05T11:34:48.544Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2024-07-12T12:17:45.616Z"},"containers":{"cna":{"title":"mmc: davinci_mmc: Prevent transmitted data size from exceeding sgm's length","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nmmc: davinci_mmc: Prevent transmitted data size from exceeding sgm's length\n\nNo check is done on the size of the data to be transmiited. This causes\na kernel panic when this size exceeds the sg_miter's length.\n\nLimit the number of transmitted bytes to sgm->length."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"ed01d210fd910f7fa7933638df14ffb8d4aac2a9","status":"affected","lessThan":"c561c4ecce712f94b442db5960e281f13b28df2e","versionType":"git"},{"version":"ed01d210fd910f7fa7933638df14ffb8d4aac2a9","status":"affected","lessThan":"16198eef11c1929374381d7f6271b4bf6aa44615","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/mmc/host/davinci_mmc.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"6.9","status":"affected"},{"version":"0","status":"unaffected","lessThan":"6.9","versionType":"semver"},{"version":"6.9.10","status":"unaffected","lessThanOrEqual":"6.9.*","versionType":"semver"},{"version":"6.10","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/davinci_mmc.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/c561c4ecce712f94b442db5960e281f13b28df2e"},{"url":"https://git.kernel.org/stable/c/16198eef11c1929374381d7f6271b4bf6aa44615"}],"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 PIO path is reached through local device I/O — `MMC_IOC_CMD`/`MMC_IOC_MULTI_CMD` on the mmcblk block device or the RPMB character device — with no network or physical component required. No remote or adjacent-network protocol touches this driver.\nAC:L - The attacker deterministically selects `blksz`/`blocks` so that `blocks*blksz` is not a multiple of `rw_threshold`, which forces the PIO fallback in `mmc_davinci_prepare_data()` and makes the unclamped 32-byte priming transfer overrun a smaller scatterlist chunk on the first attempt. There is no race, no memory-layout guess, and no condition outside the attacker's control.\nPR:L - `mmc_rpmb_ioctl()` dispatches `MMC_IOC_CMD` into `mmc_blk_ioctl_cmd()` without any `capable()` check, so any user holding an open descriptor to `/dev/mmcblk*rpmb` — routinely group-accessible on embedded and Android-class deployments of this SoC family — can drive arbitrary `blksz`/`blocks` transfers. No administrative capability is needed on that path.\nUI:N - The attacker issues the ioctl directly against an already-present card; no victim action, card insertion, or mount is required.\nS:U - The out-of-bounds access corrupts and discloses kernel heap memory within the same kernel security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - In the write direction the driver reads far past the end of the kmalloc'd/kmapped buffer and streams that kernel memory into the MMC data register, and the underflowed `bytes_left`/`__remaining` turn this into an effectively unbounded sequential read of kernel memory (data landing inside the programmed transfer window is persisted to attacker-controlled card storage and read back). This is not a bounded few-byte leak.\nI:H - The same missing clamp in the read direction writes card-supplied bytes past the destination chunk, and once `sg_miter`'s `__remaining`/`__offset` and `host->bytes_left` underflow the driver writes attacker-influenced data far beyond the mapped page — an out-of-bounds heap write suitable for corrupting adjacent slab objects.\nA:H - The commit message states outright that exceeding the sg_miter length causes a kernel panic; the underflowed `host->bytes_left` also drives a multi-gigabyte copy loop in hard IRQ context that faults off the end of the mapping, giving a reliable oops/lockup."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T11:34:48.544Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.9","versionEndExcluding":"6.9.10"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.9","versionEndExcluding":"6.10"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/c561c4ecce712f94b442db5960e281f13b28df2e","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/16198eef11c1929374381d7f6271b4bf6aa44615","tags":["x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T04:39:56.171Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-41026","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-09-10T16:24:09.083090Z"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2024-09-11T17:34:04.488Z"}}]}}}