diff options
author | Tyler Hicks <tyhicks@canonical.com> | 2013-09-29 08:39:21 -0700 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2013-09-30 09:53:59 +1000 |
commit | 71ac7f6255c560716c20da8ee2c964bbd96e941f (patch) | |
tree | 1826844de4bbe7ca69b79ad17adabf1ec52763d9 /Documentation/BUG-HUNTING | |
parent | 15c03dd4859ab16f9212238f29dd315654aa94f6 (diff) | |
download | linux-71ac7f6255c560716c20da8ee2c964bbd96e941f.tar.bz2 |
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>
Diffstat (limited to 'Documentation/BUG-HUNTING')
0 files changed, 0 insertions, 0 deletions