Messages in this thread | | | Subject | Re: [PATCH net v3] qlcnic: prevent ->dcb use-after-free on qlcnic_dcb_enable() failure | From | patchwork-bot+netdevbpf@kernel ... | Date | Mon, 26 Dec 2022 09:10:14 +0000 |
| |
Hello:
This patch was applied to netdev/net.git (master) by David S. Miller <davem@davemloft.net>:
On Thu, 22 Dec 2022 14:52:28 +0300 you wrote: > adapter->dcb would get silently freed inside qlcnic_dcb_enable() in > case qlcnic_dcb_attach() would return an error, which always happens > under OOM conditions. This would lead to use-after-free because both > of the existing callers invoke qlcnic_dcb_get_info() on the obtained > pointer, which is potentially freed at that point. > > Propagate errors from qlcnic_dcb_enable(), and instead free the dcb > pointer at callsite using qlcnic_dcb_free(). This also removes the now > unused qlcnic_clear_dcb_ops() helper, which was a simple wrapper around > kfree() also causing memory leaks for partially initialized dcb. > > [...]
Here is the summary with links: - [net,v3] qlcnic: prevent ->dcb use-after-free on qlcnic_dcb_enable() failure https://git.kernel.org/netdev/net/c/13a7c8964afc
You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
| |