Bug 2087568 (CVE-2023-1838) - CVE-2023-1838 kernel: Possible use-after-free since the two fdget() during vhost_net_set_backend()
Summary: CVE-2023-1838 kernel: Possible use-after-free since the two fdget() during vh...
Keywords:
Status: NEW
Alias: CVE-2023-1838
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nobody
QA Contact:
URL:
Whiteboard:
Depends On: 2111141 2111142 2111143 2111144
Blocks: 2087569
TreeView+ depends on / blocked
 
Reported: 2022-05-18 04:39 UTC by Sandipan Roy
Modified: 2023-09-22 17:43 UTC (History)
48 users (show)

Fixed In Version: kernel 5.18 25
Doc Type: If docs needed, set a value
Doc Text:
A use-after-free flaw was found in vhost_net_set_backend in drivers/vhost/net.c in the virtio network subcomponent in the Linux kernel due to a double fget. This issue could allow a local attacker to crash the system, and could lead to a kernel information leak problem.
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Sandipan Roy 2022-05-18 04:39:37 UTC
A use-after-free flaw was found in vhost_net_set_backend in drivers/vhost/net.c in virtio network subcomponent in the Linux kernel due to a double fget. This flaw could allow a local attacker to crash the system, and could even lead to a kernel information leak problem.

The descriptor table is a shared resource; two fget() on the same descriptor may return different struct file references. get_tap_ptr_ring() is called after we'd found (and pinned) the socket we'll be using and it tries to find the private tun/tap data structures associated with it. Redoing the lookup by the same file descriptor we'd used to get the socket is racy - we need to same struct file.

Patch Reference:
https://lore.kernel.org/netdev/20220516084213.26854-1-jasowang@redhat.com/T/


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