Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754420AbdD0Oyg (ORCPT ); Thu, 27 Apr 2017 10:54:36 -0400 Received: from smtp-out4.electric.net ([192.162.216.183]:65151 "EHLO smtp-out4.electric.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753979AbdD0Oya (ORCPT ); Thu, 27 Apr 2017 10:54:30 -0400 From: David Laight To: "'Jason A. Donenfeld'" , Sabrina Dubroca CC: Netdev , LKML , "kernel-hardening@lists.openwall.com" , David Miller Subject: RE: [PATCH v6 1/5] skbuff: return -EMSGSIZE in skb_to_sgvec to prevent overflow Thread-Topic: [PATCH v6 1/5] skbuff: return -EMSGSIZE in skb_to_sgvec to prevent overflow Thread-Index: AQHSv05j0H0WecGLUkW+iCLI/PwMFKHZTUkw Date: Thu, 27 Apr 2017 14:54:14 +0000 Message-ID: <063D6719AE5E284EB5DD2968C1650D6DCFFE0675@AcuExch.aculab.com> References: <20170425155215.4835-1-Jason@zx2c4.com> <20170425184734.26563-1-Jason@zx2c4.com> <20170427113016.GA12448@bistromath.localdomain> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.202.99.200] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-Outbound-IP: 213.249.233.130 X-Env-From: David.Laight@ACULAB.COM X-Proto: esmtps X-Revdns: X-HELO: AcuExch.aculab.com X-TLS: TLSv1:AES128-SHA:128 X-Authenticated_ID: X-PolicySMART: 3396946, 3397078 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id v3REtAKH022291 Content-Length: 274 Lines: 10 From: Jason A. Donenfeld > On Thu, Apr 27, 2017 at 1:30 PM, Sabrina Dubroca wrote: > > Hmm, I think this can actually happen: > > Alright, perhaps better to err on the side of caution, then. You only need to recurse if both pointers are set. David