All of lore.kernel.org
 help / color / mirror / Atom feed
From: Werner Koch <wk@gnupg.org>
To: Jan Engelhardt <ej@inai.de>
Cc: Florian Westphal <fw@strlen.de>,
	 oss-security@lists.openwall.com,
	Sunny73Cr <Sunny73Cr@protonmail.com>,
	 "netfilter-devel@vger.kernel.org"
	<netfilter-devel@vger.kernel.org>
Subject: Re: [oss-security] Re: Trailing dot in Cygwin filenames [was: failed to clone iptables,ipset,nftables]
Date: Mon, 28 Apr 2025 11:38:51 +0200	[thread overview]
Message-ID: <87sels7hhw.fsf@jacob.g10code.de> (raw)
In-Reply-To: <sqo7nqpr-151q-4sr4-1o40-r95r62179s29@vanv.qr> (Jan Engelhardt's message of "Fri, 25 Apr 2025 09:46:15 +0200 (CEST)")

[-- Attachment #1: Type: text/plain, Size: 951 bytes --]

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 #2: openpgp-digital-signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

  reply	other threads:[~2025-04-28 10:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-25  5:30 Fail to clone iptables,ipset,nftables Sunny73Cr
2025-04-25  6:22 ` Florian Westphal
2025-04-25  7:46   ` Trailing dot in Cygwin filenames [was: failed to clone iptables,ipset,nftables] Jan Engelhardt
2025-04-28  9:38     ` Werner Koch [this message]
2025-04-25 11:17   ` Fail to clone iptables,ipset,nftables Sunny73Cr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sels7hhw.fsf@jacob.g10code.de \
    --to=wk@gnupg.org \
    --cc=Sunny73Cr@protonmail.com \
    --cc=ej@inai.de \
    --cc=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=oss-security@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.