From: Greg KH <gregkh@linuxfoundation.org>
To: Amit Klein <aksecurity@gmail.com>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
edumazet@google.com, w@1wt.eu, davem@davemloft.net,
netdev@vger.kernel.org
Subject: Re: [PATCH 4.19] inet: use bigger hash table for IP ID generation (backported to 4.19)
Date: Mon, 21 Jun 2021 17:28:38 +0200 [thread overview]
Message-ID: <YNCwJqtKKCskB2Au@kroah.com> (raw)
In-Reply-To: <60cb0586.1c69fb81.8015b.37a1@mx.google.com>
On Thu, Jun 17, 2021 at 01:19:18AM -0700, Amit Klein wrote:
> Subject: inet: use bigger hash table for IP ID generation (backported to 4.19)
> From: Amit Klein <aksecurity@gmail.com>
>
> This is a backport to 4.19 of the following patch, originally
> developed by Eric Dumazet.
>
> In commit 73f156a6e8c1 ("inetpeer: get rid of ip_id_count")
> I used a very small hash table that could be abused
> by patient attackers to reveal sensitive information.
>
> Switch to a dynamic sizing, depending on RAM size.
>
> Typical big hosts will now use 128x more storage (2 MB)
> to get a similar increase in security and reduction
> of hash collisions.
>
> As a bonus, use of alloc_large_system_hash() spreads
> allocated memory among all NUMA nodes.
>
> Fixes: 73f156a6e8c1 ("inetpeer: get rid of ip_id_count")
> Reported-by: Amit Klein <aksecurity@gmail.com>
> Cc: stable@vger.kernel.org
> Cc: Eric Dumazet <edumazet@google.com>
> Cc: Willy Tarreau <w@1wt.eu>
> ---
> net/ipv4/route.c | 42 ++++++++++++++++++++++++++++--------------
> 1 file changed, 28 insertions(+), 14 deletions(-)
>
> (limited to 'net/ipv4/route.c')
I had to dig up what the upstream git commit id was for this, please
specify it next time :(
I've queued this, and the 4.14 version up. Can you create a 4.4.y and
4.9.y version as well?
thanks,
greg k-h
next prev parent reply other threads:[~2021-06-21 15:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-17 8:19 [PATCH 4.19] inet: use bigger hash table for IP ID generation (backported to 4.19) Amit Klein
2021-06-21 15:28 ` Greg KH [this message]
2021-06-21 16:01 ` Amit Klein
2021-06-22 9:10 ` Amit Klein
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=YNCwJqtKKCskB2Au@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=aksecurity@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
--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).