Bug 2219270 (CVE-2023-4387) - CVE-2023-4387 kernel: vmxnet3: use-after-free in vmxnet3_rq_alloc_rx_buf()
Summary: CVE-2023-4387 kernel: vmxnet3: use-after-free in vmxnet3_rq_alloc_rx_buf()
Keywords:
Status: NEW
Alias: CVE-2023-4387
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: 2219287 2219288 2232411 2232412
Blocks: 2219643
TreeView+ depends on / blocked
 
Reported: 2023-07-03 07:04 UTC by Dhananjay Arunesh
Modified: 2023-09-22 21:34 UTC (History)
48 users (show)

Fixed In Version: Kernel 5.18~19
Doc Type: If docs needed, set a value
Doc Text:
A use-after-free flaw was found in vmxnet3_rq_alloc_rx_buf in drivers/net/vmxnet3/vmxnet3_drv.c in VMware's vmxnet3 ethernet NIC driver in the Linux Kernel. This issue could allow a local attacker to crash the system due to a double-free while cleaning up vmxnet3_rq_cleanup_all, which could also lead to a kernel information leak problem.
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Dhananjay Arunesh 2023-07-03 07:04:44 UTC
A use-after-free flaw was found in vmxnet3_rq_alloc_rx_buf in drivers/net/vmxnet3/vmxnet3_drv.c in VMware's vmxnet3 ethernet NIC driver in the Linux Kernel. This flaw could allow a local attacker to crash the system due to a double free while cleanup at vmxnet3_rq_cleanup_all. This vulnerability could even lead to a kernel information leak problem.

In vmxnet3_rq_alloc_rx_buf(), when dma_map_single() fails, rbi->skb is freed immediately. Similarly, in another branch, when dma_map_page() fails, rbi->page is also freed. In the two cases, vmxnet3_rq_alloc_rx_buf() returns an error to its callers vmxnet3_rq_init() -> vmxnet3_rq_init_all() -> vmxnet3_activate_dev(). Then vmxnet3_activate_dev() calls vmxnet3_rq_cleanup_all() in error handling code, and rbi->skb or rbi->page are freed again in  vmxnet3_rq_cleanup_all(), causing use-after-free bugs.

References:
https://github.com/torvalds/linux/commit/9e7fef9521e73ca8afd7da9e58c14654b02dfad8


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