Bug 1866940

Summary: libcephfs uses static dirent for readdir which is not thread-safe
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Patrick Donnelly <pdonnell>
Component: CephFSAssignee: Patrick Donnelly <pdonnell>
Status: CLOSED ERRATA QA Contact: Hemanth Kumar <hyelloji>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.1CC: ceph-eng-bugs, sweil, tserlin, vereddy
Target Milestone: z2   
Target Release: 4.1   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: ceph-14.2.8-94.el8cp, ceph-14.2.8-94.el7cp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-30 17:26:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Patrick Donnelly 2020-08-06 21:47:25 UTC
Description of problem:

See: https://tracker.ceph.com/issues/46832

This issue can be reproduced by running the tasks/volumes task in the upstream teuthology suite and grepping the mgr logs for a "Traceback" looking like what is in the above issue description. The specific test may _not_ fail because another purge thread picks up the work.

This is urgent because it's conceivable but extremely unlikely that two threads writing to the same dirent may construct an invalid file name. In particular, the volumes plugin purge threads may accidentally recursively remove a file path containing "../" which would cause the threads to delete parent directories above the subvolume to be deleted.

Comment 10 errata-xmlrpc 2020-09-30 17:26:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat Ceph Storage 4.1 Bug Fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4144