diff options
author | Dan Carpenter <error27@gmail.com> | 2011-03-03 17:56:06 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-03-21 12:45:29 -0700 |
commit | c6d521a02d4a12b1fb3aff6694d400905f4a73f7 (patch) | |
tree | d725a19ac21efe1eef929a4126f7ff280580bb7c /drivers/s390/char | |
parent | 2c103bfa4db025da9ab9428981e9e8afcc765492 (diff) |
keyboard: integer underflow bug
commit b652277b09d3d030cb074cc6a98ba80b34244c03 upstream.
The "ct" variable should be an unsigned int. Both struct kbdiacrs
->kb_cnt and struct kbd_data ->accent_table_size are unsigned ints.
Making it signed causes a problem in KBDIACRUC because the user could
set the signed bit and cause a buffer overflow.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/s390/char')
-rw-r--r-- | drivers/s390/char/keyboard.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/s390/char/keyboard.c b/drivers/s390/char/keyboard.c index cee4d4e4242..1160fca4366 100644 --- a/drivers/s390/char/keyboard.c +++ b/drivers/s390/char/keyboard.c @@ -462,7 +462,8 @@ kbd_ioctl(struct kbd_data *kbd, struct file *file, unsigned int cmd, unsigned long arg) { void __user *argp; - int ct, perm; + unsigned int ct; + int perm; argp = (void __user *)arg; |