Re: [PATCH] Speeding up FAT operations

Russell Lambert (russell@amdyne.net)
Tue, 22 Sep 1998 20:56:58 -0400


This may not mean much, but two years ago when I first started learning a
computer I was learning QBASIC. And I read a post somewhere of an error in
QBASIC that would allow you to make a space in the name that no other program
could read except another QBASIC program that opened it the same way. It was
something like the following... (I haven't touched it for over a year and a
half so it may not be completely accurate)

open "blah hi" as binary #1 (or something like this)
print #1, "jkfsdjlkfsdjkl"
close #1

Then you can open "blah hi" with the QBASIC program again.

The system never reported it as an error or anything, and it would show up as
a valid file when you did a DIR. In fact, when you got a directory listing,
it would show it with the space.

This was back when I was using DOS/Windows 3.1 so I know it wasn't a long
filename or anything. Sorry I can't remember exactly where I originally
found it, but just wanted to let you know that skipping a space check might
be dangerous. Some people were using that as a way to protect passwords and
things like that because only another QBASIC program could open it. (of
course, that was almost 2 years ago)

Russell

Jukka Tapani Santala wrote:

> On Mon, 21 Sep 1998, Gordon Chaffee wrote:
> > I'm somewhat leary of applying these patches this late in 2.1.x as we
> > are trying to get 2.2 out. There are some things that are clearly not
>
> Yep, I'm familiar with the problems, and expect no less. In fact I wrote
> much of those patches earlier last year, but I didn't then have any
> references available to point to, so I let them be. Since the bit about
> spaces not being allowed in filenames didn't hold, it does make the rest
> relatively questionable, too, and then you have to consider that even if
> something _currently_ doesn't break it, odds are next year they'll put
> out something that does. Oh well, but that kind of thinking is the way to
> paranoia ;)
>
> On the other hand, if there is interest in getting these into 2.2 (I
> consider the process-load effect significant, but not critical as most
> people don't use VFAT for anything important, nor do I see any real DoS
> opportunity etc.) and the 0-ending is the only major concern (or the
> others are like that), it's actually quite cheap source- and code-wise to
> slip in a check for the 0 since the character value is being handled
> already. However, I question a bit what is the meaning of ASCIIZ string
> in a place like this because there isn't space allocated for the ending
> zero in the fields, suggesting a need for padding. I guess they could use
> 0 for padding, though ;)
>
> -Donwulff
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu
> Please read the FAQ at http://www.tux.org/lkml/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/