Bug 2103900 (CVE-2022-2308) - CVE-2022-2308 kernel: use of uninitialized memory could lead to data leak in Virtio drivers with VDUSE
Summary: CVE-2022-2308 kernel: use of uninitialized memory could lead to data leak in ...
Keywords:
Status: CLOSED NOTABUG
Alias: CVE-2022-2308
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2126109
Blocks: 2090753
TreeView+ depends on / blocked
 
Reported: 2022-07-05 08:35 UTC by Mauro Matteo Cascella
Modified: 2022-11-25 12:15 UTC (History)
53 users (show)

Fixed In Version: kernel 6.0-rc5
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the Linux kernel in vDPA with VDUSE backend. There were no checks in VDUSE kernel driver to ensure the size of the device config space was in line with the features advertised by the VDUSE userspace application. In case of a mismatch, Virtio drivers config read helpers did not initialize the memory indirectly passed to vduse_vdpa_get_config() returning uninitialized memory from the stack. Such memory was not directly propagated to userspace, although under some circumstances it could be printed in the kernel logs.
Clone Of:
Environment:
Last Closed: 2022-11-25 12:15:25 UTC
Embargoed:


Attachments (Terms of Use)

Description Mauro Matteo Cascella 2022-07-05 08:35:24 UTC
A flaw was found in vDPA with VDUSE backend. There are currently no checks in VDUSE kernel driver to ensure the size of the device config space is in line with the features advertised by the VDUSE userspace application. In case of a mismatch, Virtio drivers config read helpers do not initialize the memory indirectly passed to vduse_vdpa_get_config() returning uninitialized memory from the stack. This could cause undefined behavior or data leaks in Virtio drivers.

Comment 3 Salvatore Bonaccorso 2022-08-20 07:05:03 UTC
Is there more information available on this issue? Is it known and fixed in upstream?

Comment 4 Mauro Matteo Cascella 2022-08-22 08:52:19 UTC
In reply to comment #3:
> Is there more information available on this issue? Is it known and fixed in
> upstream?

Not yet, a patch is going to be posted upstream soon. Thanks.

Comment 5 Mauro Matteo Cascella 2022-09-12 12:53:47 UTC
In reply to comment #4:
> Not yet, a patch is going to be posted upstream soon. Thanks.

https://lore.kernel.org/lkml/20220831154923.97809-1-maxime.coquelin@redhat.com/T/

To the best of our knowledge, the kernel stack is not directly propagated to userspace but in the worst case scenario (capacity field in Virtio-blk, which can be displayed in set_capacity_and_notify) it could be printed in the kernel logs.

Comment 6 Mauro Matteo Cascella 2022-09-12 13:18:40 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2126109]

Comment 8 Justin M. Forbes 2022-11-08 15:34:26 UTC
This was fixed for Fedora with the 5.19.14 stable kernel updates.

Comment 9 Product Security DevOps Team 2022-11-25 12:15:22 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2022-2308


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