# CVE-2023-53778: accel/qaic: Clean up integer overflow checking in map\_user\_pages()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.22% (percentile 7, 2026-11-26)
- **Published:** 2025-12-09T00:00:34.074Z
- **Modified:** 2026-08-05T09:15:57.518Z

## Who should check

- Anyone running Linux \>= 129776ac2e38231fa9c02ce20e116c99de291666, \< d410a96e5cb8c1ec7049c83f2edcd8bbfaf5d9b3; \>= 129776ac2e38231fa9c02ce20e116c99de291666, \< 96d3c1cadedb6ae2e8965e19cd12caa244afbd9c
- Anyone running Linux 6.4

## Description

In the Linux kernel, the following vulnerability has been resolved:

accel/qaic: Clean up integer overflow checking in map\_user\_pages()

The encode\_dma() function has some validation on in\_trans-\>size but it
would be more clear to move those checks to find\_and\_map\_user\_pages().

The encode\_dma() had two checks:

	if (in\_trans-\>addr + in\_trans-\>size \< in\_trans-\>addr \|\| !in\_trans-\>size)
		return -EINVAL;

The in\_trans-\>addr variable is the starting address.  The in\_trans-\>size
variable is the total size of the transfer.  The transfer can occur in
parts and the resources-\>xferred\_dma\_size tracks how many bytes we have
already transferred.

This patch introduces a new variable "remaining" which represents the
amount we want to transfer (in\_trans-\>size) minus the amount we have
already transferred (resources-\>xferred\_dma\_size).

I have modified the check for if in\_trans-\>size is zero to instead check
if in\_trans-\>size is less than resources-\>xferred\_dma\_size.  If we have
already transferred more bytes than in\_trans-\>size then there are negative
bytes remaining which doesn't make sense.  If there are zero bytes
remaining to be copied, just return success.

The check in encode\_dma() checked that "addr + size" could not overflow
and barring a driver bug that should work, but it's easier to check if
we do this in parts.  First check that "in\_trans-\>addr +
resources-\>xferred\_dma\_size" is safe.  Then check that "xfer\_start\_addr +
remaining" is safe.

My final concern was that we are dealing with u64 values but on 32bit
systems the kmalloc() function will truncate the sizes to 32 bits.  So
I calculated "total = in\_trans-\>size + offset\_in\_page(xfer\_start\_addr);"
and returned -EINVAL if it were \>= SIZE\_MAX.  This will not affect 64bit
systems.

## Affected and fixed versions

- Linux: \>= 129776ac2e38231fa9c02ce20e116c99de291666, \< d410a96e5cb8c1ec7049c83f2edcd8bbfaf5d9b3; \>= 129776ac2e38231fa9c02ce20e116c99de291666, \< 96d3c1cadedb6ae2e8965e19cd12caa244afbd9c (cvelist)
- Linux: 6.4 (cvelist)

## Mitigation

- Upgrade Linux to 96d3c1cadedb6ae2e8965e19cd12caa244afbd9c or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-53778. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-53778.md
Affected: Linux >= 129776ac2e38231fa9c02ce20e116c99de291666, < d410a96e5cb8c1ec7049c83f2edcd8bbfaf5d9b3; >= 129776ac2e38231fa9c02ce20e116c99de291666, < 96d3c1cadedb6ae2e8965e19cd12caa244afbd9c; Linux 6.4
Fixed in: Linux 96d3c1cadedb6ae2e8965e19cd12caa244afbd9c

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-53778 being exploited?

There is no confirmed exploitation: CVE-2023-53778 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.22% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-53778?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2023-53778?

Linux \>= 129776ac2e38231fa9c02ce20e116c99de291666, \< d410a96e5cb8c1ec7049c83f2edcd8bbfaf5d9b3; \>= 129776ac2e38231fa9c02ce20e116c99de291666, \< 96d3c1cadedb6ae2e8965e19cd12caa244afbd9c; Linux 6.4.

### Is there a fix for CVE-2023-53778?

Yes. Fixed in Linux 96d3c1cadedb6ae2e8965e19cd12caa244afbd9c. Upgrade Linux to 96d3c1cadedb6ae2e8965e19cd12caa244afbd9c or later.

### How do I check if I'm affected by CVE-2023-53778?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/d410a96e5cb8c1ec7049c83f2edcd8bbfaf5d9b3>
- other: <https://git.kernel.org/stable/c/96d3c1cadedb6ae2e8965e19cd12caa244afbd9c>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-53778>

HTML: <https://flawdb.com/CVE-2023-53778> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-53778>
