]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/ioctl.c
Merge tag 'char-misc-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
[mirror_ubuntu-bionic-kernel.git] / fs / ioctl.c
index 26aba0942a98357c824b7ed97df977458ab6def6..c415668c86d4cc727460ae0f0eb5a6d1f5840f61 100644 (file)
@@ -582,6 +582,10 @@ static int ioctl_file_dedupe_range(struct file *file, void __user *arg)
        }
 
        size = offsetof(struct file_dedupe_range __user, info[count]);
+       if (size > PAGE_SIZE) {
+               ret = -ENOMEM;
+               goto out;
+       }
 
        same = memdup_user(argp, size);
        if (IS_ERR(same)) {