summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-06-20 17:10:04 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-06-20 17:10:04 -0700
commitb732d9680b7a2968823851f1163507ad9c45c8cb (patch)
treed4584316d00a021d3d54052676a870c8b2999f23 /arch
parenta744e0160ac5804b763449aa34d3991dc21af0be (diff)
parente0c6d97c65e0784aade7e97b9411f245a6c543e7 (diff)
downloadlinux-3.10-b732d9680b7a2968823851f1163507ad9c45c8cb.tar.gz
linux-3.10-b732d9680b7a2968823851f1163507ad9c45c8cb.tar.bz2
linux-3.10-b732d9680b7a2968823851f1163507ad9c45c8cb.zip
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: [IA64] SN2: security hole in sn2_ptc_proc_write
Diffstat (limited to 'arch')
-rw-r--r--arch/ia64/sn/kernel/sn2/sn2_smp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/ia64/sn/kernel/sn2/sn2_smp.c b/arch/ia64/sn/kernel/sn2/sn2_smp.c
index 49d3120415e..6dd886c5d86 100644
--- a/arch/ia64/sn/kernel/sn2/sn2_smp.c
+++ b/arch/ia64/sn/kernel/sn2/sn2_smp.c
@@ -512,6 +512,8 @@ static ssize_t sn2_ptc_proc_write(struct file *file, const char __user *user, si
int cpu;
char optstr[64];
+ if (count > sizeof(optstr))
+ return -EINVAL;
if (copy_from_user(optstr, user, count))
return -EFAULT;
optstr[count - 1] = '\0';