<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/security/integrity, branch v3.14</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.14</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.14'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-01-06T11:23:01Z</updated>
<entry>
<title>Merge to v3.13-rc7 for prerequisite changes in the Xen code for TPM</title>
<updated>2014-01-06T11:23:01Z</updated>
<author>
<name>James Morris</name>
<email>james.l.morris@oracle.com</email>
</author>
<published>2014-01-06T11:23:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=38fd2c202a3d82bc12430bce5789fa2c2a406f71'/>
<id>urn:sha1:38fd2c202a3d82bc12430bce5789fa2c2a406f71</id>
<content type='text'>
</content>
</entry>
<entry>
<title>ima: remove unneeded size_limit argument from ima_eventdigest_init_common()</title>
<updated>2014-01-03T12:43:00Z</updated>
<author>
<name>Roberto Sassu</name>
<email>roberto.sassu@polito.it</email>
</author>
<published>2013-11-08T18:21:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dcf4e392867bf98d50ad108ed7c2bfb941e8c33d'/>
<id>urn:sha1:dcf4e392867bf98d50ad108ed7c2bfb941e8c33d</id>
<content type='text'>
This patch removes the 'size_limit' argument from
ima_eventdigest_init_common(). Since the 'd' field will never include
the hash algorithm as prefix and the 'd-ng' will always have it, we can
use the hash algorithm to differentiate the two cases in the modified
function (it is equal to HASH_ALGO__LAST in the first case, the opposite
in the second).

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: pass HASH_ALGO__LAST as hash algo in ima_eventdigest_init()</title>
<updated>2014-01-03T12:42:59Z</updated>
<author>
<name>Roberto Sassu</name>
<email>roberto.sassu@polito.it</email>
</author>
<published>2013-11-08T18:21:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=712a49bd7d00d567edd5235e6e9034c55052446b'/>
<id>urn:sha1:712a49bd7d00d567edd5235e6e9034c55052446b</id>
<content type='text'>
Replace the '-1' value with HASH_ALGO__LAST in ima_eventdigest_init()
as the called function ima_eventdigest_init_common() expects an unsigned
char.

Fix commit:
  4d7aeee ima: define new template ima-ng and template fields d-ng and n-ng

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: change the default hash algorithm to SHA1 in ima_eventdigest_ng_init()</title>
<updated>2014-01-03T12:42:57Z</updated>
<author>
<name>Roberto Sassu</name>
<email>roberto.sassu@polito.it</email>
</author>
<published>2013-11-08T18:21:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c502c78ba7fb5b9cef71e2bd70f12c38ef26e5ab'/>
<id>urn:sha1:c502c78ba7fb5b9cef71e2bd70f12c38ef26e5ab</id>
<content type='text'>
Replace HASH_ALGO__LAST with HASH_ALGO_SHA1 as the initial value of
the hash algorithm so that the prefix 'sha1:' is added to violation
digests.

Fix commit:
  4d7aeee ima: define new template ima-ng and template fields d-ng and n-ng

Signed-off-by: Roberto Sassu &lt;roberto.sassu@polito.it&gt;
Cc: &lt;stable@vger.kernel.org&gt; # 3.13.x
Signed-off-by: Mimi Zohar &lt;zohar@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>ima: properly free ima_template_entry structures</title>
<updated>2013-12-03T01:46:56Z</updated>
<author>
<name>Roberto Sassu</name>
<email>roberto.sassu@polito.it</email>
</author>
<published>2013-12-02T18:40:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a7ed7c60e14df5b986f93549717235b882643e7e'/>
<id>urn:sha1:a7ed7c60e14df5b986f93549717235b882643e7e</id>
<content type='text'>
The new templates management mechanism records information associated
to an event into an array of 'ima_field_data' structures and makes it
available through the 'template_data' field of the 'ima_template_entry'
structure (the element of the measurements list created by IMA).

Since 'ima_field_data' contains dynamically allocated data (which length
varies depending on the data associated to a selected template field),
it is not enough to just free the memory reserved for a
'ima_template_entry' structure if something goes wrong.

This patch creates the new function ima_free_template_entry() which
walks the array of 'ima_field_data' structures, frees the memory
referenced by the 'data' pointer and finally the space reserved for
the 'ima_template_entry' structure. Further, it replaces existing kfree()
that have a pointer to an 'ima_template_entry' structure as argument
with calls to the new function.

Fixes: a71dc65: ima: switch to new template management mechanism
Signed-off-by: Roberto Sassu &lt;roberto.sassu@polito.it&gt;
Signed-off-by: Mimi Zohar &lt;zohar@us.ibm.com&gt;
</content>
</entry>
<entry>
<title>ima: Do not free 'entry' before it is initialized</title>
<updated>2013-12-03T01:46:32Z</updated>
<author>
<name>Christoph Paasch</name>
<email>christoph.paasch@uclouvain.be</email>
</author>
<published>2013-12-01T23:05:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=09ae6345721afbb7cf3e0920209b140cbe7bff0d'/>
<id>urn:sha1:09ae6345721afbb7cf3e0920209b140cbe7bff0d</id>
<content type='text'>
7bc5f447ce9d0 (ima: define new function ima_alloc_init_template() to
API) moved the initialization of 'entry' in ima_add_boot_aggregate() a
bit more below, after the if (ima_used_chip).

So, 'entry' is not initialized while being inside this if-block. So, we
should not attempt to free it.

Found by Coverity (CID: 1131971)

