[linux] 01/01: vfs: ioctl: prevent double-fetch in dedupe ioctl (CVE-2016-6516)
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Tue Aug 2 04:51:28 UTC 2016
This is an automated email from the git hooks/post-receive script.
carnil pushed a commit to branch sid
in repository linux.
commit c2a8f662b5441720a38317993576dd2f2a52060e
Author: Salvatore Bonaccorso <carnil at debian.org>
Date: Tue Aug 2 06:46:45 2016 +0200
vfs: ioctl: prevent double-fetch in dedupe ioctl (CVE-2016-6516)
---
debian/changelog | 3 +++
...octl-prevent-double-fetch-in-dedupe-ioctl.patch | 30 ++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 34 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index ecc53d7..eca0796 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -210,6 +210,9 @@ linux (4.6.5-1) UNRELEASED; urgency=medium
* Fix perf to be able to find debug info based on build-id. (Closes:
#833096)
+ [ Salvatore Bonaccorso ]
+ * vfs: ioctl: prevent double-fetch in dedupe ioctl (CVE-2016-6516)
+
-- Ben Hutchings <ben at decadent.org.uk> Sat, 30 Jul 2016 14:23:58 +0100
linux (4.6.4-1) unstable; urgency=medium
diff --git a/debian/patches/bugfix/all/vfs-ioctl-prevent-double-fetch-in-dedupe-ioctl.patch b/debian/patches/bugfix/all/vfs-ioctl-prevent-double-fetch-in-dedupe-ioctl.patch
new file mode 100644
index 0000000..7e90e8c
--- /dev/null
+++ b/debian/patches/bugfix/all/vfs-ioctl-prevent-double-fetch-in-dedupe-ioctl.patch
@@ -0,0 +1,30 @@
+From: Scott Bauer <sbauer at plzdonthack.me>
+Date: Wed, 27 Jul 2016 19:11:29 -0600
+Subject: vfs: ioctl: prevent double-fetch in dedupe ioctl
+Origin: https://git.kernel.org/linus/10eec60ce79187686e052092e5383c99b4420a20
+
+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 at plzdonthack.me>
+Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
+---
+ fs/ioctl.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/fs/ioctl.c b/fs/ioctl.c
+index 116a333..0f56deb 100644
+--- a/fs/ioctl.c
++++ b/fs/ioctl.c
+@@ -590,6 +590,7 @@ static long ioctl_file_dedupe_range(struct file *file, void __user *arg)
+ goto out;
+ }
+
++ same->dest_count = count;
+ ret = vfs_dedupe_file_range(file, same);
+ if (ret)
+ goto out;
+--
+2.1.4
+
diff --git a/debian/patches/series b/debian/patches/series
index 14f6244..17ae971 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -107,6 +107,7 @@ bugfix/all/alsa-timer-fix-leak-in-events-via-snd_timer_user_cca.patch
bugfix/all/alsa-timer-fix-leak-in-events-via-snd_timer_user_tin.patch
bugfix/all/tipc-fix-an-infoleak-in-tipc_nl_compat_link_dump.patch
bugfix/all/rds-fix-an-infoleak-in-rds_inc_info_copy.patch
+bugfix/all/vfs-ioctl-prevent-double-fetch-in-dedupe-ioctl.patch
# ABI maintenance
debian/mips-siginfo-fix-abi-change-in-4.6.2.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git
More information about the Kernel-svn-changes
mailing list