Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp4520186imm; Tue, 9 Oct 2018 00:29:57 -0700 (PDT) X-Google-Smtp-Source: ACcGV61yf5sW6tM91wemT178whPrgFXZlOPo3/vDiXa6zRKHuyf+ZrBBk59Vg5fN4ewhOvS8b7pM X-Received: by 2002:a62:adc:: with SMTP id 89-v6mr28828546pfk.56.1539070197515; Tue, 09 Oct 2018 00:29:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539070197; cv=none; d=google.com; s=arc-20160816; b=FKQQtcdLWN3LcckeWn0qkvxdV9KqFfeVR2g5JhUphPxsU4foBnm7f5wvrrdpCLPe/K 1jVr0Ckx9/jmuL0LsPO5KKMMwke9rEC7wOaKbftXlxCwJrMaKKRJ711WbYwNy8wE/wD9 IYd/XqodS4EiGSF3aeFBABTjKDJUsrfvmtTAW6Y+UgCp+UQvY/WcyGRPb8OBTo7H/svE ixIKeh2bnEFfyfWMJTVm9ftl1r3RNLw5gXAd9rq7wdTw1UAQkDtgcZAco7azmxJfW6Jn TnYhQgStKZvlCinVtcoM2JYK/+5cnchMxylB+cccNTqquSlFD2DnIPiytu7DfBH/LHFo qakw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=I6o4lBSvvIuK4vsKrmCsKw2gNJxbMdotP0Jmxs22hvY=; b=mnbhuIFMyVSHp56n7woqpPOCKLVxL2edaqKJFOM8jw5cr4eyH5cbR+oEIx4fT15JCg gCEHKEs64Gcjuba6fiM36raPktWO0U5PzeWSNDT+CBYppCadJzHPhzWX7HDiephebqJ1 XraD2MBQ6MX3pvolGohr51F1GDn8YN/knA9y8ruQruEHCU8lhHaycQtDZAddRq5SsyiZ 3qaJpZdJQevC04JF2V5pvxJwP8Rk3sB6C7Q0s613V2HoJPWAfcTJhO2kuPcyBzFyzcLC WKdasyaMX82SR96PUhASf97WFuIfmj1FNEdRGf6jrdj5T17Xz8x+W+GCpTfjg9j028++ FIAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 23-v6si18587878pge.453.2018.10.09.00.29.42; Tue, 09 Oct 2018 00:29:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726522AbeJIOok (ORCPT + 99 others); Tue, 9 Oct 2018 10:44:40 -0400 Received: from mail.bootlin.com ([62.4.15.54]:42188 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725855AbeJIOok (ORCPT ); Tue, 9 Oct 2018 10:44:40 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id E32B7207C4; Tue, 9 Oct 2018 09:29:03 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from qschulz (AAubervilliers-681-1-28-153.w90-88.abo.wanadoo.fr [90.88.148.153]) by mail.bootlin.com (Postfix) with ESMTPSA id A9C5C20717; Tue, 9 Oct 2018 09:28:53 +0200 (CEST) Date: Tue, 9 Oct 2018 09:28:53 +0200 From: Quentin Schulz To: "Gustavo A. R. Silva" Cc: Rob Herring , Mark Rutland , Kishon Vijay Abraham I , "David S. Miller" , linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/2] phy: ocelot-serdes: fix out-of-bounds bug Message-ID: <20181009072853.t4jjqdlvc4g735hm@qschulz> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="s2hg36japngcgt3t" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --s2hg36japngcgt3t Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Gustavo, On Tue, Oct 09, 2018 at 12:20:28AM +0200, Gustavo A. R. Silva wrote: > This patchset aims to fix an out-of-bounds bug in > the phy-ocelot-serdes driver. >=20 > Currently, there is an out-of-bounds read on array ctrl->phys, > once variable i reaches the maximum array size of SERDES_MAX > in the for loop. >=20 > Quentin Schulz pointed out that SERDES_MAX is a valid value to > index ctrl->phys. So, I updated SERDES_MAX to be SERDES6G_MAX + 1 > in include/dt-bindings/phy/phy-ocelot-serdes.h. >=20 > Then I changed the condition in the for loop from > i <=3D SERDES_MAX to i < SERDES_MAX in order to > complete the fix. >=20 > The reason I'm sending this fix as series is because > checkpatch reported an error when I first tried to > integrate the whole solution into a singe patch. So, > changes to dt-bindings should be sent as a separate > patch. >=20 Much appreciated, thank you! Quentin --s2hg36japngcgt3t Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEXeEYjDsJh38OoyMzhLiadT7g8aMFAlu8WLUACgkQhLiadT7g 8aP/Xw//Sb5u2WBcKkRQ3/kAMWd4C6r5/Ke2ID6V9wUk04n/IH2V3coTqNfNTjTi vXiVjYD628H7A2Eqsw/qhn3rHWoaek1WbV02ZlORVll/7XQdTepxH72vQKiVOLO1 n8WHT3LRSutqhNfvvIPuvxbVklrDwr3OUT2Pcjyk+Nb3vXFCksLGXTrORbFiEtNO nVem4NT3UmZvE2NnMDRjvf9Rsc4npyyrrIgAfEF36tusCaHSrt3V8GIX94ddQ1fW f9Rwv0YDWw05vUw2c8ZoW6nMdrHZPA4HsTmclG5jcS+cVcPbYskmkWRtMcQNCEok 9t+JIdyYBqMBp4KU18n8KHv6FhqZlr8DwIOjntr96O1nzVnRNfHcsC3RRDFR8Waj RNbMvnwzs0eHlXgaVfuXDgoNSJn05OxcgHsRfsK0Y+2QtncY3yvaCKYqUSMqjoAx 192ZGoc3xA32t+oY59GF0L13j7Yeou/XLRixCN0K6CdnrTpfhGVOCRp/k0ctA5y2 e33lhWT/zFn1BbqqQCS0nl93tTu+tqVBiowGIZv7uEEBpbVbbm6/hdJ2GEGfa5NR dAH/Qk1CyfBGWefMhlC4Te88556cv1w/IhspSW2PzOlGgd4HS3BcGpQeDjAfc4vO xCv/zK+sWNxTeZ4enVv7geuaR7I+LNlGe/XqwlRHESpEKCjt5hs= =/lkD -----END PGP SIGNATURE----- --s2hg36japngcgt3t--