From nobody Thu Oct 26 11:00:36 2023 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 4SGNBD2dplz4xfXv; Thu, 26 Oct 2023 11:00:36 +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 4SGNBD20pbz3THj; Thu, 26 Oct 2023 11:00:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698318036; 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=CcW+ABiDVaN6dnyAc281yVqPfJXlW1uq72U1MBTiSEc=; b=nNcPb8RhpJWWyo16YumY/U5pnETQH7rJ7NklQzJBJsRCOvo6X1mlw2QQSL2BVip4uFtZgy cg6D3q/UvL3OYfxvMrJMW93ZhUzKZqSxiZCUjERhBoGaoUZbMI64L2+LTNsORNHH5+9Ycl ZszZU/b1IraLyu8kQEle1kxZKt/B/1zvfUV1EaY9I8bRJy9lQKsmLmiR7MlxiHuhnNDvRS dkyvdIwt9BYwqffvr1cUdZ4nP8Pw54cMaF8y5pMEuICIPvPAusMngPhcw0TMao2pdEScwd Wgds4rkNn4zLZbm3bq1SymsshhjKlkGgy9/hglEpXYnOBgdh8i+M2JF1/dfNtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698318036; 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=CcW+ABiDVaN6dnyAc281yVqPfJXlW1uq72U1MBTiSEc=; b=M5vxltjGbI8r021UFAUC4zJgn2FShMTS/5I/ZQ3n1syztoRKcRFjPEXN156bAuRMDpSRbj 1SNUMGCxFpWn/qVe/ck3EKC5tg7AHWjebd3sWzIsS5UBHfsm/0U8n+CBueV7tSETH7F8sm Jm5Wr9I8mGnI5a9gxmF6UNp0M1vr+o1ivcP9IaEt6UFk0EAB/zIujymJSitF1fax6fazmA ST0Ro42RKCUxKVRDmE7g6hnPvqa5uoBOHKlIJqsCqTvYlht819j6oL6yDTRgEwZZ/GstVo pJUrFvKPdtFRzrCmjEOJx9/7Vfv7y3EujDRMVEMOxyRjXsKddlrvbz6C+8vLSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698318036; a=rsa-sha256; cv=none; b=W4AtOgxeknoTZiw/diFzFfnvx9t7NTJfWHrluBPDmAjlBOu4CYYQCM7wQUYBghT35/ZeSw T9t+HRXwKccCI34J4+WpzShVSpC6fvHlTucIrrkc5s6UMNA/aOgQNpljADYxKBAU1leelr VIPZ/tbcmIyvXaCQUMAeUWVDf7V4Fo+9yT4N5PzGnWuw/+20fqCYnh5IAyYeaKtL3/Jypu JoJfq74HF1CLiWzvwKcXphD+xNmPQ8vlkRN9uA2kkLxCnKCOUamwSTa0wpninvEP4xOIGt 7a/Ur8jWJE+noeeUS94RUJ5wkrmuejDK16qPNhdBkJlr0l6wdRySFACNIUp0VQ== 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 4SGNBD1374zDQl; Thu, 26 Oct 2023 11:00:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39QB0axW030627; Thu, 26 Oct 2023 11:00:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39QB0ag2030624; Thu, 26 Oct 2023 11:00:36 GMT (envelope-from git) Date: Thu, 26 Oct 2023 11:00:36 GMT Message-Id: <202310261100.39QB0ag2030624@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Vladimir Druzenko Subject: git: 688bfd0c3835 - main - www/apache24: workaround for bug "opcache + ASLR turned on crashes Apache if used www/mod_php8{0,1,2,3}" 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: vvd X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 688bfd0c38351f28306d7bca5a8ceb280bee53d9 Auto-Submitted: auto-generated The branch main has been updated by vvd: URL: https://cgit.FreeBSD.org/ports/commit/?id=688bfd0c38351f28306d7bca5a8ceb280bee53d9 commit 688bfd0c38351f28306d7bca5a8ceb280bee53d9 Author: Vladimir Druzenko AuthorDate: 2023-10-26 10:55:24 +0000 Commit: Vladimir Druzenko CommitDate: 2023-10-26 10:55:24 +0000 www/apache24: workaround for bug "opcache + ASLR turned on crashes Apache if used www/mod_php8{0,1,2,3}" PR: 268318 Approved by: joneum (apache@), tcberner (mentor) MFH: 2023Q4 --- www/apache24/Makefile | 1 + www/apache24/files/apache24.in | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/www/apache24/Makefile b/www/apache24/Makefile index d6ef3d1fb496..f82c2f351055 100644 --- a/www/apache24/Makefile +++ b/www/apache24/Makefile @@ -1,5 +1,6 @@ PORTNAME= apache24 PORTVERSION= 2.4.58 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= APACHE_HTTPD DISTNAME= httpd-${PORTVERSION} diff --git a/www/apache24/files/apache24.in b/www/apache24/files/apache24.in index a6693381211b..0b9c4bd55ba6 100644 --- a/www/apache24/files/apache24.in +++ b/www/apache24/files/apache24.in @@ -22,6 +22,8 @@ # module on start up and load if not loaded. # apache24_fib (str): Set an altered default network view for apache # apache24_configcheck_disable (bool): Set to "YES" to disable sanity check on startup +# apache24_aslr_disable (bool): Set to "YES" to disable ASLR (Address Space Layout +# Randomization): workaround for PR#268318 . /etc/rc.subr @@ -46,6 +48,7 @@ envvars="%%PREFIX%%/sbin/envvars" [ -z "$apache24limits_args" ] && apache24limits_args="-e -C daemon" [ -z "$apache24_http_accept_enable" ] && apache24_http_accept_enable="NO" [ -z "$apache24_configcheck_disable" ] && apache24_configcheck_disable="NO" +[ -z "$apache24_aslr_disable" ] && apache24_aslr_disable="NO" apache24_accf() { @@ -76,6 +79,7 @@ if [ -n "$2" ]; then eval apache24limits_args="\${apache24limits_${profile}_args:-${apache24limits_args}}" eval apache24_fib="\${apache24_${profile}_fib:-${apache24_fib}}" eval apache24_configcheck_disable="\${apache24_${profile}_configcheck_disable:-${apache24_configcheck_disable}}" + eval apache24_aslr_disable="\${apache24_${profile}_aslr_disable:-${apache24_aslr_disable}}" eval command="\${apache24_${profile}_command:-${command}}" eval pidfile="\${apache24_${profile}_pidfile:-${pidfile}}" eval apache24_envvars="\${apache24_${profile}_envvars:-${envvars}}" @@ -189,6 +193,13 @@ apache24_precmd() } +apache24_checkalsr () { + if checkyesno apache24_aslr_disable + then + command="/usr/bin/proccontrol -m aslr -s disable ${command}" + fi +} + apache24_checkfib () { if command -v check_namevarlist > /dev/null 2>&1; then check_namevarlist fib && return 0 @@ -206,6 +217,7 @@ apache24_checkfib () { } apache24_prestart() { + apache24_checkalsr apache24_checkfib apache24_precmd }