CVE-2023-53778
Last modified
CVE-2023-53778 is a high-severity vulnerability rated 7.8/10 on the CVSS scale. 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. EPSS estimates a 0.17% chance of exploitation in the next 30 days.
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.
Metrics
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Affected Software
Source: CNA advisory (CVE.org). NVD analysis pending.
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | >= 129776ac2e38231fa9c02ce20e116c99de291666, < d410a96e5cb8c1ec7049c83f2edcd8bbfaf5d9b3; >= 129776ac2e38231fa9c02ce20e116c99de291666, < 96d3c1cadedb6ae2e8965e19cd12caa244afbd9c |
| Linux | Linux | 6.4 |
References
Timeline
- Published
- Last Modified
- Status
- Deferred
Frequently Asked Questions
What is CVE-2023-53778?
How severe is CVE-2023-53778?
How do I fix CVE-2023-53778?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2023
- CVE-2023-53772MiniDVBLinux 5.4 contains an arbitrary file disclosure vulne…7.5
- CVE-2023-53773MiniDVBLinux 5.4 contains an unauthenticated vulnerability i…5.3
- CVE-2023-53774MiniDVBLinux 5.4 contains a remote code execution vulnerabil…9.8
- CVE-2023-53775Screen SFT DAB 1.9.3 contains an authentication bypass vulne…6.5
- CVE-2023-53776Screen SFT DAB 1.9.3 contains an authentication bypass vulne…8.8
- CVE-2023-53777In the Linux kernel, the following vulnerability has been re…
- CVE-2023-53779Rejected reason: This CVE ID has been rejected or withdrawn …
- CVE-2023-5378Improper Input Validation vulnerability in MegaBIP and alre…5.4
- CVE-2023-53780In the Linux kernel, the following vulnerability has been re…
- CVE-2023-53781In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2023-53782In the Linux kernel, the following vulnerability has been re…
- CVE-2023-53783In the Linux kernel, the following vulnerability has been re…
Are you affected by CVE-2023-53778?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
