From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Herring Subject: Re: [PATCH] of: overlay: validate offset from property fixups Date: Wed, 23 May 2018 11:44:23 -0500 Message-ID: <20180523164423.GA29515@rob-hp-laptop> References: <1526530791-18591-1-git-send-email-frowand.list@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1526530791-18591-1-git-send-email-frowand.list@gmail.com> Sender: linux-kernel-owner@vger.kernel.org To: frowand.list@gmail.com Cc: pantelis.antoniou@konsulko.com, Pantelis Antoniou , Dan Carpenter , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org List-Id: devicetree@vger.kernel.org On Wed, May 16, 2018 at 09:19:51PM -0700, frowand.list@gmail.com wrote: > From: Frank Rowand > > The smatch static checker marks the data in offset as untrusted, > leading it to warn: > > drivers/of/resolver.c:125 update_usages_of_a_phandle_reference() > error: buffer underflow 'prop->value' 's32min-s32max' > > Add check to verify that offset is within the property data. > > Reported-by: Dan Carpenter > Signed-off-by: Frank Rowand > --- > drivers/of/resolver.c | 5 +++++ > 1 file changed, 5 insertions(+) Applied, thanks. Rob