Home Home > GIT Browse > SLE12-SP4
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-07-09 16:55:55 +0200
committerTakashi Iwai <tiwai@suse.de>2018-07-09 16:56:13 +0200
commita512f35c8257f24d0ab80a642477abe5a8a5ccb1 (patch)
tree02a341e841889f5696000d2f2ebce874228aa6a4
parentdce39b55852ab2bee25824070517deb295f42f2e (diff)
selinux: KASAN: slab-out-of-bounds in xattr_getsecurity
(bsc#1051510). suse-commit: 5ec0bfbb7ef35552bc78190b5076c837f07e6f46
-rw-r--r--security/selinux/ss/services.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
index e0d100b84139..430b9741da7d 100644
--- a/security/selinux/ss/services.c
+++ b/security/selinux/ss/services.c
@@ -1439,7 +1439,7 @@ static int security_context_to_sid_core(const char *scontext, u32 scontext_len,
scontext_len, &context, def_sid);
if (rc == -EINVAL && force) {
context.str = str;
- context.len = scontext_len;
+ context.len = strlen(str) + 1;
str = NULL;
} else if (rc)
goto out_unlock;