Bug 2250834 (CVE-2023-6238) - CVE-2023-6238 kernel: nvme: memory corruption via unprivileged user passthrough
Summary: CVE-2023-6238 kernel: nvme: memory corruption via unprivileged user passthrough
Keywords:
Status: NEW
Alias: CVE-2023-6238
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2250839
Blocks: 2250835
TreeView+ depends on / blocked
 
Reported: 2023-11-21 11:25 UTC by Mauro Matteo Cascella
Modified: 2024-02-06 21:44 UTC (History)
45 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
A buffer overflow vulnerability was found in the NVM Express (NVMe) driver in the Linux kernel. Only privileged user could specify a small meta buffer and let the device perform larger Direct Memory Access (DMA) into the same buffer, overwriting unrelated kernel memory, causing random kernel crashes and memory corruption.
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Mauro Matteo Cascella 2023-11-21 11:25:45 UTC
User can specify a smaller meta buffer than what the device is wired to update/access. Kernel makes a copy of the meta buffer into which the device does DMA. As a result, the device overwrites the unrelated kernel memory, causing random kernel crashes.

References:
https://lore.kernel.org/linux-nvme/20231013051458.39987-1-joshi.k@samsung.com/T/#u
https://lore.kernel.org/linux-nvme/20231016060519.231880-1-joshi.k@samsung.com/T/#u

Comment 2 Mauro Matteo Cascella 2023-11-21 11:57:16 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2250839]

Comment 4 Justin M. Forbes 2023-11-21 14:47:36 UTC
Is this really considered "high"? From the discussion thread:

> BTW, don't you still need someone with root access to change the
> permissions on the device handle in order for an unpriveledged user to
> reach this hole? It's not open access by default, you still have to
> opt-in.
> 
> Yes, you need someone with root access to change the device node
> persmissions.  But we allowed that under the assumption it is safe
> to do so, which it turns out it is not.

So by default the access is still not enabled out of the box.

Comment 5 Mauro Matteo Cascella 2023-11-21 15:52:02 UTC
In reply to comment #4:
> Is this really considered "high"? From the discussion thread:
> 
> > BTW, don't you still need someone with root access to change the
> > permissions on the device handle in order for an unpriveledged user to
> > reach this hole? It's not open access by default, you still have to
> > opt-in.
> > 
> > Yes, you need someone with root access to change the device node
> > persmissions.  But we allowed that under the assumption it is safe
> > to do so, which it turns out it is not.
> 
> So by default the access is still not enabled out of the box.

Seems a valid argument, and Moderate fits quite well: "the types of vulnerabilities that could have had a Critical or Important impact but are less easily exploited based on a technical evaluation of the flaw, and/or affect unlikely configurations" [1]. Updated CVSS score (AC:H) and downgraded impact, thanks!

[1] https://access.redhat.com/security/updates/classification


Note You need to log in before you can comment on or make changes to this bug.