From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932306AbcDGSEF (ORCPT ); Thu, 7 Apr 2016 14:04:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48252 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932082AbcDGSEC (ORCPT ); Thu, 7 Apr 2016 14:04:02 -0400 Date: Thu, 7 Apr 2016 13:04:00 -0500 From: Josh Poimboeuf To: Jiri Kosina Cc: Dan Carpenter , jeyu@redhat.com, Miroslav Benes , Petr Mladek , live-patching@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] livepatch: robustify klp_register_patch() API error checking Message-ID: <20160407180400.2nvxfaf26q4buag3@treble.redhat.com> References: <20160404203426.GA8200@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1 (2014-03-12) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 07 Apr 2016 18:04:01 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 07, 2016 at 06:06:25PM +0200, Jiri Kosina wrote: > From: Jiri Kosina > > Commit 425595a7fc20 ("livepatch: reuse module loader code to write > relocations") adds a possibility of dereferncing pointers supplied by the > consumer of the livepatch API before sanity (NULL) checking them (patch > and patch->mod). > > Spotted by smatch tool. > > Reported-by: Dan Carpenter > Signed-off-by: Jiri Kosina Acked-by: Josh Poimboeuf -- Josh