Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp171205imm; Thu, 10 May 2018 17:58:11 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrOLTb4Z8IUBwf9wPxKk/yzpS3Bx7+ycWCyGwMw9TbDSqsqFjQfTf9NYJ4q039wSVVodI4H X-Received: by 2002:a62:22db:: with SMTP id p88-v6mr3352360pfj.239.1526000291182; Thu, 10 May 2018 17:58:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526000291; cv=none; d=google.com; s=arc-20160816; b=KTYDrWbF1BorE2YGExnsCD73fyWC5YFTp30nR2c0olOzQmX5HKEPX0YoEWVMm+ppKG KYAAO9XTA+QJD4pQm2i5elzhAzf/zYHfKPu1/7ZQngYsBYgxYwzCofsQL3KcNClz8nq7 Jxogdv+BQ2JbDZZ1na5qWBvikIihV+G0cgPxpx7K28ScfV+095bPK9ZYCRXWVF3bYU6h C1z0HosbkrepIG+je+v6lvGqvQ4hgITYFv+AP0uLmveykn+65sefNubs9A/MzsrmYKDF mh5FoKLP2JUT2LQjYfyIoqfVEmZh/yTpPjqDW1WftOYqVxwGcE2qXLaUjT5bkjZ7e2b1 MqHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature :arc-authentication-results; bh=g1TAnpJXJZB0e1HO/Y7kG8s22Pao1DWLqfmO/+/ZSDQ=; b=xD02xBG/Js9eYjXDpXy8G+sppLd8RPo1v4Ea9lltRDe+PoBOZXqPh2aodb44vOZDEy uCwjc49oYIl6S+h/SrTH2M7SlrjGLaPVcb8/7vru50ck2DrAYjhTJY5q8tApMm0ylnVu CFtcULnTH/2n4aWmSaZQshPVdS5qwm9YckxWNZc41+FIDrN4YigyKwy0tlrNItP2ytxL V8kN2vJMVZPmctBuJpX+wT+n0/wEMh3wh7HnyeioSjunDuzTenEb8NyCBMneGrSfGsAe p+amExmC/EHi0DXV6Dsv+6kb3McRu8RkwzMg2NCqy9nyqEfRb/uMAJ5h3NuKgA8zaC4f H/vA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yahoo.com header.s=s2048 header.b=FieDk6tU; 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 t135-v6si1672712pgc.656.2018.05.10.17.57.56; Thu, 10 May 2018 17:58:11 -0700 (PDT) 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; dkim=pass header.i=@yahoo.com header.s=s2048 header.b=FieDk6tU; 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 S1752558AbeEKA4U (ORCPT + 99 others); Thu, 10 May 2018 20:56:20 -0400 Received: from sonic311-29.consmr.mail.ne1.yahoo.com ([66.163.188.210]:43517 "EHLO sonic311-29.consmr.mail.ne1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752167AbeEKA4R (ORCPT ); Thu, 10 May 2018 20:56:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1526000176; bh=g1TAnpJXJZB0e1HO/Y7kG8s22Pao1DWLqfmO/+/ZSDQ=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=FieDk6tUPTSM7RhUKEK9vhr/Ha9HTfpZXaxMgtNLWlKDDN6W0y31hlh1J2F84PAyWqB4YGtKtS3/AgJvn9F/fEffmOT+JsxsmzuYOYTiM6d9k58BfejNZIFa51Xmaaz9emLLdM07HrmG1QFKdV1yuFb5qvvQ5rKpGjBe6C0okY8dW4RvMbbE2F3f4cD5fx78RVnUMjHOJ4WZ5pu8J1tVZV+me0VinKZbIlWSGYmA9cs9UFZMn0+AWGOXW2GY/733WuKUZAMhus2U1Vj5zpz3GVgcGd3IwZ1f51aoR4kdp1CMuim+QWO+U5tCLuHW8KZWOTIG0frfsSL27GeSdy4Fzg== X-YMail-OSG: VuK0DXUVM1n_IzsaqRR1H.u.8WvEEMcV8nF0wYSMBDd2Ohxvlgb27tcIN4l4j_n eXCFkIdzB8rTYftb01GfmkcASSuSJN1VnVfP.YZIrGDjPvm5Lf.GBVPrpfjl846FtA3PWU0KmHKy EZhDEHBkCRAc3jgRk3u0Lgv1v0pAuSycJ2q1PScpACMDCglZVZWz9lqhu46V_4zf.haQveMMQsAp gMbFi8HwBw1XHAy2EG6f1QFCNF0H54cOlFqKD2cSKQnaLhBjGHCfn6Bstt8NXW1z2Dy.ChBuhsnG zdfLrD3l8TvYWjROE68EWLXckdZHw8TMeeTSOQnnEc79W3kL2IP5MnKhb05e5YSJreXJm7viRRS. .Vpz_aUv_NZDuU4d.l.ItloAvIB8i.VFqRNaIxMNG.Z6JyI8XZbv7mqAhZdQz2eytM_fECkchjhk ab0j8NvEeLZv9bB0uAyu0FO2uDqHD12N3t7t5GuMqyP5s2Dv9DDhr.tcc8E4v1dchenPsjp53JJb x5g9PZ7qlkcHXnp0cRF9K7e5AwFnR_UNt3QJ3.hlxWJs2pr__VvJ93gv8ZaFBp8NRkIk15tYSZ8Q jZ_s6hhFm1NNQAypXk4kn_5oZKYXAZi83m9dE72A5Qqjurqm83miRs8IqPFR8c5AgmsgOz5KetqF Gtjo- Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.ne1.yahoo.com with HTTP; Fri, 11 May 2018 00:56:16 +0000 Received: from c-67-169-65-224.hsd1.ca.comcast.net (EHLO [192.168.0.105]) ([67.169.65.224]) by smtp426.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 8cdc59684a8da2cba5897d46226dbf75; Fri, 11 May 2018 00:56:13 +0000 (UTC) Subject: [PATCH 22/23] LSM: Fix setting of the IMA data in inode init To: LSM , LKLM , Paul Moore , Stephen Smalley , SE Linux , "SMACK-discuss@lists.01.org" , John Johansen , Kees Cook , Tetsuo Handa , James Morris References: <7e8702ce-2598-e0a3-31a2-bc29157fb73d@schaufler-ca.com> From: Casey Schaufler Message-ID: Date: Thu, 10 May 2018 17:56:10 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <7e8702ce-2598-e0a3-31a2-bc29157fb73d@schaufler-ca.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Casey Schaufler Date: Thu, 10 May 2018 16:23:47 -0700 Subject: [PATCH 22/23] LSM: Fix setting of the IMA data in inode init Fix a missing assignment in the inode security initialization. The EVM entry was not being set correctly. Signed-off-by: Casey Schaufler --- security/security.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/security/security.c b/security/security.c index ef51783e967e..571643cc7256 100644 --- a/security/security.c +++ b/security/security.c @@ -941,6 +941,7 @@ int security_inode_init_security(struct inode *inode, struct inode *dir, &lsm_xattr->value_len); if (rc == 0) { lsm_xattr++; + evm_xattr = lsm_xattr; if (ret == -EOPNOTSUPP) ret = 0; } else if (rc != -EOPNOTSUPP) { @@ -950,7 +951,7 @@ int security_inode_init_security(struct inode *inode, struct inode *dir, } if (ret == 0) { - rc = evm_inode_init_security(inode, lsm_xattr, evm_xattr); + rc = evm_inode_init_security(inode, new_xattrs, evm_xattr); if (rc == 0) rc = initxattrs(inode, new_xattrs, fs_data); } -- 2.14.3