projects
/
platform
/
adaptation
/
renesas_rcar
/
renesas_kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fd4b616
)
taskstats: check nla_reserve() return
author
Alan Cox
<alan@linux.intel.com>
Mon, 30 Jul 2012 21:42:49 +0000
(14:42 -0700)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Tue, 31 Jul 2012 00:25:21 +0000
(17:25 -0700)
Addresses https://bugzilla.kernel.org/show_bug.cgi?id=44621
Reported-by: <rucsoftsec@gmail.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/taskstats.c
patch
|
blob
|
history
diff --git
a/kernel/taskstats.c
b/kernel/taskstats.c
index
e660464
..
d0a3279
100644
(file)
--- a/
kernel/taskstats.c
+++ b/
kernel/taskstats.c
@@
-436,6
+436,11
@@
static int cgroupstats_user_cmd(struct sk_buff *skb, struct genl_info *info)
na = nla_reserve(rep_skb, CGROUPSTATS_TYPE_CGROUP_STATS,
sizeof(struct cgroupstats));
+ if (na == NULL) {
+ rc = -EMSGSIZE;
+ goto err;
+ }
+
stats = nla_data(na);
memset(stats, 0, sizeof(*stats));