Skip to content

split: harden output open path against TOCTOU target swaps#11401

Open
can1357 wants to merge 1 commit intouutils:mainfrom
can1357:split-harden-output-open-path-against-toctou-target-swaps
Open

split: harden output open path against TOCTOU target swaps#11401
can1357 wants to merge 1 commit intouutils:mainfrom
can1357:split-harden-output-open-path-against-toctou-target-swaps

Conversation

@can1357
Copy link

@can1357 can1357 commented Mar 18, 2026

uutils split checks input/output identity by path before opening the output and then opens with truncation, leaving a race window open on mutable path components. GNU opens first and compares the opened output inode against input before truncation.

Reproduction Steps

Omitted due to nondeterministic TOCTOU

Impact

The race can cause split to truncate/write a file different from the one validated, including the input file or another file the process can access.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant