From: "Jason A. Donenfeld" Subject: Re: BPF hash algo (Re: [kernel-hardening] Re: [PATCH v7 3/6] random: use SipHash in place of MD5) Date: Thu, 22 Dec 2016 19:19:12 +0100 Message-ID: References: <1482425969.2673.5.camel@stressinduktion.org> Reply-To: kernel-hardening@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: Andy Lutomirski , Daniel Borkmann , Alexei Starovoitov , "kernel-hardening@lists.openwall.com" , "Theodore Ts'o" , Netdev , LKML , Linux Crypto Mailing List , David Laight , Eric Dumazet , Linus Torvalds , Eric Biggers , Tom Herbert , Andi Kleen , "David S. Miller" , Jean-Philippe Aumasson To: Hannes Frederic Sowa Return-path: List-Post: List-Help: List-Unsubscribe: List-Subscribe: In-Reply-To: <1482425969.2673.5.camel@stressinduktion.org> List-Id: linux-crypto.vger.kernel.org On Thu, Dec 22, 2016 at 5:59 PM, Hannes Frederic Sowa wrote: > We don't prevent ebpf programs being loaded based on the digest but > just to uniquely identify loaded programs from user space and match up > with their source. Okay, so in that case, a weak hashing function like SHA1 could result in a real vulnerability. Therefore, this SHA1 stuff needs to be reverted immediately, pending a different implementation. If this has ever shipped in a kernel version, it could even deserve a CVE. No SHA1! > The hashing is not a proper sha1 neither, unfortunately. I think that > is why it will have a custom implementation in iproute2? Jeepers creepers. So for some ungodly reason, LKML has invented yet another homebrewed crypto primitive. This story really gets more horrifying every day. No bueno. So yea, let's revert and re-commit (repeal and replace? just kidding...). Out with SHA-1, in with Blake2 or SHA2. Jason