From: Jakub Kicinski <kuba@kernel.org>
To: Matthias Schiffer <mschiffer@universe-factory.net>
Cc: Tom Parkin <tparkin@katalix.com>,
netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net] net: l2tp: reduce log level when passing up invalid packets
Date: Mon, 22 Feb 2021 14:31:38 -0800 [thread overview]
Message-ID: <20210222143138.5711048a@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> (raw)
In-Reply-To: <ec0f874e-b5af-1007-5a83-e3de7399ef29@universe-factory.net>
On Mon, 22 Feb 2021 17:40:16 +0100 Matthias Schiffer wrote:
> >> This will not be sufficient for my usecase: To stay compatible with older
> >> versions of fastd, I can't set the T flag in the first packet of the
> >> handshake, as it won't be known whether the peer has a new enough fastd
> >> version to understand packets that have this bit set. Luckily, the second
> >> handshake byte is always 0 in fastd's protocol, so these packets fail the
> >> tunnel version check and are passed to userspace regardless.
> >>
> >> I'm aware that this usecase is far outside of the original intentions of the
> >> code and can only be described as a hack, but I still consider this a
> >> regression in the kernel, as it was working fine in the past, without
> >> visible warnings.
> >>
> >
> > I'm sorry, but for the reasons stated above I disagree about it being
> > a regression.
>
> Hmm, is it common for protocol implementations in the kernel to warn about
> invalid packets they receive? While L2TP uses connected sockets and thus
> usually no unrelated packets end up in the socket, a simple UDP port scan
> originating from the configured remote address/port will trigger the "short
> packet" warning now (nmap uses a zero-length payload for UDP scans by
> default). Log spam caused by a malicous party might also be a concern.
Indeed, seems like appropriate counters would be a good fit here?
The prints are both potentially problematic for security and lossy.
next prev parent reply other threads:[~2021-02-22 22:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-19 19:06 [PATCH net] net: l2tp: reduce log level when passing up invalid packets Matthias Schiffer
2021-02-19 20:12 ` Tom Parkin
2021-02-20 9:56 ` Matthias Schiffer
2021-02-22 11:49 ` Tom Parkin
2021-02-22 16:40 ` Matthias Schiffer
2021-02-22 22:31 ` Jakub Kicinski [this message]
2021-02-23 9:47 ` Tom Parkin
2021-03-01 23:23 ` Matthias Schiffer
2021-02-23 9:46 ` Tom Parkin
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=20210222143138.5711048a@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mschiffer@universe-factory.net \
--cc=netdev@vger.kernel.org \
--cc=tparkin@katalix.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).