From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Eric Dumazet <edumazet@google.com>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com,
Sili Luo <rootlab@huawei.com>, Willy Tarreau <w@1wt.eu>
Subject: Re: [PATCH net] net: nfc: fix races in nfc_llcp_sock_get() and nfc_llcp_sock_get_sn()
Date: Mon, 9 Oct 2023 15:08:58 +0200 [thread overview]
Message-ID: <0a28ef00-f498-4fa0-bc2b-10a460e1a88c@linaro.org> (raw)
In-Reply-To: <20231009123110.3735515-1-edumazet@google.com>
On 09/10/2023 14:31, Eric Dumazet wrote:
> Sili Luo reported a race in nfc_llcp_sock_get(), leading to UAF.
>
> Getting a reference on the socket found in a lookup while
> holding a lock should happen before releasing the lock.
>
> nfc_llcp_sock_get_sn() has a similar problem.
>
> Finally nfc_llcp_recv_snl() needs to make sure the socket
> found by nfc_llcp_sock_from_sn() does not disappear.
>
> Fixes: 8f50020ed9b8 ("NFC: LLCP late binding")
> Reported-by: Sili Luo <rootlab@huawei.com>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Cc: Willy Tarreau <w@1wt.eu>
> ---
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
next prev parent reply other threads:[~2023-10-09 13:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-09 12:31 [PATCH net] net: nfc: fix races in nfc_llcp_sock_get() and nfc_llcp_sock_get_sn() Eric Dumazet
2023-10-09 13:08 ` Krzysztof Kozlowski [this message]
2023-10-11 2:50 ` patchwork-bot+netdevbpf
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=0a28ef00-f498-4fa0-bc2b-10a460e1a88c@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rootlab@huawei.com \
--cc=w@1wt.eu \
/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;
as well as URLs for NNTP newsgroup(s).