From: John Johansen Date: Thu, 28 Sep 2017 17:47:13 +0000 (-0400) Subject: UBUNTU: SAUCE: LSM stacking: make sure LSM blob align on 64 bit boundaries X-Git-Tag: Ubuntu-4.15.0-16.17~345 X-Git-Url: https://git.proxmox.com/?p=mirror_ubuntu-bionic-kernel.git;a=commitdiff_plain;h=469fbb39b69c995a4ee4365eea3cf6e2658b5b71 UBUNTU: SAUCE: LSM stacking: make sure LSM blob align on 64 bit boundaries 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 Signed-off-by: Seth Forshee --- diff --git a/security/security.c b/security/security.c index 14fdde773bad..76cb05f665da 100644 --- a/security/security.c +++ b/security/security.c @@ -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 };