Netdev List
 help / color / mirror / Atom feed
From: patchwork-bot+netdevbpf@kernel.org
To: Lin Ma <linma@zju.edu.cn>
Cc: jk@codeconstruct.com.au, matt@codeconstruct.com.au,
	davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v0] mctp: defer the kfree of object mdev->addrs
Date: Tue, 26 Apr 2022 07:50:10 +0000	[thread overview]
Message-ID: <165095941090.3686.1103250887116949143.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20220422114340.32346-1-linma@zju.edu.cn>

Hello:

This patch was applied to netdev/net.git (master)
by Paolo Abeni <pabeni@redhat.com>:

On Fri, 22 Apr 2022 19:43:40 +0800 you wrote:
> The function mctp_unregister() reclaims the device's relevant resource
> when a netcard detaches. However, a running routine may be unaware of
> this and cause the use-after-free of the mdev->addrs object.
> 
> The race condition can be demonstrated below
> 
>  cleanup thread               another thread
>                           |
> unregister_netdev()       |  mctp_sendmsg()
> ...                       |    ...
>   mctp_unregister()       |    rt = mctp_route_lookup()
>     ...                   |    mctl_local_output()
>     kfree(mdev->addrs)    |      ...
>                           |      saddr = rt->dev->addrs[0];
>                           |
> 
> [...]

Here is the summary with links:
  - [v0] mctp: defer the kfree of object mdev->addrs
    https://git.kernel.org/netdev/net/c/b561275d633b

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



      parent reply	other threads:[~2022-04-26  7:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-22 11:43 [PATCH v0] mctp: defer the kfree of object mdev->addrs Lin Ma
2022-04-26  3:30 ` Jeremy Kerr
2022-04-26  7:50 ` patchwork-bot+netdevbpf [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=165095941090.3686.1103250887116949143.git-patchwork-notify@kernel.org \
    --to=patchwork-bot+netdevbpf@kernel.org \
    --cc=davem@davemloft.net \
    --cc=jk@codeconstruct.com.au \
    --cc=kuba@kernel.org \
    --cc=linma@zju.edu.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt@codeconstruct.com.au \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox