bug(shuf): when the file is /dev/vhost-net, does not error out
Open
Nobody has claimed this yet.
U - shuf
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
Hi, uutils mainteners
we uncovered another issue with the shuf utility, it returns 0 status code and no errors, as our testing confirms when the file is /dev/vhost-net
relunsec@relunsec:~/software/coreutils/target/debug$ sudo ./shuf /dev/vhost-net
relunsec@relunsec:~/software/coreutils/target/debug$ echo $?
0
relunsec@relunsec:~/software/coreutils/target/debug$ sudo gnushuf /dev/vhost-net
gnushuf: read error: File descriptor in bad state
relunsec@relunsec:~/software/coreutils/target/debug$ echo $?
1
relunsec@relunsec:~/software/coreutils/target/debug$
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the shuf command entry point and reproduce the behavior with /dev/vhost-net, comparing its status and error output with GNU shuf. Trace how input read failures are handled, then verify that this device produces a reported error and a nonzero exit status.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100