19561 Commits

Author SHA1 Message Date
Sylvestre Ledru 6b22fda6b9 ci: run check-toctou.sh in a dedicated TOCTOU job 2026-06-05 17:58:26 +02:00
Sylvestre Ledru 3222b4aa52 util: move touch/head TOCTOU checks into check-toctou.sh 2026-06-05 17:58:26 +02:00
Sylvestre Ledru c004672c5e mkfifo: drop path-based chmod to close TOCTOU race; switch to rustix (#10020) (#12174)
(except on mac)
2026-06-05 15:52:53 +02:00
Sylvestre Ledru 7d27b3baa1 head: add TOCTOU regression tests and fix comment typo (#12637)
Follow-up to the metadata TOCTOU fix (#11972, PR #12439):

- Add a syscall-level regression guard in util/check-safe-traversal.sh:
  under strace, head must read metadata from the open descriptor
  (fstat/statx on the fd) and must not stat the path before opening it.
  Verified this fails on the pre-fix code and passes after.
- Add an integration test asserting that an unreadable file produces an
  error but no "==> name <==" header, matching GNU (the header is only
  printed after a successful open).
- Fix a stray paren in the Windows-branch comment.
2026-06-05 15:21:40 +02:00
Max Ambaum 43536897e4 head: Fixed TOCTOU bug in checking of metadata (#12439)
* head: Fixed TOCTOU bug in checking of metadata

* Fixed missing import and qualification for windows
2026-06-05 13:18:15 +02:00
mattsu 533edad992 kill: replace nix::sys::signal with rustix::process (#12326) 2026-06-05 13:09:15 +02:00
weili abcdcdca53 pr: reject a non-positive expand-tab width (-e0)
`pr -e0` on input containing a tab aborted with a remainder-by-zero panic
(`chunk.len() % expand_options.width` in `apply_expand_tab`). The
`-e[char][width]` parser accepted a width of `0` — and a negative width via
e.g. `-eX-5` — without validation, so the zero/negative reached the chunk
arithmetic.

Reject `width <= 0` while parsing `-e`, emitting the same invalid-argument
error GNU produces (`pr: '-e' extra characters or invalid number in the
argument: '0'`, exit 1) instead of crashing.
2026-06-05 11:19:08 +02:00
oech3 e63cc0c260 openbsd.yml: get additional free disk space (#12627) 2026-06-05 10:19:17 +02:00
Sylvestre Ledru 6d015356dd pwd: ignore non-option arguments, drop getcwd disabling from pwd-long test 2026-06-05 09:44:04 +02:00
renovate[bot] 785860e1c5 chore(deps): update rust crate libfuzzer-sys to v0.4.13 2026-06-05 07:21:26 +02:00
oech3 0ff88b5711 dd: support nocache on android, freebsd (#12602) 2026-06-04 21:32:31 +02:00
Devel bd9f32f7ae numfmt: prevent panic if float precision specifier > 65535 (#12600) 2026-06-04 17:03:36 +02:00
Sylvestre Ledru d296f8d39f Merge pull request #12171 from sylvestre/toctou-touch
touch: drop O_TRUNC on create to close TOCTOU race (#10019)
2026-06-04 17:02:57 +02:00
Sylvestre Ledru ca0c842e71 touch: drop O_TRUNC on create to close TOCTOU race (#10019) 2026-06-04 16:19:26 +02:00
oech3 44087eb515 tee: fix incorrect comment about flush 2026-06-04 14:42:54 +02:00
oech3 e3db7f30f5 openbsd.yml: improve perf & sync disk space cleanup 2026-06-04 11:31:40 +02:00
Sai Asish Y 452824f8ab printf: avoid panic on integer precision above u16::MAX
Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
2026-06-04 11:06:58 +02:00
oech3 64e536cbe6 dd: replace nix by rustix (#12567)
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2026-06-04 10:03:24 +02:00
Sylvestre Ledru 22b4c6d15d expr: speed up index from O(N*M) to O(N+M) 2026-06-04 09:52:44 +02:00
Sylvestre Ledru 0011d54fbb expr: add a benchmark (#12578) 2026-06-03 22:43:58 +02:00
Lorenzo Rossi cfc6457681 chown: restrict no-dereference symlink ctime test to Linux (#12556) 2026-06-03 17:40:14 +02:00
oech3 113c9cd1f9 head: deduplicate flush() workaround 2026-06-03 14:57:30 +02:00
oech3 e3b680d647 baseNM: read ahead 2026-06-03 10:05:36 +02:00
oech3 9da057e558 sum: read ahead for perf for 1st run 2026-06-03 09:39:36 +02:00
Daniel Hofstetter c5ee3852fd dircolors: simplify guess_syntax fn 2026-06-02 11:38:32 +02:00