-
Notifications
You must be signed in to change notification settings - Fork 519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fuzzing Crashes #723
Comments
Thank you very much for doing this! Looking forward to tackling some of these. |
I fixed the |
I want to fix the crash first but just noting for my future self: |
Fixed the |
@truemedian Any chance you can document how you ran the fuzz tests as well? It'd be nice to document that so we can do it again in the future. |
Did you try vttest ? |
Yeah I regularly run vttest and it’s the gold standard I’m using for #632 (in addition to the raw source audit). We’re not 100% yet but we do much better than most terminals. Downsides of vttest is that it’s hard to automate. And it tests a very very very very small surface area of sequences and mostly only in the happy path, not the edge cases |
Yeah maybe good to use to find issues then fix and add automated unit tests |
Simpler reproduction for the cols=$(tput cols)
printf "\033[${cols}G" # move to last column
printf "\033[D" # move left
printf "\u6A4B"
printf "\r"
printf "\033[69P"
printf "0"
|
Fixed the |
All terminal crashers are fixed and tested. |
All crashers fixed. Thanks! |
The following results were obtained via fuzzing, as such they're mostly malicious towards ghostty and will not make much sense.
terminal/Screen
toScreen
Failing
assert(y < RowIndexTag.screen.maxLen(screen))
via enable_mode_3
Traceback
Input
mz8zaBtbPzQwaBtjmz82OWgbWzszczAbWzEwMGUwMDAbWz80MGg=
(base64)via deccolm
Traceback
Input
mz8zaBtbPzQwaJs7NHIwmzMwZJs1MDAwYps/M2w=
(base64)via restoreMode
Traceback
Input
mz82OWibPzNoMBtbPzQwaJsxN3ObNTg4MGIbWz80MHI=
(base64)terminal/Terminal
print
Failing
assert(!utf8proc.graphemeBreakStateful(
Traceback
Input
MAwbWz8yMDI3aOC9vdYw
(base64)Failing
assert(x < self.cols)
maybe widechar related
Traceback
Input
MDAwMDAwMDAwMDAwmzRoMDAwMAkJMDAwMDAwMDAJCQkwMDDwMDAwMDAwMOWAgA0wMDAwMDCbSTCbOUkw
(base64)Failing
assert(self.screen.cursor.x > 0)
(FIXED)maybe deleteChars related?
Traceback
Input
MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwCeswMDD0MDAwMDAwMDAwMDAw6JubDRtbNjlQMA==
(base64)cursorLeft
Overflow in
self.screen.cursor.y - 1
via backspace
Traceback
Input
mz80NWibM3II
(base64)horizontalTabBack (FIXED)
Overflow in
self.screen.cursor.x -= 1
via csiDispatch
Traceback
Input
G1s/NmgbNxtbPzY5aBtbNXMbOBtbWg==
(base64)insertBlanks (FIXED)
Overflow in
right_limit - pivot
via csiDispatch
Traceback
Input
(base64)
The text was updated successfully, but these errors were encountered: