lkml.org 
[lkml]   [2022]   [Dec]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH net v3] qlcnic: prevent ->dcb use-after-free on qlcnic_dcb_enable() failure
From
Date
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


\
 
 \ /
  Last update: 2023-03-26 23:20    [W:0.030 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site