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: CLOSED EOL
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: 2025-05-16 08:04 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-05-16 08:04:38 UTC
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.

Comment 11 Aoife Moloney 2025-04-25 10:25:58 UTC
This message is a reminder that Fedora Linux 40 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 40 on 2025-05-13.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '40'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 40 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 12 Aoife Moloney 2025-05-16 08:04:38 UTC
Fedora Linux 40 entered end-of-life (EOL) status on 2025-05-13.

Fedora Linux 40 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.


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