Received: by 10.223.176.5 with SMTP id f5csp1002569wra; Fri, 2 Feb 2018 09:31:18 -0800 (PST) X-Google-Smtp-Source: AH8x224nY46zx3iuq75JfV8Cy6tMJbRyM9BrNXbUo2TgL601kxTYQkBFxT69ejDR6paKuEF2F3oO X-Received: by 2002:a17:902:7887:: with SMTP id q7-v6mr12823494pll.385.1517592678417; Fri, 02 Feb 2018 09:31:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517592678; cv=none; d=google.com; s=arc-20160816; b=PzBGj7ri6WZd/10HqrhAD5Mijd629D9zwrzr1814C1xd+WzQT+LrYHs7pSZSZG8iKU JmMsHg4UgxETzdJBwSATuA5lRRTXqQY+ovHULcOx//61Q6n1t0VxiOcXTjOnxtiQAsni 5zeD+y95lcnCuVMYjKnFfgvI9sgVB4Kw8MJ8bRGKwWNEprix+jDNln+zhDXgkoSAy7qj OH3tu97Zp9X+AXu7qb/gMDsM+qJNhFG0YYEbbPZyehnWCRpSabFw82P2kYJP8kiXKfr0 Gxfy186WHRBfxzoTx4UWJzT3+elW3vqS4JRUlftTgOLnJQ3BQ/IgktU7b2zxhKXtBvle /N2w== 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=UMTtu99kDFWcoJq54MftRi3cvzF2Edgew8Tnj63snvA=; b=Kj1pkHsrAs9Dy9KLPgWliS1pGyFNf/A3iBhrB2SbUcdMCgajtl4Ik1KuREH4tdKtjO a1yhOtFZFP4MycK4P1Gy+q/atQkHaQK92ogPJuDRJGm3NNJlUEL8QLu4yp21CNYQNlrx /3NBpy6ITcp6fIavCM9gWWkTFDjgWZqf/FeJ/87D6zCVWHADb30Tr0YHEauAVLMwx5dc SK3R8a+5Q7iOG+hMgs3a1Gdy3Xq0ZKIXkBxoTbUGJNc3HRrgsm3y+bxG05L0PEPAwkzC 6hR3eJMfZ7G+O7qxjPAzLmWqMN+VOiVbmrEm71wAGtFUgkjZa+cR+VbWVHxNlEbogjkT 45VQ== 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 n6-v6si2157495plp.562.2018.02.02.09.31.03; Fri, 02 Feb 2018 09:31:18 -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 S1754165AbeBBR2m (ORCPT + 99 others); Fri, 2 Feb 2018 12:28:42 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:41082 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753860AbeBBRQr (ORCPT ); Fri, 2 Feb 2018 12:16:47 -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 0BDC5BC4; Fri, 2 Feb 2018 17:16:46 +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.15 23/55] ima/policy: fix parsing of fsuuid Date: Fri, 2 Feb 2018 17:58:41 +0100 Message-Id: <20180202140828.602792229@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180202140826.117602411@linuxfoundation.org> References: <20180202140826.117602411@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.15-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; }