Re: [PATCH v3] nfp: fix use-after-free in area_cache_get()

From: patchwork-bot+netdevbpf
Date: Thu Aug 11 2022 - 12:33:45 EST


Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@xxxxxxxxxx>:

On Wed, 10 Aug 2022 15:30:57 +0800 you wrote:
> area_cache_get() is used to distribute cache->area and set cache->id,
> and if cache->id is not 0 and cache->area->kref refcount is 0, it will
> release the cache->area by nfp_cpp_area_release(). area_cache_get()
> set cache->id before cpp->op->area_init() and nfp_cpp_area_acquire().
>
> But if area_init() or nfp_cpp_area_acquire() fails, the cache->id is
> is already set but the refcount is not increased as expected. At this
> time, calling the nfp_cpp_area_release() will cause use-after-free.
>
> [...]

Here is the summary with links:
- [v3] nfp: fix use-after-free in area_cache_get()
https://git.kernel.org/netdev/net/c/02e1a114fdb7

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