linux/security/apparmor
Tyler Hicks 71ac7f6255 apparmor: Use shash crypto API interface for profile hashes
Use the shash interface, rather than the hash interface, when hashing
AppArmor profiles. The shash interface does not use scatterlists and it
is a better fit for what AppArmor needs.

This fixes a kernel paging BUG when aa_calc_profile_hash() is passed a
buffer from vmalloc(). The hash interface requires callers to handle
vmalloc() buffers differently than what AppArmor was doing. Due to
vmalloc() memory not being physically contiguous, each individual page
behind the buffer must be assigned to a scatterlist with sg_set_page()
and then the scatterlist passed to crypto_hash_update().

The shash interface does not have that limitation and allows vmalloc()
and kmalloc() buffers to be handled in the same manner.

BugLink: https://launchpad.net/bugs/1216294/
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=62261

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Seth Arnold <seth.arnold@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
2013-09-30 09:53:59 +10:00
..
include apparmor: add the ability to report a sha1 hash of loaded policy 2013-08-14 11:42:08 -07:00
.gitignore AppArmor: remove af_names.h from .gitignore 2012-09-01 08:35:34 -07:00
apparmorfs.c apparmor: add the ability to report a sha1 hash of loaded policy 2013-08-14 11:42:08 -07:00
audit.c apparmor: fix the audit type table 2013-04-28 00:37:41 -07:00
capability.c apparmor: export set of capabilities supported by the apparmor module 2013-08-14 11:42:07 -07:00
context.c apparmor: change how profile replacement update is done 2013-08-14 11:42:06 -07:00
crypto.c apparmor: Use shash crypto API interface for profile hashes 2013-09-30 09:53:59 +10:00
domain.c apparmor: allow setting any profile into the unconfined state 2013-08-14 11:42:07 -07:00
file.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
ipc.c apparmor: add utility function to get an arbitrary tasks profile. 2013-04-28 00:35:53 -07:00
Kconfig apparmor: add the ability to report a sha1 hash of loaded policy 2013-08-14 11:42:08 -07:00
lib.c apparmor: remove minimum size check for vmalloc() 2013-08-14 11:42:05 -07:00
lsm.c Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2013-09-07 14:34:07 -07:00
Makefile apparmor: add the ability to report a sha1 hash of loaded policy 2013-08-14 11:42:08 -07:00
match.c apparmor: reserve and mask off the top 8 bits of the base field 2013-04-28 00:37:32 -07:00
path.c apparmor: fix error code to failure message mapping for name lookup 2013-04-28 00:35:40 -07:00
policy_unpack.c apparmor: add the ability to report a sha1 hash of loaded policy 2013-08-14 11:42:08 -07:00
policy.c apparmor: add interface files for profiles and namespaces 2013-08-14 11:42:07 -07:00
procattr.c apparmor: add interface files for profiles and namespaces 2013-08-14 11:42:07 -07:00
resource.c apparmor: relax the restrictions on setting rlimits 2013-04-28 00:36:46 -07:00
sid.c AppArmor: core policy routines 2010-08-02 15:38:37 +10:00