{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2024-42249", "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "state": "PUBLISHED", "assignerShortName": "Linux", "dateReserved": "2024-07-30T07:40:12.255Z", "datePublished": "2024-08-07T15:14:33.418Z", "dateUpdated": "2026-08-05T11:36:03.625Z" }, "containers": { "cna": { "providerMetadata": { "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux", "dateUpdated": "2026-08-05T11:36:03.625Z" }, "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nspi: don't unoptimize message in spi_async()\n\nCalling spi_maybe_unoptimize_message() in spi_async() is wrong because\nthe message is likely to be in the queue and not transferred yet. This\ncan corrupt the message while it is being used by the controller driver.\n\nspi_maybe_unoptimize_message() is already called in the correct place\nin spi_finalize_current_message() to balance the call to\nspi_maybe_optimize_message() in spi_async()." } ], "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 SPI core and is reached by causing local SPI traffic — a `/dev/spidevB.C` SPI_IOC_MESSAGE ioctl behind spi-mux, IIO buffer enable, regmap-async firmware download via an ALSA device, or netdev TX on an SPI transceiver. No network protocol parses attacker data here, so exploitation requires local system access.\nAC:L - The attacker controls both sides of the race — they submit the `spi_async()` messages that queue the work and simultaneously trigger the unsynchronized teardown, and can repeat this thousands of times per second from multiple threads to widen the window and groom the freed slab. On spi-axi-spi-engine the free reliably wins, yielding a deterministic NULL deref of `msg->opt_state`.\nPR:L - An ordinary unprivileged local user suffices: spidev nodes are commonly group-readable/writable on embedded and SBC images, IIO buffer sysfs and ALSA PCM/firmware-download paths are similarly group-accessible, and CAN/802.15.4 socket TX drives `spi_async()` too. No root or capability in the init namespace is needed.\nUI:N - The attacker's own syscalls generate the SPI messages that race with the controller worker; no action by any other user is required.\nS:U - The corruption is confined to kernel slab memory and the SPI core's own data structures, all within the same security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - The use-after-free lets the controller read `tx_buf`/`rx_buf`/`len` out of a freed and reallocatable `struct spi_transfer`, so arbitrary kernel memory can be clocked out on the SPI bus and received data DMA'd to an attacker-influenced address; the freed spi-engine program is likewise pushed byte-for-byte into the hardware command FIFO.\nI:H - `spi_res_release()` can run twice on the same message (the unlocked `msg->optimized` check-and-clear races with `spi_finalize_current_message()`), giving a double free of a kmalloc'd object plus concurrent `list_splice`/`list_del` against live list traversal — SLUB freelist and linked-list corruption that yields a write primitive.\nA:H - In the common case the free wins and `spi_engine_transfer_one_message()` dereferences a NULL `msg->opt_state`, and list corruption or a restored oversized transfer likewise oopses the kernel — an immediate panic that an unprivileged user can trigger at will." } ] } ], "affected": [ { "product": "Linux", "vendor": "Linux", "defaultStatus": "unaffected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "drivers/spi/spi.c" ], "versions": [ { "version": "7b1d87af14d9ae902ed0c5dc5fabf4eea5abdf02", "lessThan": "8b9af6d67517ce4a0015928b3cf35bfd2b1bc1c2", "status": "affected", "versionType": "git" }, { "version": "7b1d87af14d9ae902ed0c5dc5fabf4eea5abdf02", "lessThan": "c86a918b1bdba78fb155184f8d88dfba1e63335d", "status": "affected", "versionType": "git" } ] }, { "product": "Linux", "vendor": "Linux", "defaultStatus": "affected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "drivers/spi/spi.c" ], "versions": [ { "version": "6.9", "status": "affected" }, { "version": "0", "lessThan": "6.9", "status": "unaffected", "versionType": "semver" }, { "version": "6.9.10", "lessThanOrEqual": "6.9.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.10", "lessThanOrEqual": "*", "status": "unaffected", "versionType": "original_commit_for_fix" } ] } ], "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" } ] } ] } ], "references": [ { "url": "https://git.kernel.org/stable/c/8b9af6d67517ce4a0015928b3cf35bfd2b1bc1c2" }, { "url": "https://git.kernel.org/stable/c/c86a918b1bdba78fb155184f8d88dfba1e63335d" } ], "title": "spi: don't unoptimize message in spi_async()", "x_generator": { "engine": "bippy-1.2.0" } }, "adp": [ { "metrics": [ { "other": { "type": "ssvc", "content": { "id": "CVE-2024-42249", "role": "CISA Coordinator", "options": [ { "Exploitation": "none" }, { "Automatable": "no" }, { "Technical Impact": "partial" } ], "version": "2.0.3", "timestamp": "2024-09-10T16:13:22.174843Z" } } } ], "title": "CISA ADP Vulnrichment", "providerMetadata": { "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "shortName": "CISA-ADP", "dateUpdated": "2024-09-11T17:34:30.786Z" } } ] } }