Received: by 10.223.176.5 with SMTP id f5csp1039501wra; Fri, 2 Feb 2018 10:07:27 -0800 (PST) X-Google-Smtp-Source: AH8x224sw48xiXdjBxMqAJl8FicmZF/EAp4mI6FL0SN+QS2j9zOBkjU9sJazOI+Zqw5DSZAYj8CY X-Received: by 10.98.73.76 with SMTP id w73mr40795425pfa.61.1517594847792; Fri, 02 Feb 2018 10:07:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517594847; cv=none; d=google.com; s=arc-20160816; b=xqHYb5SC/V83cC/hm6oD8Pj6FjhPVKcQ8ABZB9B7g0ty4kiS2FbFgx7cl/OPbAGe+Y Eqzff9jnGygJ88T6hmP9bEBV9aPvW/cqtbpjJOn3/8mkJyOhUnC1bDLLymEDKvcE7C6O khL6aB9NfVfRs2aECDXiItMfstXn24nxADobMG3WZiH33rP1J8iiixKWSfasoUb1wXG7 SY9hknPNaDBIt1a+L/gLWtKs1iv6fcGl6xB7+dxb0sYZf8YFVwYQ4FhOCTtLeZH+JIvi Ql5yMTX1/llr3JXFiUSmvXgpMp90GyfXE2tcb4Zm6LN3DUw5iJpVwF5imq/rgWm407or pGaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=CDYkaNx5kBywvE8C5vO6LLiRus2JwWbhXbrsDrnCQSg=; b=P30UTPnb8gs4QSwdm7LoWqtxlmInC19TJx9Tt2xjAeFueF0bHsACInD44hQgIKB9II tA68KAUbAXkbPIWMt+Af2pcAEAezlDBJnvfvTh6d9xbMz369hNNxSkR+BzLZ2aMhCItn En+wlJFRWobJhQF1v3Tkwi3fAP9wKJ2UmrRXg/KPWEeegCuBb1//7eZes1JHzS2b/70K TiI51ufRUYM/OCYGXm3E64NHdK1mClBGcsS8f0XVCbJCk3ftg/OlVN2t4nobWBmC/y5n VJ09Su3kGRPrdc1ZEXYt3yNWGDhCvZRQLryXPy2/p9RfP2rwfy8VYhd7CVKdEN21nikd /PLg== 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 60-v6si2148882plc.444.2018.02.02.10.07.12; Fri, 02 Feb 2018 10:07:27 -0800 (PST) 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 S1753958AbeBBSGC (ORCPT + 99 others); Fri, 2 Feb 2018 13:06:02 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:37218 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753195AbeBBRII (ORCPT ); Fri, 2 Feb 2018 12:08:08 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id C2461EFB; Fri, 2 Feb 2018 17:08:06 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mike Rapoport , Mimi Zohar Subject: [PATCH 4.14 027/156] ima/policy: fix parsing of fsuuid Date: Fri, 2 Feb 2018 17:56:48 +0100 Message-Id: <20180202140841.538764031@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180202140840.242829545@linuxfoundation.org> References: <20180202140840.242829545@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 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 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mike Rapoport commit 36447456e1cca853188505f2a964dbbeacfc7a7a upstream. The switch to uuid_t invereted the logic of verfication that &entry->fsuuid is zero during parsing of "fsuuid=" rule. Instead of making sure the &entry->fsuuid field is not attempted to be overwritten, we bail out for perfectly correct rule. Fixes: 787d8c530af7 ("ima/policy: switch to use uuid_t") Signed-off-by: Mike Rapoport Signed-off-by: Mimi Zohar Signed-off-by: Greg Kroah-Hartman --- security/integrity/ima/ima_policy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/security/integrity/ima/ima_policy.c +++ b/security/integrity/ima/ima_policy.c @@ -743,7 +743,7 @@ static int ima_parse_rule(char *rule, st case Opt_fsuuid: ima_log_string(ab, "fsuuid", args[0].from); - if (uuid_is_null(&entry->fsuuid)) { + if (!uuid_is_null(&entry->fsuuid)) { result = -EINVAL; break; }