]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
uml: boot broken due to buffer overrun
authorBalbir Singh <balbir@linux.vnet.ibm.com>
Tue, 9 Dec 2008 21:14:07 +0000 (13:14 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 13 Dec 2008 23:29:33 +0000 (15:29 -0800)
commitcb01c9ddcbb5a1c8049bacf1f145b402f0ce3a0a
treeb39a500a4e4964399316610026bdaff492928c0b
parent146f29f9da1334541858f1d89ae6b3ffeb33df45
uml: boot broken due to buffer overrun

commit 361371201b60ffd686a694c848c1d5ad6061725f upstream.

mconsole_init() passed 256 bytes as length in os_create_unix_socket, while
the sizeof UNIX_PATH_MAX is 108. This patch fixes that problem and avoids
a big overrun bug reported on UML bootup.

sockaddr_un.sun_path is UNIX_PATH_MAX long which causes the problem.
Reported-by: Vikas K Managutte <vikki.km@gmail.com>
Reported-by: Sarvesh Kumar Lal Das <skldas@gmail.com>
Signed-off-by: Balbir Singh <balbir@linux.vnet.ibm.com>
Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi>
Reviewed-by: WANG Cong <wangcong@zeuux.org>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/um/drivers/mconsole_kern.c