From owner-cvs-src@FreeBSD.ORG Sat Dec 2 14:56:26 2006 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 81EF816A40F; Sat, 2 Dec 2006 14:56:26 +0000 (UTC) (envelope-from netchild@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E28E43CA2; Sat, 2 Dec 2006 14:56:05 +0000 (GMT) (envelope-from netchild@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kB2EuQIG063109; Sat, 2 Dec 2006 14:56:26 GMT (envelope-from netchild@repoman.freebsd.org) Received: (from netchild@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kB2EuQvS063108; Sat, 2 Dec 2006 14:56:26 GMT (envelope-from netchild) Message-Id: <200612021456.kB2EuQvS063108@repoman.freebsd.org> From: Alexander Leidinger Date: Sat, 2 Dec 2006 14:56:26 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/compat/linux linux_misc.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Dec 2006 14:56:26 -0000 netchild 2006-12-02 14:56:26 UTC FreeBSD src repository Modified files: sys/compat/linux linux_misc.c Log: MFP4 (108673, 110519, 110874): - Currently LINUX_MAX_COMM_LEN is smaller than MAXCOMLEN, but in case this will change we have a buffer overflow. Apply some defensive programming to DTRT when this should happen. - Use copyinstr() instead of copyin where appropriate. * Fallback to copyin() in case of ENAMETOOLONG. [1] * Use the right source and destination (it was wrong before). - Use strlcpy instead of strcpy. - Properly lock the read case (PR_GET_NAME) like the write case. Reviewed by: rwatson (except [1]) Suggested by: rwatson [1] Revision Changes Path 1.198 +30 -5 src/sys/compat/linux/linux_misc.c