]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
vfs: ioctl: prevent double-fetch in dedupe ioctl
authorScott Bauer <sbauer@plzdonthack.me>
Thu, 28 Jul 2016 01:11:29 +0000 (19:11 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 Aug 2016 07:34:57 +0000 (09:34 +0200)
commit37fe52815ecb74f6aa1efd398ba0704f83c70550
tree89d24936bf1488abb5ff6e4e84e02c831c2292c4
parent3f66cf7a98699128acf210d6f671b3c60b9555f9
vfs: ioctl: prevent double-fetch in dedupe ioctl

commit 10eec60ce79187686e052092e5383c99b4420a20 upstream.

This prevents a double-fetch from user space that can lead to to an
undersized allocation and heap overflow.

Fixes: 54dbc1517237 ("vfs: hoist the btrfs deduplication ioctl to the vfs")
Signed-off-by: Scott Bauer <sbauer@plzdonthack.me>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ioctl.c