CVE-2025-40172: accel/qaic: Treat remaining == 0 as error in find_and_map_user_pages()
In the Linux kernel, the following vulnerability has been resolved:
accel/qaic: Treat remaining == 0 as error in find_and_map_user_pages()
Currently, if find_and_map_user_pages() takes a DMA xfer request from the
user with a length field set to 0, or in a rare case, the host receives
QAIC_TRANS_DMA_XFER_CONT from the device where resources->xferred_dma_size
is equal to the requested transaction size, the function will return 0
before allocating an sgt or setting the fields of the dma_xfer struct.
In that case, encode_addr_size_pairs() will try to access the sgt which
will lead to a general protection fault.
Return an EINVAL in case the user provides a zero-sized ALP, or the device
requests continuation after all of the bytes have been transferred.
Security readout for executives and security teams
Plain-English summary
A flaw in the Linux Qualcomm Cloud AI accelerator driver can crash the kernel when a zero-length DMA request, or an invalid device continuation, leaves transfer data uninitialized. Exploitation requires local access and interaction with the affected QAIC functionality, so exposure is concentrated on systems using this accelerator driver rather than all Linux hosts.
Executive priority
Prioritize affected multi-user, shared-compute, or accelerator hosts where untrusted users can access QAIC interfaces. Expedite normal kernel patching after confirming vendor applicability. Broad emergency action across systems without QAIC exposure is not supported by the supplied evidence.
Technical view
In find_and_map_user_pages(), a zero remaining length could return success without allocating the scatter-gather table or initializing dma_xfer fields. encode_addr_size_pairs() could then access the missing table and trigger a general protection fault. The correction rejects zero-sized ALP requests and continuation requests received after all bytes were transferred.
Likely exposure
Potentially exposed systems run an affected Linux kernel and provide access to the accel/qaic driver or relevant QAIC device interface. The supplied version data identifies several affected kernel releases but is not sufficient for reliably mapping every distribution kernel or backport. Systems without QAIC hardware or the active driver are less likely to be reachable.
Exploitation context
The CVSS vector describes a local, low-complexity attack requiring low privileges and no user interaction. The documented failure is a kernel general protection fault. The sources do not establish active exploitation, and the CVE is not identified as being in CISA KEV within the supplied bundle.
Researcher notes
The trigger involves an early successful return with remaining equal to zero, followed by use of an unallocated scatter-gather table. Two paths are described: a user-supplied zero-length transfer and an unexpected device continuation after completion. Public sources supplied here do not demonstrate exploitability beyond the documented fault or confirm exploitation in the wild.
Mitigation direction
Apply a vendor-supported kernel containing the referenced stable fix.
Check distribution advisories for backports and exact package versions.
Restrict untrusted local access to QAIC device interfaces until remediation.
Disable unused QAIC functionality where operationally safe and vendor-supported.
Validation and detection
Inventory kernel versions and identify systems using QAIC hardware or drivers.
Compare installed vendor packages with published CVE backport information.
Confirm the corrected input validation exists in the deployed kernel source or vendor changelog.
Review kernel logs for general protection faults involving QAIC transfer handling.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cve · low confidence lookup
CVE-2025-40172 mapping review
Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
0ADP providers
5Source links
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.