Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp459336pxa; Wed, 19 Aug 2020 06:22:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyR4XpJEEst+uew2BjQWi+7tx8Fp8WVjXlHUrcxYVva3aZiEa5Y+N/XFJU3fHLCyxWNRuFk X-Received: by 2002:a17:906:a413:: with SMTP id l19mr25686527ejz.15.1597843356766; Wed, 19 Aug 2020 06:22:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597843356; cv=none; d=google.com; s=arc-20160816; b=TX3UrGk/sBXjcBNQYL5GoP1YTgxTcZxLLkU15JV31sk+fAX1AiRDou+AsMDoaI/XnT PvnheiO3myRRNC6N8C9WPRkGCAg6ViMhQrhc48c9ofBIZNG65CRPNFw2TPxxR4djNlC3 9TmV1Op6mS7QqITfnNFIGc5UMNTRcUDJXiBvSCIwIhfxc4sOUK5COpR1teIIxbDt9pfy Xd9kYsA0+5VrAJHFzrcKYHZJ+Dr4K+U8ON2uq/k2gAHPynjPkWAZnRcM6hfzklS4/8MF 2laq1TqVJQTkubDU9OKq4zzJXeTp9+HfqYZoUPhAmh6QFCE3/eQeyy/htKp2OEUWzXO+ eGzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=dateHzfZw4hPd5wFKbYuTwuR2vJkBtjz6R2J9fChvLQ=; b=E72rVTIvxlm7zNNOdtvIHUKn1m/GPOg5MFeLU7qdVNb6ri5KLuGzc+kIlwD81XlWL3 XdnFPEe+usV39BXGKcBJTRnmwX0QZdU3ZQlL1PTC7f9GkrcREsAdMuDJw3baOt40clwb dqYLPDbAOnOiAJjUsxbTpYiXdRmpB69CKLG1ZjHPZNBy9dzTgInjiwPxuVVHR0Ajoigt LHM/0R6heQxRJpZFogl/G4M2TAUICMY9XPmlL21jAYY4SvlhSZBdazyK3iy4Uuuz86ZQ 3Sd8jrSucHzS4zCz20xK6AJx0VzYZwsq3c2jR6eaGwR4UgEqHBz/LBmvmlpqx9aRweIS WTUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=Ev6IiYZ+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 90si16486571edr.528.2020.08.19.06.22.12; Wed, 19 Aug 2020 06:22:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@paul-moore-com.20150623.gappssmtp.com header.s=20150623 header.b=Ev6IiYZ+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727854AbgHSNUJ (ORCPT + 99 others); Wed, 19 Aug 2020 09:20:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728208AbgHSNR0 (ORCPT ); Wed, 19 Aug 2020 09:17:26 -0400 Received: from mail-ej1-x644.google.com (mail-ej1-x644.google.com [IPv6:2a00:1450:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6442BC061344 for ; Wed, 19 Aug 2020 06:17:25 -0700 (PDT) Received: by mail-ej1-x644.google.com with SMTP id g19so26210567ejc.9 for ; Wed, 19 Aug 2020 06:17:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paul-moore-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dateHzfZw4hPd5wFKbYuTwuR2vJkBtjz6R2J9fChvLQ=; b=Ev6IiYZ+OlH/SLqTtba7hvYAp8ZrC6H01bllc6jG+Y5MVimN3xs0fUUEGorLZEJEaz L/iZOR1mKogDqsk4V33A9qSfOwIJxoKeiczOZ/g+OnoZnxAZUzdIhc9SToh7CDd5y2YA PVDNLrUeMi3cVmklmjDL8B+j7houk5N26aHhoAY5peALSzS2nuPCzFIqXiGKUn1oR0/y B5a8qqpwlC7yewZnECWudOrH6bWg5/+OzxGieVIjdtxHq17DWEd/LoZuLyhFi1riXG7I 055uWs7qw9OPmv1Ybi84aIl0KiAMHZimEKX6cq+FhlYtGf0A/o/r5obMctbu5wOBJTJf 3Crw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dateHzfZw4hPd5wFKbYuTwuR2vJkBtjz6R2J9fChvLQ=; b=tciy65PF+1t6AmWaEkANe3e5UYsD1DTskN653jXeUbD9HQ0dJrMcbqghOoy4hLKHVb aR3waQoVy5J/7s2xmm1AEhjme++Vb25kov+QNDwQX4sbL0UgIJAdCfTedpae3Y25Stz/ Fg4HzvZv7qFCjQJ3gBo4C5K1QyPugeLzx38D/+wnDQmC1a0xa8BNbB2Fl69aufCvhOfh +sXoIGb78JSERX48mIUACNZwsbD2owZjrMCAgDBNIXjxcx0oktUvulh0ZVE7JgrhCULT 0fk0HUfy5XzwHPw0E68Sxsy6P4OTS/+EPvb4MAbHk57msWCeObeiOEY33HBVOE4oWXNF HfQQ== X-Gm-Message-State: AOAM531QVAPKp1bvrwKAsu2Hpgpja4fPiMlBQ0DAidbwIG0kBlCabHeM mM9Aa9JRa9lMfjk8LFnEC0vKK2ikHth9m9q0A1n+ X-Received: by 2002:a17:906:1911:: with SMTP id a17mr23590862eje.431.1597843043948; Wed, 19 Aug 2020 06:17:23 -0700 (PDT) MIME-Version: 1.0 References: <20200819104256.51499-1-colin.king@canonical.com> In-Reply-To: <20200819104256.51499-1-colin.king@canonical.com> From: Paul Moore Date: Wed, 19 Aug 2020 09:17:13 -0400 Message-ID: Subject: Re: [PATCH][next] selinux: fix allocation failure check on newpolicy->sidtab To: Colin King Cc: Stephen Smalley , Eric Paris , Ondrej Mosnacek , selinux@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 19, 2020 at 6:42 AM Colin King wrote: > From: Colin Ian King > > The allocation check of newpolicy->sidtab is null checking if > newpolicy is null and not newpolicy->sidtab. Fix this. > > Addresses-Coverity: ("Logically dead code") > Fixes: c7c556f1e81b ("selinux: refactor changing booleans") > Signed-off-by: Colin Ian King > --- > security/selinux/ss/services.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Thanks Colin, merged into selinux/next. -- paul moore www.paul-moore.com