Thread (2 messages) flat view 2 messages, 2 authors, 2022-05-17

Re: [PATCH v3] net: vmxnet3: fix possible NULL pointer dereference in vmxnet3_rq_cleanup()

From: patchwork-bot+netdevbpf@kernel.org
Date: 2022-05-17 10:23:22
Also in: lkml

Hello:

This patch was applied to netdev/net.git (master)
by Paolo Abeni [off-list ref]:

On Sat, 14 May 2022 13:07:11 +0800 you wrote:
In vmxnet3_rq_create(), when dma_alloc_coherent() fails,
vmxnet3_rq_destroy() is called. It sets rq->rx_ring[i].base to NULL. Then
vmxnet3_rq_create() returns an error to its callers mxnet3_rq_create_all()
-> vmxnet3_change_mtu(). Then vmxnet3_change_mtu() calls
vmxnet3_force_close() -> dev_close() in error handling code. And the driver
calls vmxnet3_close() -> vmxnet3_quiesce_dev() -> vmxnet3_rq_cleanup_all()
-> vmxnet3_rq_cleanup(). In vmxnet3_rq_cleanup(),
rq->rx_ring[ring_idx].base is accessed, but this variable is NULL, causing
a NULL pointer dereference.

[...]
Here is the summary with links:
  - [v3] net: vmxnet3: fix possible NULL pointer dereference in vmxnet3_rq_cleanup()
    https://git.kernel.org/netdev/net/c/edf410cb74dc

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help