From a4924ec42ff30aa1ccca3215e422bd8fe495892a Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 10 2018 05:51:46 +0000 Subject: import fuse-2.9.2-10.el7 --- diff --git a/SOURCES/libfuse-fix-crash-in-unlock_path.patch b/SOURCES/libfuse-fix-crash-in-unlock_path.patch new file mode 100644 index 0000000..cb138ee --- /dev/null +++ b/SOURCES/libfuse-fix-crash-in-unlock_path.patch @@ -0,0 +1,50 @@ +From 3a2bd4da6b0b713276528d0c818f9e7be515e8ec Mon Sep 17 00:00:00 2001 +From: "Ratna_Bolla@dell.com" +Date: Mon, 4 Feb 2013 18:30:14 +0100 +Subject: [PATCH] libfuse: fix crash in unlock_path() + +Patch by Ratna Manoj. + +queue_element_unlock() should set ->first_locked and ->second_locked to false. + +Discovered with 'fs_racer'. The assert(wnode->treelock == TREELOCK_WRITE) in +unlock_path() was hit within minutes. + +Miklos: simplified patch +--- + ChangeLog | 4 ++++ + lib/fuse.c | 2 ++ + 2 files changed, 6 insertions(+) + +diff --git a/ChangeLog b/ChangeLog +index dbd10e85ebf8..076bcaf54490 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,7 @@ ++2013-02-04 Miklos Szeredi ++ ++ * libfuse: fix crash in unlock_path(). Patch by Ratna Manoj ++ + 2012-10-01 Miklos Szeredi + + * Released 2.9.2 +diff --git a/lib/fuse.c b/lib/fuse.c +index 599a587fbe60..1917346c759d 100644 +--- a/lib/fuse.c ++++ b/lib/fuse.c +@@ -1021,10 +1021,12 @@ static void queue_element_unlock(struct fuse *f, struct lock_queue_element *qe) + if (qe->first_locked) { + wnode = qe->wnode1 ? *qe->wnode1 : NULL; + unlock_path(f, qe->nodeid1, wnode, NULL); ++ qe->first_locked = false; + } + if (qe->second_locked) { + wnode = qe->wnode2 ? *qe->wnode2 : NULL; + unlock_path(f, qe->nodeid2, wnode, NULL); ++ qe->second_locked = false; + } + } + +-- +2.14.3 + diff --git a/SPECS/fuse.spec b/SPECS/fuse.spec index 6d9dcf1..423b455 100644 --- a/SPECS/fuse.spec +++ b/SPECS/fuse.spec @@ -1,17 +1,19 @@ Name: fuse Version: 2.9.2 -Release: 8%{?dist} +Release: 10%{?dist} Summary: File System in Userspace (FUSE) utilities Group: System Environment/Base License: GPL+ -URL: http://fuse.sf.net -Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz +URL: https://github.com/libfuse/libfuse +Source0: https://github.com/libfuse/libfuse/releases/download/fuse_2_9_4/%{name}-%{version}.tar.gz Source1: %{name}.conf Patch1: fuse-0001-More-parentheses.patch Patch2: fuse-aarch64.patch Patch3: buffer_size.patch +Patch4: libfuse-fix-crash-in-unlock_path.patch + Requires: which Conflicts: filesystem < 3 BuildRequires: libselinux-devel @@ -55,6 +57,7 @@ sed -i 's|mknod|echo Disabled: mknod |g' util/Makefile.in %patch1 -p1 -b .add_parentheses %patch2 -p1 -b .aarch64 %patch3 -p1 -b .buffer_size +%patch4 -p1 -b .unlock_path_crash %build # Can't pass --disable-static here, or else the utils don't build @@ -106,6 +109,12 @@ rm -f %{buildroot}%{_sysconfdir}/udev/rules.d/99-fuse.rules %{_includedir}/fuse %changelog +* Fri Jan 05 2018 Miklos Szeredi - 2.9.2-10 +- Fix crash in unlock_path() (rhbz#1527008) + +* Fri Oct 27 2017 Miklos Szeredi - 2.9.2-9 +- Update URLs in specfile to point to github project + * Tue May 02 2017 Carlos Maiolino - 2.9.2-8 - Make buffer size match kernel max transfer size