Re:Arbitrary file write vulnerability in GNU gzip's zgrep ut...
by dataflow on Monday April 18, 2022 @09:05PM
(#31078703)
Linux even allows filenames with end-of-transmission characters in them, which is a choice I'd question long before I start questioning newlines!
[ Parent
| on HN ]
Re:Arbitrary file write vulnerability in GNU gzip's zgrep ut...
by gpvos on Monday April 18, 2022 @11:25PM
(#31079483)
EOT or ctrl-D only has significance when typed into a tty. Once it has turned into a character it is as harmless as any other byte value, it doesn't end anything by itself.
Re:Arbitrary file write vulnerability in GNU gzip's zgrep ut...
by moring on Tuesday April 19, 2022 @02:31AM
(#31080202)
Doesn't the article show that newline isn't harmless at all?
Of course EOT doesn't end anything by itself, nor does 0x0a end a line by itself -- all that happens through code that interprets those characters in a particular way, so talking about the "danger" of a character in absence of any code that operates on it is meaningless. In the presence of code, on the other hand, "harmless" in the extreme sense means "there exists no code that will act up when presented this character", which the article shows to be wrong.
Re:Arbitrary file write vulnerability in GNU gzip's zgrep ut...
by dataflow on Monday April 18, 2022 @11:32PM
(#31079520)
I'm aware, but it nevertheless doesn't make any sense to have it in a file name.
Re:Arbitrary file write vulnerability in GNU gzip's zgrep ut...
by gpvos on Tuesday April 19, 2022 @03:06AM
(#31080376)
I'm just saying that it makes exactly as much sense as ctrl-E or any other control char, it has no special status.
Re:Arbitrary file write vulnerability in GNU gzip's zgrep ut...
by dataflow on Tuesday April 19, 2022 @03:12AM
(#31080410)
There are quite a few ASCII control characters [1] that could make more sense than EOT, e.g., \t, \n, \e, etc.
But yes, EOT is not the only nonsensical character that you could put in a file name, and I never claimed such.
[1] https://en.wikipedia.org/wiki/Control_character#In_ASCII