From nobody Sun Jul 24 21:15:07 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4LrbY74fNHz4XZQ3; Sun, 24 Jul 2022 21:15:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LrbY741hNz3mZC; Sun, 24 Jul 2022 21:15:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658697307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BClYh6QYO6VFYXw7Rp6PkbCS23KeMPEN6oqxeL5JLVo=; b=Xdr0UEJ3nXFs04EsFGABk4ELwmtpiyhKXRTvSOjtl8ZxdSUFZGIEx3KVWYilitAytp9vr0 IAwunAfuy6hULvPWuu175h4JvnF31TAgi+ZDw8Zy5MngWYj4n7fHvCUS/a09OVuM6bzqvd ljrglyiM0DvOgoe2m4qQcR86wMh88b6vRoa0g2iDfQdOIL4FuY7ky4dQTxNyxGkx/4aftc bZcMbejOwN03EhBNt+VBMV9Uhd9udjwHYUMWAfe0Wip3sZn3NKAYtSvG71VxkBOdOXGCZr uY6+oMzzq0DF5BpKw4zty6go09D2EYJcemIEIiYTpjFx5i/TJeV0S/+9DliYrw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4LrbY734VqzYHX; Sun, 24 Jul 2022 21:15:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 26OLF7Ar068992; Sun, 24 Jul 2022 21:15:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26OLF7x6068991; Sun, 24 Jul 2022 21:15:07 GMT (envelope-from git) Date: Sun, 24 Jul 2022 21:15:07 GMT Message-Id: <202207242115.26OLF7x6068991@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: =?utf-8?Q?Stefan=20E=C3=9Fer?= Subject: git: 116e5db78706 - main - emulators/wine: Fix crash due to ASLR List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 116e5db787062c008379e8cd22b8896dd02ef758 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658697307; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BClYh6QYO6VFYXw7Rp6PkbCS23KeMPEN6oqxeL5JLVo=; b=E9U95pxyvQYXCTS2eMcS79NabqKmki0R+bKaFuZBwMLvz87tUF2AE0M7E2I85sbejU8Tc/ zPEi9FOUpZzMZL74l5Fu0ZeGmMFqSQ+YC4tm1Lf6RfVXzNAGbqWwfkmk6GWu70LsTsEMyZ 12SWOIwaxCkVyqcf/mziaVmsoc/rFbTh8G9ZzYrcoqfcFi1f8X1U3M+qLvYBf1KZTQft6R NKH03zhX/5Q0OpE8HhKzFyHBCFOjDaW7MRHttYgAZJCch4DZAuLUPbb2cDU0o3YxnW/ZHW HQVsMp/BBPhMO0Vg8CMVYOCIiLccHRMxnek5s5cV0H0HxMjcGTKZJaxKEZH9wA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658697307; a=rsa-sha256; cv=none; b=a1u81aA7vwhZzS+7eLKT2smss7wO+z/rz412arFl/fxVq+bLMdJabFEm0KUKvUvuqu6Gyw 3UR/WpbC9FZjs3W+j/cjlTUeJhmO9olY5ecC5fByENRphfKRtkk7M13r6FUvoQoarfoiKo hjOl8n2SW2XHy5BuZmo+K849w6yznBd8bdN3suzvB9jFlx5iQJheJvP8BqWqUXWGctBdZD 5MESTxzv4OHFeM088POohtvNOWERuLW3EVcLwm5njd1i1yhiN62KJ6XolYTJuZft4HvXpi 89LbrCcII0pHfCJWjLBDHJTEAh2m6Ke03dPsWU3RvhSual3q9s8tg0s7WbXiEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by se: URL: https://cgit.FreeBSD.org/ports/commit/?id=116e5db787062c008379e8cd22b8896dd02ef758 commit 116e5db787062c008379e8cd22b8896dd02ef758 Author: Stefan Eßer AuthorDate: 2022-07-24 21:05:50 +0000 Commit: Stefan Eßer CommitDate: 2022-07-24 21:13:13 +0000 emulators/wine: Fix crash due to ASLR ASLR has been enabled by default on -CURRENT and -STABLE and this causes Wine to crash. The clean solution would be to implement some memory mapping code that already exists for macOS and Linux, but this is not an essy task. In order to allow use of Wine on systems with ASLR mark the Wine executables as not compatible with ASLR using elfctl. This allows to keeps ASLR enabled on the system for all other binaries. If the required memory mapping functionality is made available, the elfctl commands should be removed from this and the other Wine ports. Approved by: portmgr (implicit) --- emulators/wine/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/emulators/wine/Makefile b/emulators/wine/Makefile index ca3084b3c4a9..880575b6029a 100644 --- a/emulators/wine/Makefile +++ b/emulators/wine/Makefile @@ -1,5 +1,6 @@ PORTNAME= wine DISTVERSION= 6.0.4 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= emulators MASTER_SITES= SF/${PORTNAME}/Source \ @@ -158,9 +159,11 @@ post-install: .if ${ARCH} == i386 ${MV} ${STAGEDIR}${PREFIX}/bin/wineserver ${STAGEDIR}${PREFIX}/bin/wineserver32 ${MV} ${STAGEDIR}${PREFIX}/bin/wine ${STAGEDIR}${PREFIX}/bin/wine.bin + -${ELFCTL} -e +noaslr ${STAGEDIR}${PREFIX}/bin/wine.bin ${INSTALL_SCRIPT} ${FILESDIR}/wine.sh ${STAGEDIR}${PREFIX}/bin/wine .else ${MV} ${STAGEDIR}${PREFIX}/bin/wine64 ${STAGEDIR}${PREFIX}/bin/wine64.bin + -${ELFCTL} -e +noaslr ${STAGEDIR}${PREFIX}/bin/wine64.bin ${INSTALL_SCRIPT} ${FILESDIR}/wine.sh ${STAGEDIR}${PREFIX}/bin/wine64 ${INSTALL_SCRIPT} ${FILESDIR}/wine-wow64.sh ${STAGEDIR}${PREFIX}/bin/wine ${INSTALL_SCRIPT} ${FILESDIR}/pkg32.sh ${STAGEDIR}${DATADIR}/pkg32.sh