mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
Staging: lustre: integer overflow in ioctl
hdr->ioc_len is a user controlled u32 so the addition can overflow, especially on 32 bit systems. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b311ebac5b
commit
faec8ab42b
1 changed files with 1 additions and 1 deletions
|
|
@ -57,7 +57,7 @@ int libcfs_ioctl_getdata(char *buf, char *end, void *arg)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (hdr->ioc_len + buf >= end) {
|
||||
if (hdr->ioc_len >= end - buf) {
|
||||
CERROR("PORTALS: user buffer exceeds kernel buffer\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue