Longest — Command In Crosh

For example, using a printf built-in (or just pressing Tab to trigger auto-complete), the buffer limit becomes —that is 2^17 - 1 .

echo AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA... (32,767 times) 0 Execution time: ~400ms (mostly rendering) Shell sanity after execution: Intact. Final Verdict The longest command in Crosh is 32,767 characters using an external binary, or 131,071 characters using a shell built-in. longest command in crosh

Date: Draft Topic: Shell limits & buffer overflows in crosh For example, using a printf built-in (or just

Result: The cursor froze. Crosh did not crash, but it stopped accepting keyboard input for 3 seconds. After processing, the command executed. Final Verdict The longest command in Crosh is

However, if you use a that doesn't require forking, the limit changes.

Crosh doesn't crash—it simply respects the POSIX ARG_MAX limit. Chrome OS’s little debug shell is more robust than it looks.

echo [32,767 copies of the letter 'A'] At character 32,768, Crosh returns:

Back
Top Bottom