<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/security/integrity/ima/ima_main.c, branch linux-3.3.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.3.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.3.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2011-09-09T23:56:30Z</updated>
<entry>
<title>ima: sparse fix: include linux/ima.h in ima_main.c</title>
<updated>2011-09-09T23:56:30Z</updated>
<author>
<name>James Morris</name>
</author>
<published>2011-08-30T00:19:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d5813a571876c72766f125b1c6e63414f6822c28'/>
<id>urn:sha1:d5813a571876c72766f125b1c6e63414f6822c28</id>
<content type='text'>
Fixes sparse warnings:
security/integrity/ima/ima_main.c:105:6: warning: symbol 'ima_file_free' was not declared. Should it be static?
security/integrity/ima/ima_main.c:167:5: warning: symbol 'ima_file_mmap' was not declared. Should it be static?
security/integrity/ima/ima_main.c:192:5: warning: symbol 'ima_bprm_check' was not declared. Should it be static?
security/integrity/ima/ima_main.c:211:5: warning: symbol 'ima_file_check' was not declared. Should it be static?

Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'next-evm' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/ima-2.6 into next</title>
<updated>2011-08-09T00:31:03Z</updated>
<author>
<name>James Morris</name>
</author>
<published>2011-08-09T00:31:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5a2f3a02aea164f4f59c0c3497772090a411b462'/>
<id>urn:sha1:5a2f3a02aea164f4f59c0c3497772090a411b462</id>
<content type='text'>
Conflicts:
	fs/attr.c

Resolve conflict manually.

Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>ima: fmode_t misspelled as mode_t...</title>
<updated>2011-07-26T17:04:32Z</updated>
<author>
<name>Al Viro</name>
</author>
<published>2011-07-26T08:30:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4b2a2c67415f1ab128f1d0b340fe6d13363335e5'/>
<id>urn:sha1:4b2a2c67415f1ab128f1d0b340fe6d13363335e5</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>integrity: move ima inode integrity data management</title>
<updated>2011-07-18T16:29:38Z</updated>
<author>
<name>Mimi Zohar</name>
</author>
<published>2011-03-09T19:13:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f381c272224f5f158f5cff64f8f3481fa0eee8b3'/>
<id>urn:sha1:f381c272224f5f158f5cff64f8f3481fa0eee8b3</id>
<content type='text'>
Move the inode integrity data(iint) management up to the integrity directory
in order to share the iint among the different integrity models.

Changelog:
- don't define MAX_DIGEST_SIZE
- rename several globally visible 'ima_' prefixed functions, structs,
  locks, etc to 'integrity_'
- replace '20' with SHA1_DIGEST_SIZE
- reflect location change in appropriate Kconfig and Makefiles
- remove unnecessary initialization of iint_initialized to 0
- rebased on current ima_iint.c
- define integrity_iint_store/lock as static

There should be no other functional changes.

Signed-off-by: Mimi Zohar &lt;zohar@us.ibm.com&gt;
Acked-by: Serge Hallyn &lt;serge.hallyn@ubuntu.com&gt;
</content>
</entry>
<entry>
<title>ima: remove unnecessary call to ima_must_measure</title>
<updated>2011-02-23T21:38:52Z</updated>
<author>
<name>Mimi Zohar</name>
</author>
<published>2011-02-22T15:19:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1adace9bb04a5f4a4dea9e642089102661bb0ceb'/>
<id>urn:sha1:1adace9bb04a5f4a4dea9e642089102661bb0ceb</id>
<content type='text'>
The original ima_must_measure() function based its results on cached
iint information, which required an iint be allocated for all files.
Currently, an iint is allocated only for files in policy.  As a result,
for those files in policy, ima_must_measure() is now called twice: once
to determine if the inode is in the measurement policy and, the second
time, to determine if it needs to be measured/re-measured.

The second call to ima_must_measure() unnecessarily checks to see if
the file is in policy. As we already know the file is in policy, this
patch removes the second unnecessary call to ima_must_measure(), removes
the vestige iint parameter, and just checks the iint directly to determine
if the inode has been measured or needs to be measured/re-measured.

Signed-off-by: Mimi Zohar &lt;zohar@us.ibm.com&gt;
Acked-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
</entry>
<entry>
<title>IMA: remove IMA imbalance checking</title>
<updated>2011-02-10T12:51:44Z</updated>
<author>
<name>Mimi Zohar</name>
</author>
<published>2010-11-02T14:14:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=854fdd55bfdd56cfc61bd30f2062a9268fcebba6'/>
<id>urn:sha1:854fdd55bfdd56cfc61bd30f2062a9268fcebba6</id>
<content type='text'>
Now that i_readcount is maintained by the VFS layer, remove the
imbalance checking in IMA. Cleans up the IMA code nicely.

Signed-off-by: Mimi Zohar &lt;zohar@us.ibm.com&gt;
Acked-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
</entry>
<entry>
<title>IMA: maintain i_readcount in the VFS layer</title>
<updated>2011-02-10T12:51:44Z</updated>
<author>
<name>Mimi Zohar</name>
</author>
<published>2010-11-02T14:13:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=890275b5eb79e9933d12290473eab9ac38da0051'/>
<id>urn:sha1:890275b5eb79e9933d12290473eab9ac38da0051</id>
<content type='text'>
ima_counts_get() updated the readcount and invalidated the PCR,
as necessary. Only update the i_readcount in the VFS layer.
Move the PCR invalidation checks to ima_file_check(), where it
belongs.

Maintaining the i_readcount in the VFS layer, will allow other
subsystems to use i_readcount.

Signed-off-by: Mimi Zohar &lt;zohar@us.ibm.com&gt;
Acked-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
</entry>
<entry>
<title>IMA: convert i_readcount to atomic</title>
<updated>2011-02-10T12:51:43Z</updated>
<author>
<name>Mimi Zohar</name>
</author>
<published>2010-11-02T14:10:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a68a27b6f2354273bacc39c3dd06456edb202230'/>
<id>urn:sha1:a68a27b6f2354273bacc39c3dd06456edb202230</id>
<content type='text'>
Convert the inode's i_readcount from an unsigned int to atomic.

Signed-off-by: Mimi Zohar &lt;zohar@us.ibm.com&gt;
Acked-by: Eric Paris &lt;eparis@redhat.com&gt;
</content>
</entry>
<entry>
<title>IMA: fix the ToMToU logic</title>
<updated>2010-10-26T18:37:19Z</updated>
<author>
<name>Eric Paris</name>
</author>
<published>2010-10-25T18:42:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bade72d607c4eb1b1d6c7852c493b75f065a56b5'/>
<id>urn:sha1:bade72d607c4eb1b1d6c7852c493b75f065a56b5</id>
<content type='text'>
Current logic looks like this:

        rc = ima_must_measure(NULL, inode, MAY_READ, FILE_CHECK);
        if (rc &lt; 0)
                goto out;

        if (mode &amp; FMODE_WRITE) {
                if (inode-&gt;i_readcount)
                        send_tomtou = true;
                goto out;
        }

        if (atomic_read(&amp;inode-&gt;i_writecount) &gt; 0)
                send_writers = true;

Lets assume we have a policy which states that all files opened for read
by root must be measured.

Lets assume the file has permissions 777.

Lets assume that root has the given file open for read.

Lets assume that a non-root process opens the file write.

The non-root process will get to ima_counts_get() and will check the
ima_must_measure().  Since it is not supposed to measure it will goto
out.

We should check the i_readcount no matter what since we might be causing
a ToMToU voilation!

This is close to correct, but still not quite perfect.  The situation
could have been that root, which was interested in the mesurement opened
and closed the file and another process which is not interested in the
measurement is the one holding the i_readcount ATM.  This is just overly
strict on ToMToU violations, which is better than not strict enough...

Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
Acked-by: Mimi Zohar &lt;zohar@linux.vnet.ibm.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>IMA: explicit IMA i_flag to remove global lock on inode_delete</title>
<updated>2010-10-26T18:37:19Z</updated>
<author>
<name>Eric Paris</name>
</author>
<published>2010-10-25T18:42:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=196f518128d2ee6e0028b50e6fec0313640db142'/>
<id>urn:sha1:196f518128d2ee6e0028b50e6fec0313640db142</id>
<content type='text'>
Currently for every removed inode IMA must take a global lock and search
the IMA rbtree looking for an associated integrity structure.  Instead
we explicitly mark an inode when we add an integrity structure so we
only have to take the global lock and do the removal if it exists.

Signed-off-by: Eric Paris &lt;eparis@redhat.com&gt;
Acked-by: Mimi Zohar &lt;zohar@linux.vnet.ibm.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
