-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Description
Component
tail
Description
uutils accepts obsolete tail -0 FILE (NUM=0) and later hits an internal assertion in the “read backwards” path, causing a panic/crash; GNU treats -0 as “print nothing” and exits normally.
Test / Reproduction Steps
seq 1 10000 > file.txt
./target/release/coreutils tail -0 file.txt- GNU: prints nothing.
- uutils:
thread 'main' (2925945) panicked at src/uu/tail/src/tail.rs:393:17:
assertionleft == rightfailed
left: 1
right: 0
note: run withRUST_BACKTRACE=1environment variable to display a backtrace
Impact
Reliable local DoS (crash) and GNU-incompatible behavior triggered by obsolete -NUM syntax with NUM=0.