Re: 2.6.0-mm1 - kernel panic (VFS bug?)

From: Libor Vanek
Date: Tue Jan 06 2004 - 07:39:27 EST


Andi Kleen wrote:

Libor Vanek <libor@xxxxxxxx> writes:


...
asmlinkage long sys_open(const char __user * filename, int flags, int mode)
{
char * tmp;
int fd, error;
char tmp_path[PATH_MAX],tmp2_path[PATH_MAX];


PATH_MAX is 4096. The i386 stack is only 6k. You already overflowed it.
You're lucky if your machine only panics, much worse things can happen
with kernel stack overflows.


OK - what's correct implementation? Do a "char * tmp_path" and kmalloc it?


--

Libor Vanek





-
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/