mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-06 13:16:22 +00:00
keyboard: integer underflow bug
commit b652277b09
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>
This commit is contained in:
parent
0c5e0cbbc9
commit
a88dfcc1c2
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user