Fixes: 7bc5f447ce9d0 (ima: define new function ima_alloc_init_template() to API)
Signed-off-by: Christoph Paasch &lt;christoph.paasch@uclouvain.be&gt;
Signed-off-by: Mimi Zohar &lt;zohar@us.ibm.com&gt;
</content>
</entry>
<entry>
<title>ima: store address of template_fmt_copy in a pointer before calling strsep</title>
<updated>2013-11-30T02:09:53Z</updated>
<author>
<name>Roberto Sassu</name>
<email>roberto.sassu@polito.it</email>
</author>
<published>2013-11-27T13:40:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=af91706d5ddecb4a9858cca9e90d463037cfd498'/>
<id>urn:sha1:af91706d5ddecb4a9858cca9e90d463037cfd498</id>
<content type='text'>
This patch stores the address of the 'template_fmt_copy' variable in a new
variable, called 'template_fmt_ptr', so that the latter is passed as an
argument of strsep() instead of the former. This modification is needed
in order to correctly free the memory area referenced by
'template_fmt_copy' (strsep() modifies the pointer of the passed string).

Signed-off-by: Roberto Sassu &lt;roberto.sassu@polito.it&gt;
Reported-by: Sebastian Ott &lt;sebott@linux.vnet.ibm.com&gt;
Signed-off-by: Mimi Zohar &lt;zohar@us.ibm.com&gt;
Signed-off-by: James Morris &lt;james.l.morris@oracle.com&gt;
</content>
</entry>
<entry>
<title>ima: make a copy of template_fmt in template_desc_init_fields()</title>
<updated>2013-11-25T20:05:33Z</updated>
<author>
<name>Roberto Sassu</name>
<email>roberto.sassu@polito.it</email>
</author>
<published>2013-11-25T19:18:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dbc335d2dc3c437649eb6b39f4e9aee2a13eb0af'/>
<id>urn:sha1:dbc335d2dc3c437649eb6b39f4e9aee2a13eb0af</id>
<content type='text'>
This patch makes a copy of the 'template_fmt' function argument so that
the latter will not be modified by strsep(), which does the splitting by
replacing the given separator with '\0'.

 IMA: No TPM chip found, activating TPM-bypass!
 Unable to handle kernel pointer dereference at virtual kernel address 0000000000842000
 Oops: 0004 [#1] SMP
 Modules linked in:
 CPU: 3 PID: 1 Comm: swapper/0 Not tainted 3.12.0-rc2-00098-g3ce1217d6cd5 #17
 task: 000000003ffa0000 ti: 000000003ff84000 task.ti: 000000003ff84000
 Krnl PSW : 0704e00180000000 000000000044bf88 (strsep+0x7c/0xa0)
            R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:2 PM:0 EA:3
 Krnl GPRS: 000000000000007c 000000000000007c 000000003ff87d90 0000000000821fd8
            0000000000000000 000000000000007c 0000000000aa37e0 0000000000aa9008
            0000000000000051 0000000000a114d8 0000000100000002 0000000000842bde
            0000000000842bdf 00000000006f97f0 000000000040062c 000000003ff87cf0
 Krnl Code: 000000000044bf7c: a7f4000a           brc     15,44bf90
            000000000044bf80: b90200cc           ltgr    %r12,%r12
           #000000000044bf84: a7840006           brc     8,44bf90
           &gt;000000000044bf88: 9200c000           mvi     0(%r12),0
            000000000044bf8c: 41c0c001           la      %r12,1(%r12)
            000000000044bf90: e3c020000024       stg     %r12,0(%r2)
            000000000044bf96: b904002b           lgr     %r2,%r11
            000000000044bf9a: ebbcf0700004       lmg     %r11,%r12,112(%r15)
 Call Trace:
 ([&lt;00000000004005fe&gt;] ima_init_template+0xa2/0x1bc)
  [&lt;0000000000a7c896&gt;] ima_init+0x7a/0xa8
  [&lt;0000000000a7c938&gt;] init_ima+0x24/0x40
  [&lt;00000000001000e8&gt;] do_one_initcall+0x68/0x128
  [&lt;0000000000a4eb56&gt;] kernel_init_freeable+0x20a/0x2b4
  [&lt;00000000006a1ff4&gt;] kernel_init+0x30/0x178
  [&lt;00000000006b69fe&gt;] kernel_thread_starter+0x6/0xc
  [&lt;00000000006b69f8&gt;] kernel_thread_starter+0x0/0xc
 Last Breaking-Event-Address:
  [&lt;000000000044bf42&gt;] strsep+0x36/0xa0

Fixes commit: adf53a7 ima: new templates management mechanism

Changelog v1:
- make template_fmt 'const char *' (reported-by James Morris)
- fix kstrdup memory leak (reported-by James Morris)

Reported-by: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Signed-off-by: Roberto Sassu &lt;roberto.sassu@polito.it&gt;
Signed-off-by: Mimi Zohar &lt;zohar@linux.vnet.ibm.com&gt;
Tested-by: Heiko Carstens &lt;heiko.carstens@de.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>
<email>roberto.sassu@polito.it</email>
</author>
<published>2013-11-08T18:21:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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: do not include field length in template digest calc for ima template</title>
<updated>2013-11-25T12:26:28Z</updated>
<author>
<name>Roberto Sassu</name>
<email>roberto.sassu@polito.it</email>
</author>
<published>2013-11-08T18:21:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b6f8f16f41d92861621b043389ef49de1c52d613'/>
<id>urn:sha1:b6f8f16f41d92861621b043389ef49de1c52d613</id>
<content type='text'>
To maintain compatibility with userspace tools, the field length must not
be included in the template digest calculation for the 'ima' template.

Fixes commit: a71dc65 ima: switch to new template management mechanism

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>
</feed>
