fix CVE-2015-3202

epel9
Tom Callaway 10 years ago
parent eb6bf1c0f5
commit 98efcc9777

@ -0,0 +1,55 @@
lib/mount_util.c | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
--- a/lib/mount_util.c
+++ b/lib/mount_util.c
@@ -97,10 +97,12 @@ static int add_mount(const char *prognam
goto out_restore;
}
if (res == 0) {
+ char *env = NULL;
+
sigprocmask(SIG_SETMASK, &oldmask, NULL);
setuid(geteuid());
- execl("/bin/mount", "/bin/mount", "--no-canonicalize", "-i",
- "-f", "-t", type, "-o", opts, fsname, mnt, NULL);
+ execle("/bin/mount", "/bin/mount", "--no-canonicalize", "-i",
+ "-f", "-t", type, "-o", opts, fsname, mnt, NULL, &env);
fprintf(stderr, "%s: failed to execute /bin/mount: %s\n",
progname, strerror(errno));
exit(1);
@@ -148,10 +150,17 @@ static int exec_umount(const char *progn
goto out_restore;
}
if (res == 0) {
+ char *env = NULL;
+
sigprocmask(SIG_SETMASK, &oldmask, NULL);
setuid(geteuid());
- execl("/bin/umount", "/bin/umount", "-i", rel_mnt,
- lazy ? "-l" : NULL, NULL);
+ if (lazy) {
+ execle("/bin/umount", "/bin/umount", "-i", rel_mnt,
+ "-l", NULL, &env);
+ } else {
+ execle("/bin/umount", "/bin/umount", "-i", rel_mnt,
+ NULL, &env);
+ }
fprintf(stderr, "%s: failed to execute /bin/umount: %s\n",
progname, strerror(errno));
exit(1);
@@ -207,10 +216,12 @@ static int remove_mount(const char *prog
goto out_restore;
}
if (res == 0) {
+ char *env = NULL;
+
sigprocmask(SIG_SETMASK, &oldmask, NULL);
setuid(geteuid());
- execl("/bin/umount", "/bin/umount", "--no-canonicalize", "-i",
- "--fake", mnt, NULL);
+ execle("/bin/umount", "/bin/umount", "--no-canonicalize", "-i",
+ "--fake", mnt, NULL, &env);
fprintf(stderr, "%s: failed to execute /bin/umount: %s\n",
progname, strerror(errno));
exit(1);

@ -16,7 +16,7 @@
Name: ntfs-3g Name: ntfs-3g
Summary: Linux NTFS userspace driver Summary: Linux NTFS userspace driver
Version: 2015.3.14 Version: 2015.3.14
Release: 1%{?dist} Release: 2%{?dist}
License: GPLv2+ License: GPLv2+
Group: System Environment/Base Group: System Environment/Base
Source0: http://tuxera.com/opensource/%{name}_ntfsprogs-%{version}%{?subver}.tgz Source0: http://tuxera.com/opensource/%{name}_ntfsprogs-%{version}%{?subver}.tgz
@ -36,6 +36,7 @@ Provides: ntfsprogs-fuse = %{epoch}:%{version}-%{release}
Obsoletes: ntfsprogs-fuse Obsoletes: ntfsprogs-fuse
Provides: fuse-ntfs-3g = %{epoch}:%{version}-%{release} Provides: fuse-ntfs-3g = %{epoch}:%{version}-%{release}
Patch0: ntfs-3g_ntfsprogs-2011.10.9-RC-ntfsck-unsupported-return-0.patch Patch0: ntfs-3g_ntfsprogs-2011.10.9-RC-ntfsck-unsupported-return-0.patch
Patch1: CVE-2015-3202.patch
%description %description
NTFS-3G is a stable, open source, GPL licensed, POSIX, read/write NTFS NTFS-3G is a stable, open source, GPL licensed, POSIX, read/write NTFS
@ -81,6 +82,7 @@ included utilities see man 8 ntfsprogs after installation).
%prep %prep
%setup -q -n %{name}_ntfsprogs-%{version}%{?subver} %setup -q -n %{name}_ntfsprogs-%{version}%{?subver}
%patch0 -p1 -b .unsupported %patch0 -p1 -b .unsupported
%patch1 -p1 -b .CVE-2015-3202
%build %build
CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64" CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64"
@ -176,6 +178,9 @@ cp -a %{SOURCE1} %{buildroot}%{_datadir}/hal/fdi/policy/10osvendor/
/sbin/mount.lowntfs-3g /sbin/mount.lowntfs-3g
/bin/ntfs-3g /bin/ntfs-3g
/bin/ntfsmount /bin/ntfsmount
#compat symlinks
%{_bindir}/ntfs-3g
%{_bindir}/ntfsmount
%else %else
%{_sbindir}/mount.ntfs %{_sbindir}/mount.ntfs
%{_sbindir}/mount.ntfs-3g %{_sbindir}/mount.ntfs-3g
@ -275,6 +280,9 @@ cp -a %{SOURCE1} %{buildroot}%{_datadir}/hal/fdi/policy/10osvendor/
%exclude %{_mandir}/man8/ntfs-3g* %exclude %{_mandir}/man8/ntfs-3g*
%changelog %changelog
* Fri May 22 2015 Tom Callaway <spot@fedoraproject.org> 2:2015.3.14-2
- fix CVE-2015-3202
* Tue Apr 7 2015 Tom Callaway <spot@fedoraproject.org> 2:2015.3.14-1 * Tue Apr 7 2015 Tom Callaway <spot@fedoraproject.org> 2:2015.3.14-1
- update to 2015.3.14 - update to 2015.3.14

Loading…
Cancel
Save