bug(stat): Parser Edge Cases (--format option) (Fuzzing Part 1)
Maintainers usually reply within 1 day
@Franklin-Qi is already working on this.
Since Oct 16, 2026.
Assessment
- Difficulty
- 3/5
- Estimated time
- Half a day
- Newbie friendliness
- 22/100
Research direction
Start by reproducing the stat --format cases in the issue against the built binary and comparing them with GNU stat's invalid directive errors. Pull request #15352 is already open against this issue, so read it first to see what it covers. Done means the malformed directives in the report fail with an invalid-directive error like GNU's, and the reproduction cases match GNU output.
Written by the indexing model from the issue text.
Description
Hi, uutils mainteners, i hope everything good
we fuzzed the stat parser for edge cases via manual fuzzing ourselves and we discovered as for now one edge case
relunsec@relunsec:~/software/coreutils/target/debug$ ./stat --format='%++-+%1212x' /
?1212x
relunsec@relunsec:~/software/coreutils/target/debug$ gnustat --format='%++-+%1212x' /
gnustat: ‘%++-+%’: invalid directive
relunsec@relunsec:~/software/coreutils/target/debug$
same for
relunsec@relunsec:~/software/coreutils/target/debug$ ./stat --format=$'%++-+-s%1212x' /
+28 2026-10-14 04:31:58.902392402 -0400
relunsec@relunsec:~/software/coreutils/target/debug$ gnustat --format=$'%++-+-s%1212x' /
28 2026-10-14 04:31:58.902392402 -0400
relunsec@relunsec:~/software/coreutils/target/debug$
also we discovered
relunsec@relunsec:~/software/coreutils/target/debug$ ./stat --format=$'%+-%%ss%1212x' /
?28s 2026-10-14 04:31:58.902392402 -0400
relunsec@relunsec:~/software/coreutils/target/debug$ gnustat --format=$'%+-%%ss%1212x' /
gnustat: ‘%+-%’: invalid directive
relunsec@relunsec:~/software/coreutils/target/debug$
can be with just
same as
relunsec@relunsec:~/software/coreutils/target/debug$ ./stat --format=$'%s%0%%' /
28?%
relunsec@relunsec:~/software/coreutils/target/debug$ gnustat --format=$'%s%0%%' /
28gnustat: ‘%0%’: invalid directive
relunsec@relunsec:~/software/coreutils/target/debug$
relunsec@relunsec:~/software/coreutils/target/debug$ ./stat --format=$'%-%s1212x' /
?s1212x
relunsec@relunsec:~/software/coreutils/target/debug$ gnustat --format=$'%-%s1212x' /
gnustat: ‘%-%’: invalid directive
relunsec@relunsec:~/software/coreutils/target/debug$
reproduces this issue
seems similar as below but with different input
same as
relunsec@relunsec:~/software/coreutils/target/debug$ ./stat --format '%#%d' --file-system /
?d
relunsec@relunsec:~/software/coreutils/target/debug$ gnustat --format '%#%d' --file-system /
gnustat: ‘%#%’: invalid directive
as i see gnu errors out, uutils no for invalid directive
and then same for
relunsec@relunsec:~/software/coreutils/target/debug$ ./stat --format '%s%#%#b' --file-system /
131072?#b
relunsec@relunsec:~/software/coreutils/target/debug$ gnustat --format '%s%#%#b' --file-system /
131072gnustat: ‘%#%’: invalid directive
relunsec@relunsec:~/software/coreutils/target/debug$
- Dominant language
- Rust
- Stars
- 24.3k
- Forks
- 2.1k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 310
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from uutils/coreutils
-
minorbug(mv): invalid mode errors not quotedPossibly taken @henrimarconni claimed this 2 days ago. OpenU - mv
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
ptx: break file missing path in error messagePossibly taken @Franklin-Qi claimed this 2 days ago. OpenU - ptx
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
uutils/coreutils#15307 · 1 comment ·
Maintainers usually reply within 1 day
-
minorbug(stat): os errno not stripped when failing to flush stdoutPossibly taken @cestercian claimed this 9 days ago. OpenU - stat
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
uutils/coreutils#15200 · 3 comments ·
Maintainers usually reply within 1 day
-
stty: support B460800 and B921600 baud ratesPossibly taken @oech3 claimed this 4 days ago. Openawaiting upstream U - stty
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
B - high priority U - du
Difficulty 1/5 Under an hour Newbie friendliness 82/100
uutils/coreutils#14984 · 1 comment ·
Maintainers usually reply within 1 day
All issues in uutils/coreutils
Similar issues
-
area:ecosystem documentation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Chelis-Lang/chelis#3866 ·
Maintainers usually reply within 1 day
-
bug documentation sev-0
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
dekobon/big-code-analysis#1620 ·
Maintainers usually reply within 3 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100