]> git.proxmox.com Git - mirror_ubuntu-bionic-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>
Tue, 10 Apr 2018 18:06:21 +0000 (13:06 -0500)
BugLink: http://bugs.launchpad.net/bugs/1763062
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 14fdde773bad6804550578812a1f42c0b50b2259..76cb05f665da7efdef8e3e769510d698f05e32f6 100644 (file)
@@ -55,7 +55,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
 };