diff options
author | James <> | 2015-11-04 11:49:21 +0000 |
---|---|---|
committer | James <> | 2015-11-04 11:49:21 +0000 |
commit | 716ca530e1c4515d8683c9d5be3d56b301758b66 (patch) | |
tree | 700eb5bcc1a462a5f21dcec15ce7c97ecfefa772 /package/utils/fuse/patches | |
download | trunk-47381-716ca530e1c4515d8683c9d5be3d56b301758b66.tar.gz trunk-47381-716ca530e1c4515d8683c9d5be3d56b301758b66.tar.bz2 trunk-47381-716ca530e1c4515d8683c9d5be3d56b301758b66.zip |
Diffstat (limited to 'package/utils/fuse/patches')
4 files changed, 120 insertions, 0 deletions
diff --git a/package/utils/fuse/patches/001-fix_exec_environment_for_mount_and_umount.patch b/package/utils/fuse/patches/001-fix_exec_environment_for_mount_and_umount.patch new file mode 100644 index 0000000..392bb5e --- /dev/null +++ b/package/utils/fuse/patches/001-fix_exec_environment_for_mount_and_umount.patch @@ -0,0 +1,59 @@ +From cfe13b7a217075ae741c018da50cd600e5330de2 Mon Sep 17 00:00:00 2001 +From: Miklos Szeredi <mszeredi@suse.cz> +Date: Fri, 22 May 2015 10:58:43 +0200 +Subject: [PATCH] libfuse: fix exec environment for mount and umount + +Found by Tavis Ormandy (CVE-2015-3202). +--- +--- a/lib/mount_util.c ++++ b/lib/mount_util.c +@@ -95,10 +95,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); +@@ -146,10 +148,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); +@@ -205,10 +214,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); diff --git a/package/utils/fuse/patches/100-missing_includes.patch b/package/utils/fuse/patches/100-missing_includes.patch new file mode 100644 index 0000000..0790bff --- /dev/null +++ b/package/utils/fuse/patches/100-missing_includes.patch @@ -0,0 +1,20 @@ +--- a/lib/mount_util.c ++++ b/lib/mount_util.c +@@ -16,6 +16,7 @@ + #include <errno.h> + #include <fcntl.h> + #include <limits.h> ++#include <paths.h> + #ifndef __NetBSD__ + #include <mntent.h> + #endif +--- a/include/fuse.h ++++ b/include/fuse.h +@@ -32,6 +32,7 @@ + #include <sys/stat.h> + #include <sys/statvfs.h> + #include <sys/uio.h> ++#include <sys/file.h> + + #ifdef __cplusplus + extern "C" { diff --git a/package/utils/fuse/patches/112-no_break_on_mknod.patch b/package/utils/fuse/patches/112-no_break_on_mknod.patch new file mode 100644 index 0000000..33f7c6c --- /dev/null +++ b/package/utils/fuse/patches/112-no_break_on_mknod.patch @@ -0,0 +1,11 @@ +--- a/util/Makefile.in ++++ b/util/Makefile.in +@@ -676,7 +676,7 @@ mount_util.c: $(top_srcdir)/lib/mount_ut + + install-exec-hook: + -chmod u+s $(DESTDIR)$(bindir)/fusermount +- @if test ! -e $(DESTDIR)/dev/fuse; then \ ++ -@if test ! -e $(DESTDIR)/dev/fuse; then \ + $(MKDIR_P) $(DESTDIR)/dev; \ + echo "mknod $(DESTDIR)/dev/fuse -m 0666 c 10 229 || true"; \ + mknod $(DESTDIR)/dev/fuse -m 0666 c 10 229 || true; \ diff --git a/package/utils/fuse/patches/200-backport_arm64_fuse_kernel_h_clean_includes.patch b/package/utils/fuse/patches/200-backport_arm64_fuse_kernel_h_clean_includes.patch new file mode 100644 index 0000000..d45da84 --- /dev/null +++ b/package/utils/fuse/patches/200-backport_arm64_fuse_kernel_h_clean_includes.patch @@ -0,0 +1,30 @@ +From 914871b20a901e3e1e981c92bc42b1c93b7ab81b Mon Sep 17 00:00:00 2001 +From: Riku Voipio <riku.voipio@linaro.org> +Date: Thu, 07 Feb 2013 11:04:21 +0000 +Subject: fuse_kernel.h: clean includes + +Use <linux/types.h> for linux and define types used for other operating systems +using <stdint.h> types. +--- +(limited to 'include/fuse_kernel.h') + +--- a/include/fuse_kernel.h ++++ b/include/fuse_kernel.h +@@ -88,12 +88,16 @@ + #ifndef _LINUX_FUSE_H + #define _LINUX_FUSE_H + +-#include <sys/types.h> ++#ifdef __linux__ ++#include <linux/types.h> ++#else ++#include <stdint.h> + #define __u64 uint64_t + #define __s64 int64_t + #define __u32 uint32_t + #define __s32 int32_t + #define __u16 uint16_t ++#endif + + /* + * Version negotiation: |