mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Jones <chrisjones@spin.net.au>
To: linux-kernel@vger.kernel.org
Subject: Re: [BUG] NTFS code doesn't sanitize folder names sufficiently
Date: Fri, 27 Jul 2012 07:33:39 +1000	[thread overview]
Message-ID: <5011B7B3.3040907@spin.net.au> (raw)
In-Reply-To: <501189DA.4030709@enkore.de>

Marian Beermann wrote:
> Hello everyone,
>
> today I noticed some very odd behaviour, which could lead people to 
> believe a loss of data, because it is possible to create directories 
> with backslashes in them.
>
> I am currently running kernel 3.5.
>
> To completly reproduce the problem to the full extend you'll need a 
> Windows computer, but to see whats wrong Linux completly suffices :-)
>
> On a Linux computer
> 1. Create a directory named TestA on an NTFS partition
> 2. Create a subdirectory of TestA named TestB
> 3. Create a third directory alongside TestA named TestA\TestB (the 
> fundamental problem is this: backslashes in directory names)
>
> Connect the drive containing the NTFS partition now to a Windows 
> computer and navigate to the directory containing TestA and 
> TestA\TestB. If you navigate to the folder (not path!) TestA\TestB 
> you'll actually see the contents of the path TestA\TestB (the 
> subfolder TestB) and not the contents of the directory.
> It is not possible on a Windows machine to access the contents of the 
> directory named TestA\TestB. This is not a bug in Windows, it's caused 
> by a bug in the NTFS driver, which allows illegal characters.
>
> The solution to this would be to disallow creation of files and 
> folders on NTFS drives containing illegal characters.
>
> Best regards
> Marian Beermann

Yeah that's a tough one. I wouldn't exactly call it a bug. There's 
probably lots of stuff like this you could do that the command line 
would allow you to perform but not be a correct and intended function. I 
would put this down to user error rather than a bug. Anyone with 
knowledge of operating systems and file system structuring should know 
that / or \ are illegal characters for creating a directories. Whether 
it be on Windows or Linux.


Regards

-- 
		Chris Jones @ kernel.devproject@gmail.com
also on oracle.kerneldev@gmail.com and netbsd.kerneldev@gmail.com

OpenSUSE 12.1 (IceWM/zsh) (PC)|Android 4.0.3 (Smartphone)|Windows 7 (Laptop)|Windows XP (Gaming)
Linux kernel developer|Solaris kernel developer|BSD kernel developer
Lead Developer of SDL|Lead Developer of Nest Linux|Gamer and Emulator nut|Web Services|Digital Imaging Services
Controllers: Rapier V2 Gaming mouse|Logitech Precision|PS3 controller|XB360 controller|Logitech Attack 3 j/stick
Emulators: Fusion|Gens|ZSNES|Project64|PCSX-R|Stella|WinVICE|WinUAE|DOSBox

PGP Fingerprint: 4E38 0776 B380 63C8 F64F
A7D6 736C CF56 42A4 FB35


  reply	other threads:[~2012-07-26 21:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-26 18:18 Marian Beermann
2012-07-26 21:33 ` Chris Jones [this message]
2012-07-27 14:28 ` Calvin Walton
2012-08-01 23:16 ` Cody P Schafer

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=5011B7B3.3040907@spin.net.au \
    --to=chrisjones@spin.net.au \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome