lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 02 Nov 2010 07:27:02 -0400
From:	Mimi Zohar <zohar@...ux.vnet.ibm.com>
To:	Roberto Sassu <roberto.sassu@...ito.it>
Cc:	linux-kernel@...r.kernel.org,
	linux-security-module@...r.kernel.org,
	linux-fsdevel@...r.kernel.org, James Morris <jmorris@...ei.org>,
	David Safford <safford@...son.ibm.com>,
	Dave Hansen <dave@...ux.vnet.ibm.com>
Subject: Re: [PATCH 1/3] evm: added flag IMA_NEW in the
 integrity_iint_cache structure

On Tue, 2010-11-02 at 11:05 +0100, Roberto Sassu wrote:
> The flag IMA_NEW is set in the function evm_inode_post_init_security()
> to distinguish between new and existent files and it is cleared in the
> function ima_dec_counts(). This permits to check/fix the 'security.ima'
> extended attribute properly in the function ima_appraise_measurement()
> without verifying the 'version' field of the 'integrity_iint_cache'
> structure.
> The 'i_version' field of the inode is not suitable for determining if a
> file is being created because the value '1' may be assumed by inodes
> already in the filesystem before mounting the same with the parameter
> 'iversion' as well as those newly created.
> 
> Signed-off-by: Roberto Sassu <roberto.sassu@...ito.it>

Hi Roberto.  Yes, the current patches are not differentiating an
existing file from a new one properly. I think it can be done by
replacing the 'inode->iversion == 1' test in ima_appraise_measurement()
with a test for 'inode->i_size == 0', without adding an xattr.
.
thanks,

Mimi

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