Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 2274653 - rmdir incorrectly deletes recursively, causing data loss (upstream patch available)
Summary: rmdir incorrectly deletes recursively, causing data loss (upstream patch avai...
Keywords:
Status: ON_QA
Alias: None
Product: Fedora
Classification: Fedora
Component: kio-fuse
Version: 40
Hardware: All
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Yaroslav Sidlovsky
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-04-12 01:06 UTC by Andrew Gunnerson
Modified: 2024-04-13 03:30 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Andrew Gunnerson 2024-04-12 01:06:25 UTC
When running rmdir on a kio-fuse mount point, it might recursively delete the directory. Normally, rmdir is only supposed to delete the directory if it's empty, so this can result in data loss. I lost a bunch of directories due to this, but was fortunately able to restore from a backup.

This bug was reported upstream (https://bugs.kde.org/show_bug.cgi?id=482902) and is already fixed (https://invent.kde.org/system/kio-fuse/-/merge_requests/77) in the master branch.

Since there's no new upstream release yet and there's potential for data loss, could the patch be included in the Fedora package?

Reproducible: Always

Steps to Reproduce:
1. On the remote system, run `mkdir -p a/b`
2. On the local system, navigate to sftp://hostname in Dolphin (but don't open `a` itself)
3. Press F4 to open the terminal. This will auto-mount kio-fuse and `cd` to the proper directory
4. Run `rmdir a`
Actual Results:  
`a` is deleted even though it's not empty

Expected Results:  
rmdir should fail with ENOTEMPTY

Comment 1 Yaroslav Sidlovsky 2024-04-12 07:30:21 UTC
Sure! Thanks for the information. I'll update package ASAP.

Comment 2 Fedora Update System 2024-04-12 10:07:41 UTC
FEDORA-2024-58ca8c3605 (kio-fuse-5.1.0-5.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-58ca8c3605

Comment 3 Fedora Update System 2024-04-12 11:18:52 UTC
FEDORA-2024-02866d4489 (kio-fuse-5.1.0-2.fc39) has been submitted as an update to Fedora 39.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-02866d4489

Comment 4 Fedora Update System 2024-04-12 12:00:59 UTC
FEDORA-EPEL-NEXT-2024-d951d8eb02 (kio-fuse-5.1.0-2.el9.next) has been submitted as an update to Fedora EPEL 9 Next.
https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-NEXT-2024-d951d8eb02

Comment 5 Fedora Update System 2024-04-12 14:10:01 UTC
FEDORA-2024-42c01b81b1 (kio-fuse-5.1.0-2.fc38) has been submitted as an update to Fedora 38.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-42c01b81b1

Comment 6 Andrew Gunnerson 2024-04-12 15:37:29 UTC
Thanks for the super quick update! I gave it a try and can confirm the issue is fixed.

Comment 7 Fedora Update System 2024-04-13 01:41:14 UTC
FEDORA-2024-02866d4489 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-02866d4489`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-02866d4489

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2024-04-13 01:54:30 UTC
FEDORA-2024-58ca8c3605 has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-58ca8c3605`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-58ca8c3605

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2024-04-13 02:17:33 UTC
FEDORA-EPEL-NEXT-2024-d951d8eb02 has been pushed to the Fedora EPEL 9 Next testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-NEXT-2024-d951d8eb02

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2024-04-13 03:30:42 UTC
FEDORA-2024-42c01b81b1 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-42c01b81b1`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-42c01b81b1

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.


Note You need to log in before you can comment on or make changes to this bug.