projects
/
profile
/
wearable
/
platform
/
kernel
/
linux-3.18-exynos7270.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f47ed13
)
ima: fix showing large 'violations' or 'runtime_measurements_count'
author
Eric Biggers
<ebiggers@google.com>
Fri, 7 Sep 2018 21:33:24 +0000
(14:33 -0700)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 22 Nov 2018 06:32:43 +0000
(07:32 +0100)
commit
1e4c8dafbb6bf72fb5eca035b861e39c5896c2b7
upstream.
The 12 character temporary buffer is not necessarily long enough to hold
a 'long' value. Increase it.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
security/integrity/ima/ima_fs.c
patch
|
blob
|
history
diff --git
a/security/integrity/ima/ima_fs.c
b/security/integrity/ima/ima_fs.c
index
d30afe4
..
cc5b47a
100644
(file)
--- a/
security/integrity/ima/ima_fs.c
+++ b/
security/integrity/ima/ima_fs.c
@@
-26,14
+26,14
@@
#include "ima.h"
static int valid_policy = 1;
-#define TMPBUFLEN 12
+
static ssize_t ima_show_htable_value(char __user *buf, size_t count,
loff_t *ppos, atomic_long_t *val)
{
- char tmpbuf[
TMPBUFLEN];
+ char tmpbuf[
32]; /* greater than largest 'long' string value */
ssize_t len;
- len = scnprintf(tmpbuf,
TMPBUFLEN
, "%li\n", atomic_long_read(val));
+ len = scnprintf(tmpbuf,
sizeof(tmpbuf)
, "%li\n", atomic_long_read(val));
return simple_read_from_buffer(buf, count, ppos, tmpbuf, len);
}