Skip to content

Commit

Permalink
[IA64] SN2: security hole in sn2_ptc_proc_write
Browse files Browse the repository at this point in the history
Security hole in sn2_ptc_proc_write

It is possible to overrun a buffer with a write to this /proc file.

Signed-off-by: Cliff Wickman <[email protected]>
Signed-off-by: Tony Luck <[email protected]>
  • Loading branch information
cpwickman authored and aegl committed Jun 20, 2008
1 parent 9bedbcb commit e0c6d97
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/ia64/sn/kernel/sn2/sn2_smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit e0c6d97

Please sign in to comment.