uml: boot broken due to buffer overrun
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: NVikas K Managutte <vikki.km@gmail.com> Reported-by: NSarvesh Kumar Lal Das <skldas@gmail.com> Signed-off-by: NBalbir Singh <balbir@linux.vnet.ibm.com> Reviewed-by: NPekka Enberg <penberg@cs.helsinki.fi> Reviewed-by: NWANG Cong <wangcong@zeuux.org> Cc: Jeff Dike <jdike@addtoit.com> Cc: <stable@kernel.org> [please check with Jeff] Signed-off-by: NAndrew Morton <akpm@linux-foundation.org> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
Showing
想要评论请 注册 或 登录