Date: Mon, 13 May 2019 17:49:02 +0000 From: bugzilla-noreply@freebsd.org To: emulation@FreeBSD.org Subject: [Bug 232920] linuxulator: linux_to_bsd_sockaddr and bsd_to_linux_sockaddr are unsafe Message-ID: <bug-232920-4077-LrofjLT6Uc@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-232920-4077@https.bugs.freebsd.org/bugzilla/> References: <bug-232920-4077@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D232920 --- Comment #2 from commit-hook@freebsd.org --- A commit references this bug: Author: dchagin Date: Mon May 13 17:48:17 UTC 2019 New revision: 347533 URL: https://svnweb.freebsd.org/changeset/base/347533 Log: Our bsd_to_linux_sockaddr() and linux_to_bsd_sockaddr() functions alter the userspace sockaddr to convert the format between linux and BSD versions. That's the minimum 3 of copyin/copyout operations for one syscall. Also some syscall uses linux_sa_put() and linux_getsockaddr() when load sockaddr to userspace or from userspace accordingly. To avoid this chaos, especially converting sockaddr in the userspace, rewrite these 4 functions to convert sockaddr only in kernel and leave only 2 of this functions. Also in order to reduce duplication between MD parts of the Linuxulator p= ut struct sockaddr conversion functions that are MI out into linux_common module. PR: 232920 MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D20157 Changes: head/sys/compat/linux/linux.c head/sys/compat/linux/linux.h head/sys/compat/linux/linux_common.h head/sys/compat/linux/linux_socket.c head/sys/compat/linux/linux_socket.h head/sys/modules/linux_common/Makefile --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-232920-4077-LrofjLT6Uc>