From: Florian Westphal <fw@strlen.de>
To: Charles Bryant <ch.4g7vxy-nbkl8p@chch.co.uk>
Cc: netdev@vger.kernel.org
Subject: Re: two bogus patches arising from CVE-2019-12381
Date: Wed, 1 Apr 2020 14:46:33 +0200 [thread overview]
Message-ID: <20200401124633.GH23604@breakpoint.cc> (raw)
In-Reply-To: <20200401105452.1376920.qmail@chch.co.uk>
Charles Bryant <ch.4g7vxy-nbkl8p@chch.co.uk> wrote:
> I believe two patches from last year are mistaken. They are:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=95baa60a0da80a0143e3ddd4d3725758b4513825
>
> https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=425aa0e1d01513437668fa3d4a971168bbaa8515
>
> Both of these make a function return immediately with ENOMEM if a kalloc()
> fails. However in each case the function already correctly handled
> allocation failure later on. Furthermore, by making them exit early
> on allocation failure, it (very slightly) makes them worse as in some
> cases they might have correctly returned EADDRINUSE and not needed the
> allocated memory.
>
> I think, therefore, that these changes should be reverted.
Both fixes are useless, as you explained above.
But they do not matter. When GFP_KERNEL allocations fail the entire
system is screwed anyway.
So instead of revert, I would suggest that you wait until net-next
reopens, then:
For the first commit, send a patch that reverts, but also add a comment
that explains the error is handled below the loop.
For the second commit, send a patch that moves the allocation to where its
needed -- the spinlock was converted to a mutex so there is no need
for this ahead-of-time allocation anymore.
prev parent reply other threads:[~2020-04-01 12:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-01 10:54 two bogus patches arising from CVE-2019-12381 Charles Bryant
2020-04-01 12:46 ` Florian Westphal [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=20200401124633.GH23604@breakpoint.cc \
--to=fw@strlen.de \
--cc=ch.4g7vxy-nbkl8p@chch.co.uk \
--cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).