Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941863AbcLVSTd (ORCPT ); Thu, 22 Dec 2016 13:19:33 -0500 Received: from frisell.zx2c4.com ([192.95.5.64]:44119 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934857AbcLVSTb (ORCPT ); Thu, 22 Dec 2016 13:19:31 -0500 MIME-Version: 1.0 In-Reply-To: <1482425969.2673.5.camel@stressinduktion.org> References: <1482425969.2673.5.camel@stressinduktion.org> From: "Jason A. Donenfeld" Date: Thu, 22 Dec 2016 19:19:12 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: BPF hash algo (Re: [kernel-hardening] Re: [PATCH v7 3/6] random: use SipHash in place of MD5) To: Hannes Frederic Sowa 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 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 951 Lines: 23 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