]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
UBUNTU: SAUCE: LSM stacking: make sure LSM blob align on 64 bit boundaries
authorJohn Johansen <john.johansen@canonical.com>
Thu, 28 Sep 2017 17:47:13 +0000 (13:47 -0400)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 28 Sep 2017 20:54:28 +0000 (16:54 -0400)
The security->task blob reserving the first 12 bytes means that LSM
blobs don't align on 64 byte boundaries. This is not a problem
for x86 but if an LSM stores a long or ptr in its blob, then some
architectures require it be aligned to the arch word size and
will through a fault.

Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
security/security.c

index 2701ca15f94968e7ad4d22d1465456b19abb4698..96504c4477ba909ba31ef6108a2669c0446a0e73 100644 (file)
@@ -51,7 +51,7 @@ char *lsm_names;
  */
 static struct lsm_blob_sizes blob_sizes = {
 #ifdef CONFIG_SECURITY_STACKING
-       .lbs_task = SECURITY_NAME_MAX + 2,
+       .lbs_task = SECURITY_NAME_MAX + 6,
 #endif
 };