Fuse-ext2 deadlocks on creating symlinks
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
fuse-umfuse-ext2 (Ubuntu) |
Fix Released
|
High
|
Simon Quigley | ||
Trusty |
Fix Released
|
High
|
Andy Caldwell | ||
Xenial |
Fix Released
|
High
|
Simon Quigley | ||
Zesty |
Fix Released
|
High
|
Simon Quigley | ||
Artful |
Fix Released
|
High
|
Simon Quigley |
Bug Description
[Impact]
* Any attempt to create/overwrite symlinks in a partition mounted by fuseext2 causes the fuseext2 process to deadlock, preventing the mounted filesystem from being used at all until the userspace process is killed and the filesystem is remounted.
[Test Case]
* dd if=/dev/zero of=partition bs=1M count=200
* mkfs.ext2 partition
* mkdir mount
* fuseext2 partition mount -o rw+
* cd mount
* touch test
* ln -s test link - Doesn't complete
* In another shell try to do anything else in the mount directory (ls, touch, rm) - Don't complete
[Regression Potential]
* Since this changes the locking strategy of the code to hold locks less, the main risk is exposing a case where data can be accessed in a non-threadsafe manner, leading to unexpected behaviour.
* The places where the change has been made are at the exit points of the function, and match where similar unlocks are made in other places in the code.
* Since the program at risk is (by design) a userspace program, the risk of kernel data leakage is minimal.
[Other Info]
* I can't actually work out where the upstream code for this project lives, the only upstream I could find is https:/
* This issue seems to apply to all versions of fuseext2 in the ubuntu repos (well, at least it's there in trusty, xenial and zesty)
[Original Description]
Trying to create a symlink in a filesystem mounted by fuseext2 causes the fuseext2 userspace process to deadlock before responding to the fuse request. This is simply due to a code bug in fuse-ext2/op_link.c (lines 104 and 109) where the code calls FUSE_EXT2_LOCK rather than FUSE_EXT2_UNLOCK on exiting the function.
I've confirmed that making that changes allows me to create symlinks happily on the mounted filesystem. The bug appears to exist upstream too.
System info:
$ lsb_release -rd
Description: Linux Mint 18.1 Serena
Release: 18.1
Software version:
$ apt show fuseext2
Package: fuseext2
Version: 0.4-1.1
Priority: optional
Section: universe/misc
Source: fuse-umfuse-ext2
Origin: Ubuntu
Maintainer: Ubuntu Developers <email address hidden>
Original-
Bugs: https:/
Installed-Size: 103 kB
Depends: e2fslibs (>= 1.42), libc6 (>= 2.4), libfuse2 (>= 2.8.1), fuse
Homepage: http://
Download-Size: 24.7 kB
APT-Manual-
APT-Sources: http://
Related branches
- Simon Quigley: Needs Resubmitting
- Ubuntu branches: Pending requested
-
Diff: 31 lines (+8/-2)2 files modifieddebian/changelog (+6/-0)
fuse-ext2/op_link.c (+2/-2)
description: | updated |
Changed in fuse-umfuse-ext2 (Ubuntu): | |
status: | New → Fix Released |
Changed in fuse-umfuse-ext2 (Ubuntu Trusty): | |
importance: | Undecided → High |
status: | New → Confirmed |
Changed in fuse-umfuse-ext2 (Ubuntu Xenial): | |
importance: | Undecided → High |
Changed in fuse-umfuse-ext2 (Ubuntu Zesty): | |
importance: | Undecided → High |
Changed in fuse-umfuse-ext2 (Ubuntu Artful): | |
importance: | Undecided → High |
Changed in fuse-umfuse-ext2 (Ubuntu Xenial): | |
assignee: | nobody → Simon Quigley (tsimonq2) |
Changed in fuse-umfuse-ext2 (Ubuntu Zesty): | |
assignee: | nobody → Simon Quigley (tsimonq2) |
Changed in fuse-umfuse-ext2 (Ubuntu Artful): | |
assignee: | nobody → Simon Quigley (tsimonq2) |
Changed in fuse-umfuse-ext2 (Ubuntu Xenial): | |
status: | New → Confirmed |
Changed in fuse-umfuse-ext2 (Ubuntu Zesty): | |
status: | New → Confirmed |
Changed in fuse-umfuse-ext2 (Ubuntu Artful): | |
status: | Triaged → Confirmed |
milestone: | none → ubuntu-17.09 |
Changed in fuse-umfuse-ext2 (Ubuntu Zesty): | |
milestone: | none → zesty-updates |
Changed in fuse-umfuse-ext2 (Ubuntu Xenial): | |
milestone: | none → xenial-updates |
Changed in fuse-umfuse-ext2 (Ubuntu Trusty): | |
milestone: | none → trusty-updates |
Bringing the proposed fix over from bazaar.