Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3877158pxj; Mon, 21 Jun 2021 08:30:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1RFXRAZO6IrBdD9zhOPAmw/OZVmtoV8b7AHBB1qCZcx7sTAaVgJNInDyBVyWfuyX3g5a8 X-Received: by 2002:a17:906:c241:: with SMTP id bl1mr25194302ejb.536.1624289404841; Mon, 21 Jun 2021 08:30:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624289404; cv=none; d=google.com; s=arc-20160816; b=qZdi8hFOF+eMxXiz5MWV2f5Cl7pTOZgT9xImvZzZWnsgZODaMzf/Bvsn9wv59SKNjG /X5zIUTIdgJrpEvWZK2tQz90dnC0BSv0SoqPaHyr7ntcYc0lFCt3gxUDTx+EWEHzOq0v jx6AJrCL4luEM8IxvV/b6Yzeu8BlVQVpHJzCmMP8NYTg7bAYeHBJ7Yvs8Y5RfSOI9EKJ aDF/uChAq7hHkKe03E4cyx1/4K6LLFisnPu5Q916lxH5YQZARMrw+J/0kvFApA02X2HQ c968uMjX4TK7b8GPOtnGpOpNXkDGVDCVosJq0NGxuIU3chrjhECOOL20BUPPWHH/bU0A w7sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=BeEz7TLm3+o9SYdtdSYhbz7K4cGnO+S0yg0JOzJpL68=; b=ww4jpbd8CZyqjfz9zK4dbrc2WjtoHxmTCEvSTAgAfaqZ2cFdfZ9dy5Bm9pXJD2rzIt ZtYu9TAIRbeW5xP12ARr7uPzBlZwo42jjYytWVgtG/IrdTttr/c6GiZAguH9P3PTiiDc 0dbX+rLuRJ8S34WxYuGlIHJ03DB8ypQd7joEURz4R1h1Cj2/R1VyQXKrz9Rk7m4xBVr5 WJple3lzemztZs9dOXNvvM4Za1c3X6nv7UuFPmLnJmCH3hEp2vMRNoeDGulHtrF05VcN q9YcM8xXccueZ3E5+cDBV5znzwC+V6bLwixtB7dHAeHlUjxDGIkO+fAYedEsKOC/PQ2K X8qQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OQvLJN0e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp16si9042641ejc.434.2021.06.21.08.29.41; Mon, 21 Jun 2021 08:30:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OQvLJN0e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230061AbhFUPaz (ORCPT + 99 others); Mon, 21 Jun 2021 11:30:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:55080 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229904AbhFUPaz (ORCPT ); Mon, 21 Jun 2021 11:30:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 91C81610A3; Mon, 21 Jun 2021 15:28:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1624289321; bh=2I5sDArcYUqiV0aAit2mksHSHs8kCm+3kN63ozS6XnQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OQvLJN0e4Y57h12cOlFnNjp0QbsR7XDeUe9FIbkei8I48jtG/3sVRlF5JYQzvMeE1 upma7n9YxwcdmZ17lkGy9iUaYcpAAlDAIRfzCU7SdUwavx5nY0ELazorv5QgKkhXCF rxG42lmUf2S6rQ2NCIwH4XYjb+XSU+io7mhey0Yo= Date: Mon, 21 Jun 2021 17:28:38 +0200 From: Greg KH To: Amit Klein 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) Message-ID: References: <60cb0586.1c69fb81.8015b.37a1@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <60cb0586.1c69fb81.8015b.37a1@mx.google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > 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 > Cc: stable@vger.kernel.org > Cc: Eric Dumazet > Cc: Willy Tarreau > --- > 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