Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965217AbeALSrs (ORCPT + 1 other); Fri, 12 Jan 2018 13:47:48 -0500 Received: from mail-ot0-f195.google.com ([74.125.82.195]:44657 "EHLO mail-ot0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964997AbeALSrq (ORCPT ); Fri, 12 Jan 2018 13:47:46 -0500 X-Google-Smtp-Source: ACJfBovG8QZAyg7Z+6zTWa17DdS4bDHn+1z7LTz/p40yOcd+zM8pC9kxnS0mzj8HjOPdxTCl2BuSjKYc5z9Dhbskht0= MIME-Version: 1.0 In-Reply-To: <20180112075907.GA3391@kroah.com> References: <151571798296.27429.7166552848688034184.stgit@dwillia2-desk3.amr.corp.intel.com> <151571803884.27429.7578279171286065970.stgit@dwillia2-desk3.amr.corp.intel.com> <20180112075907.GA3391@kroah.com> From: Dan Williams Date: Fri, 12 Jan 2018 10:47:44 -0800 Message-ID: Subject: Re: [PATCH v2 10/19] ipv4: prevent bounds-check bypass via speculative execution To: Greg KH Cc: Linux Kernel Mailing List , linux-arch@vger.kernel.org, Andrew Morton , kernel-hardening@lists.openwall.com, Hideaki YOSHIFUJI , Netdev , Alexey Kuznetsov , Thomas Gleixner , Linus Torvalds , "David S. Miller" , Elena Reshetova , Alan Cox Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Thu, Jan 11, 2018 at 11:59 PM, Greg KH wrote: > On Thu, Jan 11, 2018 at 04:47:18PM -0800, Dan Williams wrote: >> Static analysis reports that 'offset' may be a user controlled value >> that is used as a data dependency reading from a raw_frag_vec buffer. >> In order to avoid potential leaks of kernel memory values, block >> speculative execution of the instruction stream that could issue further >> reads based on an invalid '*(rfv->c + offset)' value. >> >> Based on an original patch by Elena Reshetova. > > There is the "Co-Developed-by:" tag now, if you want to use it... Ok, thanks. > >> Cc: "David S. Miller" >> Cc: Alexey Kuznetsov >> Cc: Hideaki YOSHIFUJI >> Cc: netdev@vger.kernel.org >> Signed-off-by: Elena Reshetova >> Signed-off-by: Dan Williams >> --- >> net/ipv4/raw.c | 10 ++++++---- >> 1 file changed, 6 insertions(+), 4 deletions(-) > > Ugh, what is this, the 4th time I've said "I don't think this is an > issue, so why are you changing this code." to this patch. To be > followed by a "oh yeah, you are right, I'll drop it", only to see it > show back up in the next time this patch series is sent out? > > Same for the other patches in this series that I have reviewed 4, maybe > 5, times already. The "v2" is not very true here... The theme of the review feedback on v1 was 'don't put ifence in any net/ code', and that was addressed. I honestly thought the new definition of array_ptr() changed the calculus on this patch. Given the same pattern appears in the ipv6 case, and I have yet to hear that we should drop the ipv6 patch, make the code symmetric just for readability purposes. Otherwise we need a comment saying why this is safe for ipv4, but maybe not safe for ipv6, I think 'array_ptr' is effectively that comment. I.e. 'array_ptr()' is designed to be low impact for instrumenting false positives. If that new argument does not hold water I will definitely drop this patch.