From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kei Kebreau Subject: [PATCH] gnu: ntfs-3g: Fix CVE-2017-0358. Date: Thu, 09 Feb 2017 16:33:44 -0500 Message-ID: <87bmuboxqf.fsf@openmailbox.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55885) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cbwLi-00028x-2S for guix-devel@gnu.org; Thu, 09 Feb 2017 16:33:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cbwLe-0005kk-Ns for guix-devel@gnu.org; Thu, 09 Feb 2017 16:33:54 -0500 Received: from lb1.openmailbox.org ([5.79.108.160]:47765 helo=mail.openmailbox.org) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cbwLe-0005kQ-A0 for guix-devel@gnu.org; Thu, 09 Feb 2017 16:33:50 -0500 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain Reviewers, how does this patch look to you? --=-=-= Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename=0001-gnu-ntfs-3g-Fix-CVE-2017-0358.patch Content-Transfer-Encoding: quoted-printable From=202de5fc0267f94bf933f1e52dc8ef348bd3f78059 Mon Sep 17 00:00:00 2001 From: Kei Kebreau Date: Thu, 9 Feb 2017 16:31:25 -0500 Subject: [PATCH] gnu: ntfs-3g: Fix CVE-2017-0358. * gnu/packages/linux.scm (ntfs-3g)[source]: Add patch. * gnu/packages/patches/ntfs-3g-CVE-2017-0358.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. =2D-- gnu/local.mk | 3 +- gnu/packages/linux.scm | 1 + gnu/packages/patches/ntfs-3g-CVE-2017-0358.patch | 42 ++++++++++++++++++++= ++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/ntfs-3g-CVE-2017-0358.patch diff --git a/gnu/local.mk b/gnu/local.mk index 63ce3af71..1fc49bbd6 100644 =2D-- a/gnu/local.mk +++ b/gnu/local.mk @@ -4,7 +4,7 @@ # Copyright =C2=A9 2016 Mathieu Lirzin # Copyright =C2=A9 2013, 2014, 2015, 2016 Mark H Weaver # Copyright =C2=A9 2016 Chris Marusich =2D# Copyright =C2=A9 2016 Kei Kebreau +# Copyright =C2=A9 2016, 2017 Kei Kebreau # Copyright =C2=A9 2016 Rene Saavedra # Copyright =C2=A9 2016 Adonay "adfeno" Felipe Nogueira # Copyright =C2=A9 2016, 2017 Ricardo Wurmus @@ -777,6 +777,7 @@ dist_patch_DATA =3D \ %D%/packages/patches/ninja-zero-mtime.patch \ %D%/packages/patches/node-9077.patch \ %D%/packages/patches/nss-pkgconfig.patch \ + %D%/packages/patches/ntfs-3g-CVE-2017-0358.patch \ %D%/packages/patches/nvi-assume-preserve-path.patch \ %D%/packages/patches/nvi-dbpagesize-binpower.patch \ %D%/packages/patches/nvi-db4.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index dc4d37920..f918680c3 100644 =2D-- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -2906,6 +2906,7 @@ from userspace.") (base32 "180y5y09h30ryf2vim8j30a2npwz1iv9ly5yjmh3wjdkwh2jrdyp")) (modules '((guix build utils))) + (patches (search-patches "ntfs-3g-CVE-2017-0358.patch")) (snippet ;; Install under $prefix. '(substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in") diff --git a/gnu/packages/patches/ntfs-3g-CVE-2017-0358.patch b/gnu/package= s/patches/ntfs-3g-CVE-2017-0358.patch new file mode 100644 index 000000000..e09e39ed8 =2D-- /dev/null +++ b/gnu/packages/patches/ntfs-3g-CVE-2017-0358.patch @@ -0,0 +1,42 @@ +Fix CVE-2017-0358: +http://seclists.org/oss-sec/2017/q1/259 +This patch was copied from the above URL. + +diff -ur ntfs-3g.old/src/lowntfs-3g.c ntfs-3g/src/lowntfs-3g.c +--- ntfs-3g.old/src/lowntfs-3g.c 2017-02-09 15:01:04.074331542 -0500 ++++ ntfs-3g/src/lowntfs-3g.c 2017-02-09 15:06:35.757580937 -0500 +@@ -3827,13 +3827,14 @@ + struct stat st; + pid_t pid; + const char *cmd =3D "/sbin/modprobe"; ++ char *env =3D (char*)NULL; + struct timespec req =3D { 0, 100000000 }; /* 100 msec */ + fuse_fstype fstype; +=20=20=20=20=20=20=20=20=20 + if (!stat(cmd, &st) && !geteuid()) { + pid =3D fork(); + if (!pid) { +- execl(cmd, cmd, "fuse", NULL); ++ execle(cmd, cmd, "fuse", NULL, &env); + _exit(1); + } else if (pid !=3D -1) + waitpid(pid, NULL, 0); +diff -ur ntfs-3g.old/src/ntfs-3g.c ntfs-3g/src/ntfs-3g.c +--- ntfs-3g.old/src/ntfs-3g.c 2017-02-09 15:01:04.074331542 -0500 ++++ ntfs-3g/src/ntfs-3g.c 2017-02-09 15:06:26.077252571 -0500 +@@ -3612,13 +3612,14 @@ + struct stat st; + pid_t pid; + const char *cmd =3D "/sbin/modprobe"; ++ char *env =3D (char*)NULL; + struct timespec req =3D { 0, 100000000 }; /* 100 msec */ + fuse_fstype fstype; +=20=09 + if (!stat(cmd, &st) && !geteuid()) { + pid =3D fork(); + if (!pid) { +- execl(cmd, cmd, "fuse", NULL); ++ execle(cmd, cmd, "fuse", NULL, &env); + _exit(1); + } else if (pid !=3D -1) + waitpid(pid, NULL, 0); =2D-=20 2.11.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAlic4DgACgkQ5qXuPBlG eg16OA//auHakNU0dm89iGPhmNCBKXy5fe8Pg2tR2ckdH6EjyQY8BT5SO/Tz5bpg ZKDYPO8cjy8OKWVtomBt+U1+kVf6FqKx4Lg5rNusoCh3bE1qPgZ63OPGw4M6o2vH 8sQmt4/aqV9vkBGbZ/LbS7eeaI3aZ9QybobT+1BCcDJkr5wtG4ng657gOIjKGKJa DsCRMz1QotEi+/E5EaGjbHxOTshtcQ4SnCqAQ165CIKz85Dzk4rq8yCNUPA+qKNc U3J9DDZBZ9nSfgAtsuD0+t/B7mllLUIPnr2ML8oVDJtZ8M1eaUjD0X0qm5uwi0Sz 1EKBM3KOSX7AyiyWmXZyu2YDRU5W8XG3CnzhIp+gnLAbMlxSzuKrfiYz+Vfbsjrf F+jUSakBJ+WWF/3JBmfxbEBkcdVr4fqX74qCwmeaidSnRZPSO84uAKgim64UWihs yBGEHK1yDxqr7EVTDSh2Gc/+8onezJmUK7cS+WwYaS9mvdVMq0V0sPhu7XaAnZcK c0PGE+pLwxPaQl8Bv5W74y104rYGGbgKXotaWN9xufSOWUI14uJowV25HokCBj+t JOZkUq+8APXtP9/SZvQjT8GjYtyI5Nk0d7dm4GFFE1wBliltQ0wLqk4yTI8o+WJe GTZM42HimS1NM4NVGDvGwjFs7E1W5KM9KSk5AtbTUvxZIbZRz4Y= =80Wf -----END PGP SIGNATURE----- --==-=-=--