From: Paolo Abeni <pabeni@redhat.com>
To: "Ефанов Владислав Александрович" <vefanov@ispras.ru>,
"Willem de Bruijn" <willemdebruijn.kernel@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
David Ahern <dsahern@kernel.org>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
lvc-project@linuxtesting.org
Subject: Re: [PATCH] udp6: Fix race condition in udp6_sendmsg & connect
Date: Fri, 26 May 2023 20:13:25 +0200 [thread overview]
Message-ID: <815ce4d97f6d673799ee7a94d90eeda58b1e51e4.camel@redhat.com> (raw)
In-Reply-To: <027d28a0-b31b-ab42-9eb6-2826c04c9364@ispras.ru>
On Fri, 2023-05-26 at 18:58 +0300, Ефанов Владислав Александрович
wrote:
> I don't think that we can just move sk_dst_set() call.
>
> I think we can destroy dst of sendmsg task in this case.
AFAICS ip6_sk_dst_lookup_flow tries to acquire a reference to the
cached dst. If the connect() clears the cache, decreasing the refcnt,
the counter of the dst in use by sendmsg() must still be non zero.
IMHO the problem you see is that sk_setup_caps() keeps using the dst
after transferring the ownership to the dst cache, which is illegal.
The suggested patch addressed that.
If I'm wrong your syzkaller repro will keep splatting. Please have just
have a spin, thanks.
Paolo
next prev parent reply other threads:[~2023-05-26 18:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-26 15:08 [PATCH] udp6: Fix race condition in udp6_sendmsg & connect Vladislav Efanov
2023-05-26 15:29 ` Eric Dumazet
2023-05-26 15:49 ` Ефанов Владислав Александрович
2023-05-26 16:09 ` Vlad Efanov
2023-05-26 16:46 ` Eric Dumazet
2023-05-26 16:57 ` Vlad Efanov
2023-05-26 15:33 ` Paolo Abeni
2023-05-26 15:58 ` Ефанов Владислав Александрович
2023-05-26 16:00 ` Eric Dumazet
2023-05-26 16:41 ` Vlad Efanov
2023-05-26 16:47 ` Eric Dumazet
2023-05-26 17:00 ` Vlad Efanov
2023-05-26 18:13 ` Paolo Abeni [this message]
2023-05-29 14:13 ` Vlad Efanov
2023-05-30 11:39 ` [PATCH v2] " Vladislav Efanov
2023-05-31 9:40 ` 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=815ce4d97f6d673799ee7a94d90eeda58b1e51e4.camel@redhat.com \
--to=pabeni@redhat.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=netdev@vger.kernel.org \
--cc=vefanov@ispras.ru \
--cc=willemdebruijn.kernel@gmail.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;
as well as URLs for NNTP newsgroup(s).