Skip to content

tee -p (Linux) ensure_stdout_not_broken Can Hang Forever on Pipes #10308

@sylvestre

Description

@sylvestre

Component

tee

Description

On Linux, uutils tee -p calls ensure_stdout_not_broken() which does an infinite poll() on stdout using only POLLRDBAND. On normal pipelines this event never fires, so tee blocks before it starts copying stdin. GNU tee uses iopoll() (stdin + stdout) and does not hang.

Test / Reproduction Steps

echo "test data" | ./target/release/coreutils tee -p /tmp/output.txt | cat
  • GNU: test data
  • uutils: hangs

Impact

DoS via pipeline deadlock for any Linux workflow using tee -p in pipes (logging pipelines, service wrappers, CI scripts).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions