You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Principal-root object reads can wait indefinitely on a FIFO at an object path #458
open_principal_root_object_file (elastos/crates/elastos-server/src/auth.rs:5453 on develop 3beb8164) opens an object with O_NOFOLLOW but without O_NONBLOCK. It checks that the object is a regular file only after open() returns. If a FIFO sits at an object path, a read-only open() waits until something opens the FIFO for writing. That wait can be indefinite.
read_principal_root_object (auth.rs:5300) takes the process-wide principal_root_object_mutation_lock() (auth.rs:5308) before it calls read_principal_root_object_locked, which opens the file (auth.rs:5352). While that open() waits, every other principal-root read and write that needs the same lock waits too.
Scope
Placing a FIFO in the person's data folder takes a process running as the same user, or something else with write access there. This is a local availability issue, not a data disclosure: no bytes are read from the FIFO, and the regular-file check refuses it once open() returns.
Other callers of open_principal_root_object_file with the same pattern: read_protected_principal_root_object_file (:5387), protect_legacy_plaintext_principal_root_object (:5489) and scan_declared_principal_root_objects (:7150).
Open with O_NONBLOCK added (O_NOFOLLOW | O_NONBLOCK), keep the existing metadata().is_file() refusal, then clear O_NONBLOCK with fcntl before reading. A FIFO then fails the regular-file check immediately instead of waiting. A test could create a FIFO with mkfifo at an object path and assert that read_principal_root_object returns an error within a short timeout.
Found while adding the limited-read link and non-regular-object tests to #67 (a968ffc5). Those tests leave out a FIFO case for this reason.
Reopened: the fix 2d12a3563 is on the 0.8.0 release train, which is not on develop yet. This issue closes when that fix is on develop with its review recorded and the FIFO case returns an error instead of waiting. #450 keeps the other open-path items for after 0.8.0.
Activity
andersalm commentedon Oct 21, 2026
Duplicate of #450 (L8): fixed on the train in 2d12a35; #450 tracks it.
andersalm commentedon Oct 21, 2026
Reopened: the fix
2d12a3563is on the 0.8.0 release train, which is not on develop yet. This issue closes when that fix is on develop with its review recorded and the FIFO case returns an error instead of waiting. #450 keeps the other open-path items for after 0.8.0.andersalm commentedon Nov 11, 2026
Fix 2d12a35 shipped in 2.0.0: these object reads no longer wait on a FIFO.