Skip to content

mv,cp: fix xattr TOCTOU by using file descriptor-based operations#10545

Open
sylvestre wants to merge 1 commit intouutils:mainfrom
sylvestre:issue-10014
Open

mv,cp: fix xattr TOCTOU by using file descriptor-based operations#10545
sylvestre wants to merge 1 commit intouutils:mainfrom
sylvestre:issue-10014

Conversation

@sylvestre
Copy link
Contributor

Closes: #10014

@uutils uutils deleted a comment from github-actions bot Jan 28, 2026
@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/cp/cp-mv-enotsup-xattr. tests/cp/cp-mv-enotsup-xattr is passing on 'main'. Maybe you have to rebase?

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/cp/cp-mv-enotsup-xattr. tests/cp/cp-mv-enotsup-xattr is passing on 'main'. Maybe you have to rebase?

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/cp/cp-mv-enotsup-xattr. tests/cp/cp-mv-enotsup-xattr is passing on 'main'. Maybe you have to rebase?
Note: The gnu test tests/cp/sparse-2 is now being skipped but was previously passing.

@sylvestre sylvestre force-pushed the issue-10014 branch 2 times, most recently from 6dda6b4 to 3f06bad Compare February 21, 2026 21:03
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 21, 2026

Merging this PR will not alter performance

✅ 298 untouched benchmarks
⏩ 48 skipped benchmarks1


Comparing sylvestre:issue-10014 (8d55b2a) with main (7609966)

Open in CodSpeed

Footnotes

  1. 48 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/cp/cp-mv-enotsup-xattr. tests/cp/cp-mv-enotsup-xattr is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/existing-perm-race. tests/cp/existing-perm-race is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/file-perm-race. tests/cp/file-perm-race is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/date/date-locale-hour. tests/date/date-locale-hour is passing on 'main'. Maybe you have to rebase?

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/cp/cp-mv-enotsup-xattr. tests/cp/cp-mv-enotsup-xattr is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/existing-perm-race. tests/cp/existing-perm-race is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/file-perm-race. tests/cp/file-perm-race is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/date/date-locale-hour. tests/date/date-locale-hour is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/date/resolution. tests/date/resolution is passing on 'main'. Maybe you have to rebase?

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/cp/cp-mv-enotsup-xattr. tests/cp/cp-mv-enotsup-xattr is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/existing-perm-race. tests/cp/existing-perm-race is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/file-perm-race. tests/cp/file-perm-race is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/tty/tty-eof (fails in this run but passes in the 'main' branch)

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/cp/cp-mv-enotsup-xattr. tests/cp/cp-mv-enotsup-xattr is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/existing-perm-race. tests/cp/existing-perm-race is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/file-perm-race. tests/cp/file-perm-race is passing on 'main'. Maybe you have to rebase?

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/cp/cp-mv-enotsup-xattr. tests/cp/cp-mv-enotsup-xattr is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/existing-perm-race. tests/cp/existing-perm-race is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/file-perm-race. tests/cp/file-perm-race is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/date/resolution. tests/date/resolution is passing on 'main'. Maybe you have to rebase?

@sylvestre sylvestre marked this pull request as ready for review February 26, 2026 20:36
@sylvestre sylvestre force-pushed the issue-10014 branch 2 times, most recently from cf75720 to 1514ccd Compare March 16, 2026 21:59
@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/cp/cp-mv-enotsup-xattr. tests/cp/cp-mv-enotsup-xattr is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/existing-perm-race. tests/cp/existing-perm-race is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/file-perm-race. tests/cp/file-perm-race is passing on 'main'. Maybe you have to rebase?
Skipping an intermittent issue tests/date/date-locale-hour (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/pr/bounded-memory (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/expand/bounded-memory is now passing!

@sylvestre sylvestre force-pushed the issue-10014 branch 2 times, most recently from 35596ca to 5fa39b8 Compare March 17, 2026 10:45
@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/cp/cp-mv-enotsup-xattr. tests/cp/cp-mv-enotsup-xattr is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/existing-perm-race. tests/cp/existing-perm-race is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/file-perm-race. tests/cp/file-perm-race is passing on 'main'. Maybe you have to rebase?
Congrats! The gnu test tests/expand/bounded-memory is now passing!

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/cp/cp-mv-enotsup-xattr. tests/cp/cp-mv-enotsup-xattr is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/existing-perm-race. tests/cp/existing-perm-race is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/sparse. tests/cp/sparse is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/sparse-2. tests/cp/sparse-2 is passing on 'main'. Maybe you have to rebase?
GNU test failed: tests/cp/sparse-extents-2. tests/cp/sparse-extents-2 is passing on 'main'. Maybe you have to rebase?
Skipping an intermittent issue tests/date/date-locale-hour (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tail/symlink (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/tail/pipe-f is now passing!

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.

mv xattr preservation TOCTOU on cross-device moves

1 participant