<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/security/integrity/ima/ima_fs.c, branch linux-3.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-11-22T06:32:43Z</updated>
<entry>
<title>ima: fix showing large 'violations' or 'runtime_measurements_count'</title>
<updated>2018-11-22T06:32:43Z</updated>
<author>
<name>Eric Biggers</name>
</author>
<published>2018-09-07T21:33:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2d5aa48311da92befed1d23f8290d74e9b6c3672'/>
<id>urn:sha1:2d5aa48311da92befed1d23f8290d74e9b6c3672</id>
<content type='text'>
commit 1e4c8dafbb6bf72fb5eca035b861e39c5896c2b7 upstream.

The 12 character temporary buffer is not necessarily long enough to hold
a 'long' value.  Increase it.

Signed-off-by: Eric Biggers &lt;ebiggers@google.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Mimi Zohar &lt;zohar@linux.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>ima: fix ima_show_template_data_ascii()</title>
<updated>2015-07-04T03:02:31Z</updated>
<author>
<name>Mimi Zohar</name>
</author>
<published>2015-06-11T15:54:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cdbbbe19dd7dde385233508367aeec020e089c25'/>
<id>urn:sha1:cdbbbe19dd7dde385233508367aeec020e089c25</id>
<content type='text'>
[ Upstream commit 45b26133b97871896b8c5241d59f4ff7839db7b2 ]

This patch fixes a bug introduced in "4d7aeee ima: define new template
ima-ng and template fields d-ng and n-ng".

Changelog:
- change int to uint32 (Roberto Sassu's suggestion)

Signed-off-by: Mimi Zohar &lt;zohar@linux.vnet.ibm.com&gt;
Signed-off-by: Roberto Sassu &lt;rsassu@suse.de&gt;
Cc: stable@vger.kernel.org # 3.13
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>integrity: fix checkpatch errors</title>
<updated>2014-03-07T17:15:45Z</updated>
<author>
<name>Dmitry Kasatkin</name>
</author>
<published>2014-03-04T16:04:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2bb930abcf39d8be243ddb4583cf013ea2a750d6'/>
<id>urn:sha1:2bb930abcf39d8be243ddb4583cf013ea2a750d6</id>
<content type='text'>
Between checkpatch changes (eg. sizeof) and inconsistencies between
Lindent and checkpatch, unfixed checkpatch errors make it difficult
to see new errors. This patch fixes them. Some lines with over 80 chars
remained unchanged to improve code readability.

The "extern" keyword is removed from internal evm.h to make it consistent
with internal ima.h.

Signed-off-by: Dmitry Kasatkin &lt;d.kasatkin@samsung.com&gt;
Signed-off-by: Mimi Zohar &lt;zohar@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>ima: restore the original behavior for sending data with ima template</title>
<updated>2014-03-07T16:32:29Z</updated>
<author>
<name>Roberto Sassu</name>
</author>
<published>2014-02-03T12:56:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c019e307ad82a8ee652b8ccbacf69ae94263b07b'/>
<id>urn:sha1:c019e307ad82a8ee652b8ccbacf69ae94263b07b</id>
<content type='text'>
With the new template mechanism introduced in IMA since kernel 3.13,
the format of data sent through the binary_runtime_measurements interface
is slightly changed. Now, for a generic measurement, the format of
template data (after the template name) is:

template_len | field1_len | field1 | ... | fieldN_len | fieldN

In addition, fields containing a string now include the '\0' termination
character.

Instead, the format for the 'ima' template should be:

SHA1 digest | event name length | event name

It must be noted that while in the IMA 3.13 code 'event name length' is
'IMA_EVENT_NAME_LEN_MAX + 1' (256 bytes), so that the template digest
is calculated correctly, and 'event name' contains '\0', in the pre 3.13
code 'event name length' is exactly the string length and 'event name'
does not contain the termination character.

The patch restores the behavior of the IMA code pre 3.13 for the 'ima'
template so that legacy userspace tools obtain a consistent behavior
when receiving data from the binary_runtime_measurements interface
regardless of which kernel version is used.

Signed-off-by: Roberto Sassu &lt;roberto.sassu@polito.it&gt;
Cc: &lt;stable@vger.kernel.org&gt; # 3.3.13: 3ce1217 ima: define template fields library
Signed-off-by: Mimi Zohar &lt;zohar@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>ima: do not send field length to userspace for digest of ima template</title>
<updated>2013-11-25T12:31:14Z</updated>
<author>
<name>Roberto Sassu</name>
</author>
<published>2013-11-08T18:21:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3e8e5503a33577d89bdb7469b851b11f507bbed6'/>
<id>urn:sha1:3e8e5503a33577d89bdb7469b851b11f507bbed6</id>
<content type='text'>
This patch defines a new value for the 'ima_show_type' enumerator
(IMA_SHOW_BINARY_NO_FIELD_LEN) to prevent that the field length
is transmitted through the 'binary_runtime_measurements' interface
for the digest field of the 'ima' template.

Fixes commit: 3ce1217 ima: define template fields library and new helpers

Signed-off-by: Roberto Sassu &lt;roberto.sassu@polito.it&gt;
Signed-off-by: Mimi Zohar &lt;zohar@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>ima: switch to new template management mechanism</title>
<updated>2013-10-25T21:17:06Z</updated>
<author>
<name>Roberto Sassu</name>
</author>
<published>2013-06-07T10:16:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a71dc65d30a472409f05d247f4eab91b14acf2f5'/>
<id>urn:sha1:a71dc65d30a472409f05d247f4eab91b14acf2f5</id>
<content type='text'>
This patch performs the switch to the new template mechanism by modifying
the functions ima_alloc_init_template(), ima_measurements_show() and
ima_ascii_measurements_show(). The old function ima_template_show() was
removed as it is no longer needed. Also, if the template descriptor used
to generate a measurement entry is not 'ima', the whole length of field
data stored for an entry is provided before the data itself through the
binary_runtime_measurement interface.

Changelog:
- unnecessary to use strncmp() (Mimi Zohar)
- create new variable 'field' in ima_alloc_init_template() (Roberto Sassu)
- use GFP_NOFS flag in ima_alloc_init_template() (Roberto Sassu)
- new variable 'num_fields' in ima_store_template() (Roberto Sassu,
  proposed by Mimi Zohar)
- rename ima_calc_buffer_hash/template_hash() to ima_calc_field_array_hash(),
  something more generic (Mimi, requested by Dmitry)
- sparse error fix - Fengguang Wu
- fix lindent warnings
- always include the field length in the template data length
- include the template field length variable size in the template data length
- include both the template field data and field length in the template digest
  calculation. Simplifies verifying the template digest. (Mimi)

Signed-off-by: Roberto Sassu &lt;roberto.sassu@polito.it&gt;
Signed-off-by: Mimi Zohar &lt;zohar@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>ima: define template fields library and new helpers</title>
<updated>2013-10-25T21:17:05Z</updated>
<author>
<name>Roberto Sassu</name>
</author>
<published>2013-06-07T10:16:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3ce1217d6cd5dfa82a9db5c2a999cc1bb01490d9'/>
<id>urn:sha1:3ce1217d6cd5dfa82a9db5c2a999cc1bb01490d9</id>
<content type='text'>
This patch defines a library containing two initial template fields,
inode digest (d) and file name (n), the 'ima' template descriptor,
whose format is 'd|n', and two helper functions,
ima_write_template_field_data() and ima_show_template_field_data().

Changelog:
- replace ima_eventname_init() parameter NULL checking with BUG_ON.
  (suggested by Mimi)
- include "new template fields for inode digest (d) and file name (n)"
  definitions to fix a compiler warning.  - Mimi
- unnecessary to prefix static function names with 'ima_'. remove
  prefix to resolve Lindent formatting changes. - Mimi
- abbreviated/removed inline comments - Mimi
- always send the template field length - Mimi

Signed-off-by: Roberto Sassu &lt;roberto.sassu@polito.it&gt;
Signed-off-by: Mimi Zohar &lt;zohar@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>ima: differentiate between template hash and file data hash sizes</title>
<updated>2013-10-25T21:17:00Z</updated>
<author>
<name>Mimi Zohar</name>
</author>
<published>2013-03-12T00:29:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=140d802240a4ba3351494b4ab199964b96f87493'/>
<id>urn:sha1:140d802240a4ba3351494b4ab199964b96f87493</id>
<content type='text'>
The TPM v1.2 limits the template hash size to 20 bytes.  This
patch differentiates between the template hash size, as defined
in the ima_template_entry, and the file data hash size, as
defined in the ima_template_data.  Subsequent patches add support
for different file data hash algorithms.

Change log:
- hash digest definition in ima_store_template() should be TPM_DIGEST_SIZE

Signed-off-by: Mimi Zohar &lt;zohar@us.ibm.com&gt;
</content>
</entry>
<entry>
<title>ima: fix script messages</title>
<updated>2013-10-25T17:17:19Z</updated>
<author>
<name>Dmitry Kasatkin</name>
</author>
<published>2013-10-10T06:56:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=089bc8e95ae07b1ada14069935c30fd88204c21c'/>
<id>urn:sha1:089bc8e95ae07b1ada14069935c30fd88204c21c</id>
<content type='text'>
Fix checkpatch, lindent, etc, warnings/errors

Signed-off-by: Dmitry Kasatkin &lt;d.kasatkin@samsung.com&gt;
Signed-off-by: Mimi Zohar &lt;zohar@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>ima: remove unused cleanup functions</title>
<updated>2012-07-02T20:43:30Z</updated>
<author>
<name>Dmitry Kasatkin</name>
</author>
<published>2012-06-25T09:18:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c7de7adc18241a0eb10a6e1fed7cb1e01f53c85a'/>
<id>urn:sha1:c7de7adc18241a0eb10a6e1fed7cb1e01f53c85a</id>
<content type='text'>
IMA cannot be used as module and does not need __exit functions.
Removed them.

Signed-off-by: Dmitry Kasatkin &lt;dmitry.kasatkin@intel.com&gt;
Signed-off-by: Mimi Zohar &lt;zohar@linux.vnet.ibm.com&gt;
</content>
</entry>
</feed>
