Re: JFS default behavior (was: UTF-8 in file systems? xfs/extfs/etc.)

From: Jamie Lokier
Date: Fri Feb 13 2004 - 15:29:56 EST


viro@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx wrote:
> You try and pass something _without_ \0 in it to the kernel ;-)

:)

But seriously, even that is a security issue when someone requests a
URL containing "%00", or some text contains a filename to operate on
and the name contains \0.

For example, if I write a Perl regular expression to reject paths from
the outside world containing "..": m{(?:/|^)\.\.(?:/|\z)}, it will
fail to notice when given the path "..\0" that the kernel will treat
it identically to "..". Potential security hole, depending on the context.

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