News for hackers. Stuff that matters.
Re:Arbitrary file write vulnerability in GNU gzip's zgrep ut... by mikece on Monday April 18, 2022 @04:56PM (#31076424)
"This flaw occurs due to insufficient validation when processing filenames with two or more newlines where selected content and the target file names are embedded in crafted multi-line file names."

Perhaps I don't get this because I have used Windows most of my life (and DOS before that) but is it valid to have newline characters in a Unix/Linux filename?

Re:Arbitrary file write vulnerability in GNU gzip's zgrep ut... by i80and on Monday April 18, 2022 @05:01PM (#31076496)
Unix filesystems can typically have filenames containing any bytes except "\0" and "/".

I believe you can also have newline characters in NTFS, although Windows Explorer appears to prevent creating a file with them.

Re:Arbitrary file write vulnerability in GNU gzip's zgrep ut... by mcculley on Monday April 18, 2022 @05:34PM (#31076891)
I have been using the filename "meeting-notes:10/1 \n Unix & Windows.txt" to test various apps. It tends to expose just how brittle modern computing still is.
Re:Arbitrary file write vulnerability in GNU gzip's zgrep ut... by benibela on Monday April 18, 2022 @06:04PM (#31077207)
I made a whole collection: https://github.com/benibela/nasty-files
Re:Arbitrary file write vulnerability in GNU gzip's zgrep ut... by asddubs on Monday April 18, 2022 @06:24PM (#31077412)
"--no-preserve-root" made me laugh. for testing unescaped calls to rm?
Re:Arbitrary file write vulnerability in GNU gzip's zgrep ut... by jamal-kumar on Monday April 18, 2022 @08:50PM (#31078596)
It's a bypass against a mitigation for an old trick which worked back in the day where you could watch someone self-nuke themselves off of IRC by convincing them to type rm -rf /
Re:Arbitrary file write vulnerability in GNU gzip's zgrep ut... by benibela on Tuesday April 19, 2022 @12:18PM (#31085220)
It is to mess with people calling rm * / in the directory

Good thing there is not really any reason to call rm like that

Re:Arbitrary file write vulnerability in GNU gzip's zgrep ut... by asddubs on Wednesday April 20, 2022 @03:55PM (#31102111)
oh does that actually work? the * expanding a filename to an argument? I guess it all just ends up in argv
Re:Arbitrary file write vulnerability in GNU gzip's zgrep ut... by unqueued on Tuesday April 19, 2022 @10:29AM (#31083634)
Oh cool! I use nasty-files as a submodule with some of my tests. I can't believe how long I went without without testing against the filename corner cases.

I've found so much software that doesn't properly handle nasty filenames, I think it should be tested for more.

Re:Arbitrary file write vulnerability in GNU gzip's zgrep ut... by PokestarFan on Wednesday April 20, 2022 @08:57PM (#31104941)
Lol that broke git for me
Re:Arbitrary file write vulnerability in GNU gzip's zgrep ut... by jeffbee on Monday April 18, 2022 @05:05PM (#31076546)
There are no rules about what can be in a filename except they can't contain \0 or / as a matter of practice because the kernel interprets these as end of string and path element separator, respectively.
Re:Arbitrary file write vulnerability in GNU gzip's zgrep ut... by johncolanduoni on Monday April 18, 2022 @11:01PM (#31079379)
For even more fun NTFS filenames can actually have newlines in them if you access them with \\?\.
Re:Arbitrary file write vulnerability in GNU gzip's zgrep ut... by jaclaz on Tuesday April 19, 2022 @03:38AM (#31080531)
Good to know. :)

Another "queer" naming issue in Windows (JFYI), backslash and ALT+0160:

https://msfn.org/board/topic/131103-win_nt~bt-can-be-omitted...

Re:Arbitrary file write vulnerability in GNU gzip's zgrep ut... by pixl97 on Monday April 18, 2022 @05:02PM (#31076507)
https://superuser.com/questions/129519/which-file-systems-su...

So yea, it looks like that linux filesystems accept this, but a lot of utilities break.