mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-22 01:57:43 +00:00
patches 0001-0022 are backports of fixes from the 4.8 pull-request 0023-0025 are the out of tree feature patches Signed-off-by: John Johansen <john.johansen@canonical.com>
28 lines
927 B
Diff
28 lines
927 B
Diff
From 7e65e8142b2ea4891581173d6e92fc337b02ff8b Mon Sep 17 00:00:00 2001
|
|
From: John Johansen <john.johansen@canonical.com>
|
|
Date: Sat, 9 Jul 2016 23:46:33 -0700
|
|
Subject: [PATCH 22/25] apparmor: fix arg_size computation for when setprocattr
|
|
is null terminated
|
|
|
|
Signed-off-by: John Johansen <john.johansen@canonical.com>
|
|
---
|
|
security/apparmor/lsm.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c
|
|
index e83eefb..ba8207b 100644
|
|
--- a/security/apparmor/lsm.c
|
|
+++ b/security/apparmor/lsm.c
|
|
@@ -529,7 +529,7 @@ static int apparmor_setprocattr(struct task_struct *task, char *name,
|
|
if (!*args)
|
|
goto out;
|
|
|
|
- arg_size = size - (args - (char *) value);
|
|
+ arg_size = size - (args - (largs ? largs : (char *) value));
|
|
if (strcmp(name, "current") == 0) {
|
|
if (strcmp(command, "changehat") == 0) {
|
|
error = aa_setprocattr_changehat(args, arg_size,
|
|
--
|
|
2.7.4
|
|
|