mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
fbdev: sbuslib: integer overflow in sbusfb_ioctl_helper()
The "index + count" addition can overflow. Both come directly from the user. This bug leads to an information leak. Signed-off-by: Dan Carpenter <[email protected]> Cc: Peter Malone <[email protected]> Cc: Philippe Ombredanne <[email protected]> Cc: Mathieu Malaterre <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
This commit is contained in:
parent
d8bad911e5
commit
e5017716ad
1 changed files with 1 additions and 1 deletions
|
|
@ -171,7 +171,7 @@ int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg,
|
|||
get_user(ublue, &c->blue))
|
||||
return -EFAULT;
|
||||
|
||||
if (index + count > cmap->len)
|
||||
if (index > cmap->len || count > cmap->len - index)
|
||||
return -EINVAL;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue