From: Eric Dumazet <eric.dumazet@gmail.com>
To: Wen Yang <wenyang@linux.alibaba.com>,
davem@davemloft.net, David Ahern <dsahern@kernel.org>,
Jakub Kicinski <kuba@kernel.org>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] net: return early for possible invalid uaddr
Date: Wed, 11 Aug 2021 18:11:52 +0200 [thread overview]
Message-ID: <247c8272-0e26-87ab-d492-140047d4abc4@gmail.com> (raw)
In-Reply-To: <20210811152431.66426-2-wenyang@linux.alibaba.com>
On 8/11/21 5:24 PM, Wen Yang wrote:
> The inet_dgram_connect() first calls inet_autobind() to select an
> ephemeral port, then checks uaddr in udp_pre_connect() or
> __ip4_datagram_connect(), but the port is not released until the socket
> is closed. This could cause performance issues or even exhaust ephemeral
> ports if a malicious user makes a large number of UDP connections with
> invalid uaddr and/or addr_len.
>
>
This is a big patch.
Can the malicious user still use a large number of UDP sockets,
with valid uaddr/add_len and consequently exhaust ephemeral ports ?
If yes, it does not seem your patch is helping.
If no, have you tried instead to undo the autobind, if the connect fails ?
next prev parent reply other threads:[~2021-08-11 16:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-11 15:24 [PATCH 1/2] ipv4: fix up inetsw_array coding style Wen Yang
2021-08-11 15:24 ` [PATCH v2 2/2] net: return early for possible invalid uaddr Wen Yang
2021-08-11 16:11 ` Eric Dumazet [this message]
2021-08-12 17:35 ` Wen Yang
2021-08-17 4:08 ` Wen Yang
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=247c8272-0e26-87ab-d492-140047d4abc4@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=wenyang@linux.alibaba.com \
--cc=yoshfuji@linux-ipv6.org \
/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
all inboxes | Powered by JetHome®