{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2023-53493", "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "state": "PUBLISHED", "assignerShortName": "Linux", "dateReserved": "2025-10-01T11:39:39.403Z", "datePublished": "2025-10-01T11:45:44.939Z", "dateUpdated": "2026-08-05T09:14:25.393Z" }, "containers": { "cna": { "providerMetadata": { "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux", "dateUpdated": "2026-08-05T09:14:25.393Z" }, "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\naccel/qaic: tighten bounds checking in decode_message()\n\nCopy the bounds checking from encode_message() to decode_message().\n\nThis patch addresses the following concerns. Ensure that there is\nenough space for at least one header so that we don't have a negative\nsize later.\n\n\tif (msg_hdr_len < sizeof(*trans_hdr))\n\nEnsure that we have enough space to read the next header from the\nmsg->data.\n\n\tif (msg_len > msg_hdr_len - sizeof(*trans_hdr))\n\t\treturn -EINVAL;\n\nCheck that the trans_hdr->len is not below the minimum size:\n\n\tif (hdr_len < sizeof(*trans_hdr))\n\nThis minimum check ensures that we don't corrupt memory in\ndecode_passthrough() when we do.\n\n\tmemcpy(out_trans->data, in_trans->data, len - sizeof(in_trans->hdr));\n\nAnd finally, use size_add() to prevent an integer overflow:\n\n\tif (size_add(msg_len, hdr_len) > msg_hdr_len)" } ], "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 malicious input is the MHI control-channel response emitted by the attached Qualcomm Cloud AI 100 PCIe/M.2 accelerator, so the attack originates from locally-attached hardware or firmware-compromised on-card QSM (the card executes untrusted tenant model workloads in cloud AI deployments), not from any network. This matches the kernel CNA precedent for analogous MHI host-driver bugs (CVE-2023-53598, CVE-2025-39790).\nAC:L - The device has complete, deterministic control over every byte of the response — magic number, sequence number, `hdr.len`, `hdr.count`, and each `wire_trans_hdr` — and `decode_message()` consumes it unconditionally; setting `trans_hdr->type = QAIC_TRANS_PASSTHROUGH_FROM_DEV` with `len = 0` reliably reaches the underflowed `memcpy()` every time, with no race, no timing window, and no memory-layout condition outside the attacker's influence.\nPR:N - No host account, credential, or capability is needed: `qaic_mhi_probe()` invokes `get_cntl_version()` → `decode_message()` automatically at device power-up, and `qaic_control_open()` installs `valid_crc_stub` so that first response's CRC is not even validated. A compromised device can also force re-entry by triggering an MHI SYS_ERROR/reset; on the user-driven path the `QAIC_MANAGE` ioctl carries flags `0` (no `DRM_ROOT_ONLY`, no `DRM_AUTH`), so an unprivileged holder of `/dev/accel/accelN` suffices.\nUI:N - The vulnerable decode runs from the MHI probe path and the control-response workqueue with no victim action required — no mount, no file open, no administrator step. Device enumeration and driver bring-up alone execute the parser.\nS:U - The out-of-bounds read and the unbounded `memcpy()` write both land in the host kernel's own heap, the same security authority as the vulnerable driver. No hypervisor, IOMMU, or sandbox boundary is crossed by the corruption itself.\nC:H - Without the `msg_len > msg_hdr_len - sizeof(*trans_hdr)` guard, `trans_hdr` is read past the end of the 4 KB `kmalloc()`'d (not zeroed) response buffer, and `decode_passthrough()` copies out-of-bounds source bytes into `user_msg->data`, which `qaic_manage_ioctl()` hands straight back via `copy_to_user()` — a direct kernel-heap disclosure primitive. The same underflowed copy also reads far beyond the source buffer.\nI:H - `memcpy(out_trans->data, in_trans->data, len - sizeof(in_trans->hdr))` with a device-supplied `len < 8` produces a size of ~2^64, giving an out-of-bounds heap write whose source contents are entirely device-controlled, into a destination that in the probe path is a ~32-byte allocation. That is a fully controlled slab overflow suitable for adjacent-object corruption and control-flow hijack.\nA:H - The underflowed `memcpy()` walks off the end of the slab and past the mapped heap, guaranteeing slab corruption, an oops, and a kernel panic; the missing `hdr_len` minimum also permits a zero-advance transaction loop. The attacking device can repeat this on every probe or reset, denying service permanently." } ] } ], "affected": [ { "product": "Linux", "vendor": "Linux", "defaultStatus": "unaffected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "drivers/accel/qaic/qaic_control.c" ], "versions": [ { "version": "129776ac2e38231fa9c02ce20e116c99de291666", "lessThan": "57d14cb3bae4619ce2fb5235cb318c3d5d8f53fd", "status": "affected", "versionType": "git" }, { "version": "129776ac2e38231fa9c02ce20e116c99de291666", "lessThan": "51b56382ed2a2b03347372272362b3baa623ed1e", "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/accel/qaic/qaic_control.c" ], "versions": [ { "version": "6.4", "status": "affected" }, { "version": "0", "lessThan": "6.4", "status": "unaffected", "versionType": "semver" }, { "version": "6.4.7", "lessThanOrEqual": "6.4.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.5", "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.4", "versionEndExcluding": "6.4.7" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.4", "versionEndExcluding": "6.5" } ] } ] } ], "references": [ { "url": "https://git.kernel.org/stable/c/57d14cb3bae4619ce2fb5235cb318c3d5d8f53fd" }, { "url": "https://git.kernel.org/stable/c/51b56382ed2a2b03347372272362b3baa623ed1e" } ], "title": "accel/qaic: tighten bounds checking in decode_message()", "x_generator": { "engine": "bippy-1.2.0" } } } }