<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/security/integrity/evm, branch v3.8.2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/security/integrity/evm?h=v3.8.2</id>
<link rel='self' href='https://git.amat.us/linux/atom/security/integrity/evm?h=v3.8.2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-01-21T13:27:50Z</updated>
<entry>
<title>evm: checking if removexattr is not a NULL</title>
<updated>2013-01-21T13:27:50Z</updated>
<author>
<name>Dmitry Kasatkin</name>
<email>dmitry.kasatkin@intel.com</email>
</author>
<published>2013-01-18T21:56:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a67adb997419fb53540d4a4f79c6471c60bc69b6'/>
<id>urn:sha1:a67adb997419fb53540d4a4f79c6471c60bc69b6</id>
<content type='text'>
The following lines of code produce a kernel oops.

fd = socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0);
fchmod(fd, 0666);

[  139.922364] BUG: unable to handle kernel NULL pointer dereference at   (null)
[  139.924982] IP: [&lt;  (null)&gt;]   (null)
[  139.924982] *pde = 00000000
[  139.924982] Oops: 0000 [#5] SMP
[  139.924982] Modules linked in: fuse dm_crypt dm_mod i2c_piix4 serio_raw evdev binfmt_misc button
[  139.924982] Pid: 3070, comm: acpid Tainted: G      D      3.8.0-rc2-kds+ #465 Bochs Bochs
[  139.924982] EIP: 0060:[&lt;00000000&gt;] EFLAGS: 00010246 CPU: 0
[  139.924982] EIP is at 0x0
[  139.924982] EAX: cf5ef000 EBX: cf5ef000 ECX: c143d600 EDX: c15225f2
[  139.924982] ESI: cf4d2a1c EDI: cf4d2a1c EBP: cc02df10 ESP: cc02dee4
[  139.924982]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[  139.924982] CR0: 80050033 CR2: 00000000 CR3: 0c059000 CR4: 000006d0
[  139.924982] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
[  139.924982] DR6: ffff0ff0 DR7: 00000400
[  139.924982] Process acpid (pid: 3070, ti=cc02c000 task=d7705340 task.ti=cc02c000)
[  139.924982] Stack:
[  139.924982]  c1203c88 00000000 cc02def4 cf4d2a1c ae21eefa 471b60d5 1083c1ba c26a5940
[  139.924982]  e891fb5e 00000041 00000004 cc02df1c c1203964 00000000 cc02df4c c10e20c3
[  139.924982]  00000002 00000000 00000000 22222222 c1ff2222 cf5ef000 00000000 d76efb08
[  139.924982] Call Trace:
[  139.924982]  [&lt;c1203c88&gt;] ? evm_update_evmxattr+0x5b/0x62
[  139.924982]  [&lt;c1203964&gt;] evm_inode_post_setattr+0x22/0x26
[  139.924982]  [&lt;c10e20c3&gt;] notify_change+0x25f/0x281
[  139.924982]  [&lt;c10cbf56&gt;] chmod_common+0x59/0x76
[  139.924982]  [&lt;c10e27a1&gt;] ? put_unused_fd+0x33/0x33
[  139.924982]  [&lt;c10cca09&gt;] sys_fchmod+0x39/0x5c
[  139.924982]  [&lt;c13f4f30&gt;] syscall_call+0x7/0xb
[  139.924982] Code:  Bad EIP value.

This happens because sockets do not define the removexattr operation.
Before removing the xattr, verify the removexattr function pointer is
not NULL.

Signed-off-by: Dmitry Kasatkin &lt;dmitry.kasatkin@intel.com&gt;
Signed-off-by: Mimi Zohar &lt;zohar@linux.vnet.ibm.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: James Morris &lt;james.l.morris@oracle.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security</title>
<updated>2012-10-03T04:38:48Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-10-03T04:38:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=88265322c14cce39f7afbc416726ef4fac413298'/>
<id>urn:sha1:88265322c14cce39f7afbc416726ef4fac413298</id>
<content type='text'>
Pull security subsystem updates from James Morris:
 "Highlights:

   - Integrity: add local fs integrity verification to detect offline
     attacks
   - Integrity: add digital signature verification
   - Simple stacking of Yama with other LSMs (per LSS discussions)
   - IBM vTPM support on ppc64
   - Add new driver for Infineon I2C TIS TPM
   - Smack: add rule revocation for subject labels"

Fixed conflicts with the user namespace support in kernel/auditsc.c and
security/integrity/ima/ima_policy.c.

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (39 commits)
  Documentation: Update git repository URL for Smack userland tools
  ima: change flags container data type
  Smack: setprocattr memory leak fix
  Smack: implement revoking all rules for a subject label
  Smack: remove task_wait() hook.
  ima: audit log hashes
  ima: generic IMA action flag handling
  ima: rename ima_must_appraise_or_measure
  audit: export audit_log_task_info
  tpm: fix tpm_acpi sparse warning on different address spaces
  samples/seccomp: fix 31 bit build on s390
  ima: digital signature verification support
  ima: add support for different security.ima data types
  ima: add ima_inode_setxattr/removexattr function and calls
  ima: add inode_post_setattr call
  ima: replace iint spinblock with rwlock/read_lock
  ima: allocating iint improvements
  ima: add appraise action keywords and default rules
  ima: integrity appraisal extension
  vfs: move ima_file_free before releasing the file
  ...
</content>
</entry>
<entry>
<title>userns: Convert EVM to deal with kuids and kgids in it's hmac computation</title>
<updated>2012-09-21T10:13:24Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2012-05-26T00:22:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cf9c93526f4517581a9e8f1c0d9093a4c7748ec6'/>
<id>urn:sha1:cf9c93526f4517581a9e8f1c0d9093a4c7748ec6</id>
<content type='text'>
Cc: Mimi Zohar &lt;zohar@us.ibm.com&gt;
Acked-by: Serge Hallyn &lt;serge.hallyn@canonical.com&gt;
Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
</content>
</entry>
<entry>
<title>ima: integrity appraisal extension</title>
<updated>2012-09-07T18:57:44Z</updated>
<author>
<name>Mimi Zohar</name>
<email>zohar@linux.vnet.ibm.com</email>
</author>
<published>2012-02-13T15:15:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2fe5d6def1672ae6635dd71867bf36dcfaa7434b'/>
<id>urn:sha1:2fe5d6def1672ae6635dd71867bf36dcfaa7434b</id>
<content type='text'>
IMA currently maintains an integrity measurement list used to assert the
integrity of the running system to a third party.  The IMA-appraisal
extension adds local integrity validation and enforcement of the
measurement against a "good" value stored as an extended attribute
'security.ima'.  The initial methods for validating 'security.ima' are
hashed based, which provides file data integrity, and digital signature
based, which in addition to providing file data integrity, provides
authenticity.

This patch creates and maintains the 'security.ima' xattr, containing
the file data hash measurement.  Protection of the xattr is provided by
EVM, if enabled and configured.

Based on policy, IMA calls evm_verifyxattr() to verify a file's metadata
integrity and, assuming success, compares the file's current hash value
with the one stored as an extended attribute in 'security.ima'.

Changelov v4:
- changed iint cache flags to hex values

Changelog v3:
- change appraisal default for filesystems without xattr support to fail

Changelog v2:
- fix audit msg 'res' value
- removed unused 'ima_appraise=' values

Changelog v1:
- removed unused iint mutex (Dmitry Kasatkin)
- setattr hook must not reset appraised (Dmitry Kasatkin)
- evm_verifyxattr() now differentiates between no 'security.evm' xattr
  (INTEGRITY_NOLABEL) and no EVM 'protected' xattrs included in the
  'security.evm' (INTEGRITY_NOXATTRS).
- replace hash_status with ima_status (Dmitry Kasatkin)
- re-initialize slab element ima_status on free (Dmitry Kasatkin)
- include 'security.ima' in EVM if CONFIG_IMA_APPRAISE, not CONFIG_IMA
- merged half "ima: ima_must_appraise_or_measure API change" (Dmitry Kasatkin)
- removed unnecessary error variable in process_measurement() (Dmitry Kasatkin)
- use ima_inode_post_setattr() stub function, if IMA_APPRAISE not configured
  (moved ima_inode_post_setattr() to ima_appraise.c)
- make sure ima_collect_measurement() can read file

Changelog:
- add 'iint' to evm_verifyxattr() call (Dimitry Kasatkin)
- fix the race condition between chmod, which takes the i_mutex and then
  iint-&gt;mutex, and ima_file_free() and process_measurement(), which take
  the locks in the reverse order, by eliminating iint-&gt;mutex. (Dmitry Kasatkin)
- cleanup of ima_appraise_measurement() (Dmitry Kasatkin)
- changes as a result of the iint not allocated for all regular files, but
  only for those measured/appraised.
- don't try to appraise new/empty files
- expanded ima_appraisal description in ima/Kconfig
- IMA appraise definitions required even if IMA_APPRAISE not enabled
- add return value to ima_must_appraise() stub
- unconditionally set status = INTEGRITY_PASS *after* testing status,
  not before.  (Found by Joe Perches)

Signed-off-by: Mimi Zohar &lt;zohar@us.ibm.com&gt;
Signed-off-by: Dmitry Kasatkin &lt;dmitry.kasatkin@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'next' into for-linus</title>
<updated>2012-01-09T01:16:48Z</updated>
<author>
<name>James Morris</name>
<email>jmorris@namei.org</email>
</author>
<published>2012-01-09T01:16:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8fcc99549522fc7a0bbaeb5755855ab0d9a59ce8'/>
<id>urn:sha1:8fcc99549522fc7a0bbaeb5755855ab0d9a59ce8</id>
<content type='text'>
Conflicts:
	security/integrity/evm/evm_crypto.c

Resolved upstream fix vs. next conflict manually.

Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>evm: prevent racing during tfm allocation</title>
<updated>2011-12-20T15:50:08Z</updated>
<author>
<name>Dmitry Kasatkin</name>
<email>dmitry.kasatkin@intel.com</email>
</author>
<published>2011-12-05T11:17:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=97426f985729573cea06e82e271cc3929f1f5f8e'/>
<id>urn:sha1:97426f985729573cea06e82e271cc3929f1f5f8e</id>
<content type='text'>
There is a small chance of racing during tfm allocation.
This patch fixes it.

Signed-off-by: Dmitry Kasatkin &lt;dmitry.kasatkin@intel.com&gt;
Acked-by: Mimi Zohar &lt;zohar@us.ibm.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>evm: key must be set once during initialization</title>
<updated>2011-12-20T15:45:45Z</updated>
<author>
<name>Dmitry Kasatkin</name>
<email>dmitry.kasatkin@intel.com</email>
</author>
<published>2011-12-05T11:17:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d21b59451886cb82448302f8d6f9ac87c3bd56cf'/>
<id>urn:sha1:d21b59451886cb82448302f8d6f9ac87c3bd56cf</id>
<content type='text'>
On multi-core systems, setting of the key before every caclculation,
causes invalid HMAC calculation for other tfm users, because internal
state (ipad, opad) can be invalid before set key call returns.
It needs to be set only once during initialization.

Signed-off-by: Dmitry Kasatkin &lt;dmitry.kasatkin@intel.com&gt;
Acked-by: Mimi Zohar &lt;zohar@us.ibm.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>evm: prevent racing during tfm allocation</title>
<updated>2011-12-07T23:06:12Z</updated>
<author>
<name>Dmitry Kasatkin</name>
<email>dmitry.kasatkin@intel.com</email>
</author>
<published>2011-12-05T11:17:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=143b01d33221e4937d3930e6bb2b63d70b7c7a65'/>
<id>urn:sha1:143b01d33221e4937d3930e6bb2b63d70b7c7a65</id>
<content type='text'>
There is a small chance of racing during tfm allocation.
This patch fixes it.

Signed-off-by: Dmitry Kasatkin &lt;dmitry.kasatkin@intel.com&gt;
Acked-by: Mimi Zohar &lt;zohar@us.ibm.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>evm: key must be set once during initialization</title>
<updated>2011-12-07T23:06:09Z</updated>
<author>
<name>Dmitry Kasatkin</name>
<email>dmitry.kasatkin@intel.com</email>
</author>
<published>2011-12-05T11:17:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=88d7ed35085184f15a2af3d9e88d775059b2f307'/>
<id>urn:sha1:88d7ed35085184f15a2af3d9e88d775059b2f307</id>
<content type='text'>
On multi-core systems, setting of the key before every caclculation,
causes invalid HMAC calculation for other tfm users, because internal
state (ipad, opad) can be invalid before set key call returns.
It needs to be set only once during initialization.

Signed-off-by: Dmitry Kasatkin &lt;dmitry.kasatkin@intel.com&gt;
Acked-by: Mimi Zohar &lt;zohar@us.ibm.com&gt;
Signed-off-by: James Morris &lt;jmorris@namei.org&gt;
</content>
</entry>
<entry>
<title>evm: digital signature verification support</title>
<updated>2011-11-09T14:51:14Z</updated>
<author>
<name>Dmitry Kasatkin</name>
<email>dmitry.kasatkin@intel.com</email>
</author>
<published>2011-09-01T11:41:40Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=15647eb3985ef30dfd657038924dc85c03026733'/>
<id>urn:sha1:15647eb3985ef30dfd657038924dc85c03026733</id>
<content type='text'>
This patch adds support for digital signature verification to EVM.
With this feature file metadata can be protected using digital
signature instead of an HMAC. When building an image,
which has to be flashed to different devices, an HMAC cannot
be used to sign file metadata, because the HMAC key should be
different on every device.

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