oss-sec mailing list archives
Re: Re: Trailing dot in Cygwin filenames [was: failed to clone iptables,ipset,nftables]
From: Werner Koch <wk () gnupg org>
Date: Mon, 28 Apr 2025 11:38:51 +0200
Hi!
But Cygwin does something unusual, it *actually* creates a file with the 2-char sequence "y.", through whatever means. Explorer *shows* it
C:\Users\dd9jn\test>echo foo >x.
C:\Users\dd9jn\test>dir
[...]
28.04.2025 11:30 6 x
1 Datei(en), 6 Bytes
C:\Users\dd9jn\test>echo foo >\\?\\c:\users\dd9jn\test\x.
C:\Users\dd9jn\test>dir
[...]
28.04.2025 11:30 6 x
28.04.2025 11:30 6 x.
2 Datei(en), 12 Bytes
Thus you can create such a file using the Extended Path Length Prefix
which bypasses the mapping used by CreateFile. For detailed info see
also
https://googleprojectzero.blogspot.com/2016/02/the-definitive-guide-on-win32-to-nt.html
Salam-Shalom,
Werner
--
The pioneers of a warless world are the youth that
refuse military service. - A. Einstein
Attachment:
openpgp-digital-signature.asc
Description:
Current thread:
- Re: Trailing dot in Cygwin filenames [was: failed to clone iptables,ipset,nftables] Jan Engelhardt (Apr 25)
- Re: Re: Trailing dot in Cygwin filenames [was: failed to clone iptables,ipset,nftables] Werner Koch (Apr 28)
