php74
Build times (auto-updated)
- any: 10m35s (2026-10-21 15:42 UTC, MAKEFLAGS=-j6)
- i686: 29m4s (2026-10-21 16:50 UTC, MAKEFLAGS=-j6)
- armv7h: 2h9m (2026-11-20 13:06 UTC, remote, MAKEFLAGS=-j4)
- aarch64: 45m22s (2026-11-20 15:39 UTC, remote, MAKEFLAGS=-j4)
- x86_64: 19m51s (2026-11-30 17:11 UTC, MAKEFLAGS=-j6)
Category: adapted (moved from local-install/ 2026-10-21, see below — was
previously “rebuilt only so archlinuxaba/the cluster gets it too; not
maintained/adapted/owned by us”).
Split package (dozens of subpackages: php74-cli, php74-fpm, php74-gd,
etc.) generated by the upstream arch-phpbs tool. Needed by php74-apcu and
owncloud.
2026-11-19/20: November CVE batch + OpenSSL 4.x breakage, pkgrel 11.3 -> 11.7
Eight CVE backports from PHP’s 2026-11-19 security release (18 CVEs
total; PHP upstream published no 7.4 backport this round, unlike October’s
PHP-7.4-CVE-2026-109618-109619 branch). Remi’s php74.spec has a
cumulative php-from-8.2.36-to-7.4.patch covering 14 of them, but it is
NOT standalone – his spec carries 65 patches applied in sequence
against his own Fedora-patched tree, and applying just the tail against
our pristine 7.4.33 fails with real (non-cosmetic) hunk rejects in
main/rfc1867.c, ext/mysqlnd/* and ext/standard/http_fopen_wrapper.c.
So each fix was extracted by hand from the upstream PHP-8.2.35..8.2.36
diff and adapted, verified applying cleanly in sequence on a pristine
tarball (all 21 patches, zero fuzz):
php74-cve-2026-126714.patch– session files RCE (“phpAfterShell”, CVSS 9.2).ext/session/mod_files.c: unconditionalftruncate(fd,0)before writing, failing the write if it fails, instead of only truncating when the new data is shorter.php74-cve-2026-129289.patch– PHP-FPM request smuggling (CVSS 9.2).main/fastcgi.c: bail out offcgi_read_request()ifin_len != 0, and clearin_leninfcgi_close()so a partially-read STDIN record can’t outlive its connection.php74-cve-2026-129291.patch– FPM epoll UAF -> LPE.sapi/fpm/fpm/fpm_children.c:fpm_event_del()+fd = -1after close.php74-cve-2026-129292.patch– FPM status-page XSS. Rewritten, not ported: 7.4’sfpm_status.cis far older than 8.2’s (no JSON mode, and onlyquery_stringwas ever escaped – not evenrequest_uri), so the upstream diff rejects. Factored 7.4’s own existingphp_escape_html_entities_exidiom into a localfpm_status_escape()helper and applied it to all five fields (request_method,request_uri,query_string,auth_user,script_filename).php74-cve-2026-128090.patch– PHAR OpenSSL signature downgrade.ext/phar/util.c: refuse non-OpenSSL signature types when a<phar>.pubkeyexists. Used 7.4’szend_bool/singlePHAR_SIG_OPENSSL(8.2’sbooland SHA256/SHA512 variants don’t exist here).php74-cve-2026-15353.patch– SOAP array-dimension info disclosure.ext/soap/php_encoding.c:return i != 0 ? i : 1.php74-cve-2026-129506.patch– SOAP DTD entity UAF.ext/soap/php_xml.c: skipXML_DTD_NODEduring cleanup.- (plus October’s
php74-cve-2026-109618-109619.patch, unchanged)
Not backported: CVE-2026-129496 (timezone cache UAF) – the only
ext/date changes in the 8.2.35..8.2.36 diff are test files, so the real
fix lives elsewhere (bundled timelib or a different commit range) and
would need separate digging. CVE-2026-129538 (php-cgi PATH_INFO OOB),
CVE-2026-115560, CVE-2026-128064, CVE-2026-127960, CVE-2024-11235
also not yet done.
The real blocker was NOT the CVE patches: OpenSSL 4.x
Arch’s openssl went to 4.1.0-1, and PHP 7.4’s own ext/openssl
cannot compile against it: php_openssl.h:78: error: 'ERR_NUM_ERRORS'
undeclared. 7.4 only branches on < 0x10100000L – it targets the
1.0.2/1.1.x API. This is why 11.2/11.3 built fine on 2026-10-21/22 and
nothing built on 2026-11-19: a pure environment regression, same class as
the libjxl/ffmpeg7.1 breakage the same day.
Fix (11.7): export PKG_CONFIG_PATH=/usr/lib/openssl-3/pkgconfig in
build(), plus openssl -> openssl-3 in makedepends and the four
_ext_depends_* arrays that named it. openssl-3 (3.5.9-2) is an
official core package – no local maintenance, already installed on
euronuc and both ARM boards – has ERR_NUM_ERRORS, TLS 1.3, and ships
.pc files. Chosen over openssl-1.1 (would also work, 1.1.1w) and
openssl-1.0 (works but no TLS 1.3 – 1.3 arrived in 1.1.1, so that
would have been a security regression inside a security update).
Two failed attempts first, both worth remembering:
- A global
CPPFLAGS/LDFLAGSoverride pointing atopenssl-1.0was wrong twice over: it redirects all seven of php74’s OpenSSL consumers (openssl,curl,snmp,ldap,pgsql,mysqli,imap), not just IMAP – and it silently didn’t even take effect, becauseconfigureemits its own-L/usr/lib(from--with-imap=shared,/usr) ahead of appendedLDFLAGS. Confirmed by reading the failing link line inconfig.log. Seememory/TOOLING_NOTES.md’s entry. UsePKG_CONFIG_PATHfor this, not flag appending – it feeds PHP’s ownPKG_CHECK_MODULESand is naturally scoped (curl/libxml2 resolve their own modules from the default path). - Before finding the
ext/opensslproblem, the visible failure was an IMAP link error fromc-clientcalling the removedTLSv1_{client,server}_method(). That got its own real fix (seememory/c-client.md, nowadapted/c-client21.2) – but it turned out not to be on the critical path, sinceopenssl-3still exports those symbols anyway.
Published 11.7 (2026-11-20)
x86_64 61 packages (incl. php74-debug), armv7h 60, aarch64 60
– the missing one on ARM is just php74-debug, which only the x86_64
chroot produces (ARM’s native makepkg -s has no gdb-add-index step,
same as documented for cpuburn). i686/pentium4 deliberately not built
(user scoped this session to x86_64/armv7h/aarch64). make test failures
in the logs are the tolerated check() phase (make test || :).
Do not mistake php74’s slow ARM startup for a hang – see
memory/TOOLING_NOTES.md; two attempts were killed prematurely before
this succeeded.
ARM coverage added (2026-10-22)
Added armv7h/aarch64 to arch=() (now ('x86_64' 'i686' 'pentium4'
'armv7h' 'aarch64')), pkgrel 11.2 -> 11.3. Patch is portable:
checked the one SIMD-looking hunk in the CVE patch (zend_types.h’s
HT_HASH_RESET) and confirmed it’s entirely inside the pre-existing
#ifdef __SSE2__ branch – ARM uses the untouched generic fallback at
line ~346, so the patch is a no-op there, not a portability risk.
Board-lock collision hit once: launched php74’s ARM build while php85’s
was still running on the same two boards (eurobuild5/14) – failed
closed exactly as designed (ERROR: eurobuild5 is already building
something else), no corruption. Force-killed the blocked php74 attempt
(bottom-up SIGTERM through the ssh/oksh chain) to retry sooner rather
than wait out php85’s run; had to manually clear both the local
.building.lock (trap didn’t fire cleanly under the kill) and
eurobuild5’s remote lock (ssh eurobuild5 rm -rf
/data/INSTALL/.building.lock) before relaunching – confirms
remote_build_lock’s documented no-auto-expire behavior.
New test failure on armv7h only, NOT seen on x86_64/i686/aarch64:
Zend/tests/concat_003.phpt (“Concatenating many small strings should
not slowdown allocations”) – a hardcoded wall-clock perf test
(220,000 string concats must finish in under $t_max = 1.0 seconds).
Confirmed by reading the test file directly: pure CPU-speed timing
threshold, nothing to do with the CVE patch or correctness – armv7h is
just slow enough to blow a 1-second budget tuned for x86 hardware. Not
a regression, not patch-related; aarch64 (faster ARM board) didn’t
hit it. Only [[php74]]’s existing bug45392 duplicate-error-message
cosmetic regression (see CVE section below) was common to all four
arches. Per the user: test failures don’t block publishing (matches
the existing x86_64/i686 precedent – repo_build.sh’s make test
failure doesn’t abort packaging).
CVE-2026-109618 / CVE-2026-109619 backport (2026-10-21)
PHP disclosed and patched two critical (CVSS 9.2) unauthenticated RCE flaws
today, nicknamed “php2shell”: memory-exhaustion-triggered state corruption
during a bailout (109618) and a related use-after-free of request-owned
global state surviving into the next request on the same worker (109619).
Root cause is in multipart/file-upload handling (main/rfc1867.c) interacting
with Zend’s bailout/cleanup path. Official fixes shipped in PHP 8.5.12 /
8.4.27 / 8.3.36 / 8.2.35 same day; the PHP project explicitly will not patch
8.1 or earlier (EOL).
7.4 (our version, 7.4.33) is affected too – confirmed via HeroDevs’
vulnerability directory, which lists 7.4/8.0/8.1 explicitly. Found an actual
upstream-authored backport: php/php-src branch
PHP-7.4-CVE-2026-109618-109619, a single commit (712e60f, “Avoid state
corruption via bailout – Minimal mitigation for EOL version”) by Zend-engine
core devs arnaud-lb and iluuu1994, branched exactly off our 7.4.33
base. 17 files, ~240/-59 lines (Zend/zend_alloc.c, zend_vm_execute.h,
zend_hash.c, main/rfc1867.c, php_variables.c, SAPI.c, etc.).
- Applied as a standalone patch file,
php74-cve-2026-109618-109619.patch, added to bothsource=()and_patches=()(the latter is what actually gets looped over withpatch -p1inprepare()– adding tosource=()alone does nothing). Dry-run verified it applies cleanly to a pristine 7.4.33 extraction before wiring it in. pkgrel11.1->11.2(packaging-only deviation, no pkgver change – per the user, upstream AUR will presumably patch this properly eventually, so keep this a local pkgrel bump, not a fork of pkgver).- Category migration, not just a patch: this is now a real local
deviation (a patch, not an unmodified upstream copy), so per
feedback_local_adaptions_go_in_adaptedit no longer belongs inlocal-install/– moved toarch/adapted/php74/, removed thelocal-install/php74line fromscripts/install_only_packages, added an entry toarch/adapted/README. The pre-existing, already-uncommitted working-tree state in/data/INSTALL/php74(thearch=()andlibtifffixes from the 2026-08-19 session, pkgrel 11.1) was carried forward into this migration, not discarded. - ABI check: the patch’s only
zend_types.hchange is inside theHT_HASH_RESETmacro body (adds asize < 64branch before the existing SIMD path) – no struct field added/reordered, so_zend_arraysize/layout is unchanged. Extensions (php74-apcu,php74-redis,php74-igbinary) should remain ABI-compatible without a forced rebuild, though rebuilding them against the patched core eventually wouldn’t hurt. - Known side effect, found via the test suite:
tests/lang/bug45392.phpt(“ob_start()/ob_end_clean()andmemory_limit”) now FAILS on both x86_64 and i686 (passed pre-patch at11.1– confirmed against the oldphp74-7.4.33-11.1-i686-check.log). Root-caused by hand: built a CLI binary from this exact patched build and ran the test’s script directly with stdout/stderr separated. The actual fatal-error mechanism still works correctly (OOM duringob_start()-buffered output still raises “Allowed memory size of N bytes exhausted” as expected) – but the message is now written to stderr twice (PHP Fatal error: ...then a second, unprefixedFatal error: ...), where pre-patch it apparently only fired once. Consistent with the patch’s own description (“Replace bailout on OOM with UnwindExit”) – the old abruptlongjmpbailout likely cut execution off before a second reporting call site could run; the new, safer unwind lets both fire. Cosmetic/log-noise only: nothing leaks to the HTTP response body, no crash, no incorrect value – just a duplicated line in the error log for this one OOM+output-buffering interaction. Only failing test out of 3671. Flagged to the user as a known, accepted trade-off rather than something that blocked the build – revisit if it turns out to matter in practice (e.g. doubled alerting/log volume on an app that hitsmemory_limitunderob_start()a lot). arch/adapted/php74is untracked in git as of this writing – per policy Claude never runsgit add/git commititself (feedback_never_git_commit_or_push); the user needs togit add adapted/php74 scripts/install_only_packages adapted/README(and the arch/ submodule pointer update, if any) themselves, orcleanup_all.sh’sgit clean -fdonadapted/will delete it (feedback_adapted_needs_git_add_immediately).
Build notes (2026-08-19)
arch=("$CARCH")doesn’t work with our tooling. Upstream ships a dynamic self-resolvingarch=()(anarch-phpbsgenerator trick, presumably meant for a build wrapper that re-invokes makepkg per target arch).repo_build.shparsesarch=(...)as literal text from the PKGBUILD file (sed -n 's/^arch=(\(.*\))$/\1/p'), so it read the literal string$CARCH– not a real arch – and would have built nothing. Fixed by replacing it with a real literal array,arch=('x86_64' 'i686' 'pentium4').- Missing dependency:
c-client. A hardmakedepends(needed for theimapextension) that wasn’t available anywhere – not in official repos, not previously published to archlinuxaba, only on AUR. Built and published it first (seememory/c-client.md). - Missing
libtiffmakedepend, only surfaced on 32-bit. Thegdextension’sconfigurecheck failed withPackage 'libtiff-4', required by 'gdlib', not foundon i686/pentium4 (not x86_64) – archlinux32’sgdbuild apparently still links against libtiff where the current x86_64gddoesn’t declare it ingdlib.pc. Fixed by addinglibtifftomakedependsexplicitly. - pentium4 fails, GD symbols unlinkable. After the libtiff fix, pentium4’s
configuregot past thegdlib >= 2.1.0check but then failed to link any basic GD symbol (gdImageCreateetc. all report “no” from the-lgdlink test), withconfigure: error: GD build test failed. i686 (same gd package family) does NOT hit this – pentium4-chroot-specific. Not root-caused further; leftpentium4inarch=()per explicit user instruction (build/publish what works, don’t keep chasing it) – pentium4 will just showFAILEDon every rebuild and get skipped, whichrepo_build.shtolerates fine as long as other arches succeed. - Self-inflicted stale-publish incident: a leftover, already-built
pkgrel=11artifact set (predating this session, before thearch=()/libtifffixes bumpedpkgrelto11.1) was still sitting in the pkgdir on the first successful build attempt. Both the correct11.1and the stale11x86_64 packages got uploaded in the same run, and sincerepo-addis keyed by pkgname (last write wins, not highest version), the stale11ended up live, clobbering the fix. Caught by checking upload order in the log (grep -n "php74-cli-7.4.33-11") after the fact. Fixed with a second clean rebuild (pkgdir was already swept of old artifacts byrepo_build.sh’s own untracked-file cleanup by then, so the retry only ever produced11.1files). Lesson: always check for and clean stale.pkg.tar.zstartifacts in a package’s dir before the first build of a session, not just when something looks wrong after the fact – a stale artifact can silently outrace a correct one throughrepo_publish.shif pkgrel bumps didn’t fully clear the old file first. pkgrel"11"->"11.1"(local-install, X.Y scheme; note this PKGBUILD holdspkgrelas a quoted string, not a bare integer – quoting still works fine with the X.Y scheme).- End state: x86_64 and i686 publish cleanly (122 packages each: ~61 subpackages
x {package, debug} roughly). pentium4 excluded (in
arch=()but always fails, tolerated).
2026-11-30: merged our fork onto upstream 23 – openssl-3 hack dropped, 7 CVE patches kept. 23.1, x86_64
Asked to “rebuild php74 on all architecture”, then to check AUR for CVE/OpenSSL4
updates. Checking live changed the whole task: upstream had moved 11 -> 23,
with 2026-11-30 "Openssl v4 support" (that same day) and
2026-10-30 "CVE patches 2026 included". A plain rebuild of our 11.7 fork
would have shipped something 12 pkgrels stale.
But upstream was NOT a superset – this is the important part. Patch inventory at the time:
| our 11.7 | upstream 23 | |
|---|---|---|
| CVE patches | 8 | 1 (109618-109619 only) |
| OpenSSL 4 | our own openssl-3 compat hack |
proper fix: php70-openssl-length.patch + php71-openssl-buffer-constants.patch |
So blindly adopting upstream 23 would have silently dropped 7 CVE patches
(126714, 128090, 129289, 129291, 129292, 129506, 15353) – a
security regression. Neither side was a superset; the answer was a merge, and
the user chose that.
Method that made this safe: diff against the fork point, not against
current. Found upstream’s 7.4.33-11 commit (2429cd8, 2025-12-20),
diffed our PKGBUILD against that to enumerate our real delta, then replayed
only the still-relevant parts onto 23. Generalises to any drifted fork here –
see [[feedback_diff_against_upstream_before_chasing_deps]].
Our deviations, and their verdicts:
- 7 extra CVE patches – KEPT (upstream lacks them).
libtiffin makedepends – KEPT; upstream still doesn’t have it, and gd’sgdlib.pcdoesn’t declare it (the 2026-08-19 i686/pentium4 finding).- literal
arch=()array – KEPT, see the trap below. - openssl-3 compat hack (
_openssl_pkgcase block, 6 dependency substitutions, thePKG_CONFIG_PATH=/usr/lib/openssl-3/pkgconfigexport) – DROPPED, superseded by upstream’s two real patches. Confirmed in the published result:php74-opensslandphp74-ftpnow depend on plainopenssl, and the two patches appear 8x in the build log. make test || :– DROPPED; upstream made the identical change itself.
pkgrel = 23.1 (X=23 is upstream’s current, so the “X never exceeds
upstream’s pkgrel” rule holds). Old 11.7 PKGBUILD kept at
scratchpad/PKGBUILD.ours-11.7 during the work so reverting the openssl
decision would have been a copy, not a reconstruction.
TRAP: upstream’s empty arch=() silently kills every ARM build
Upstream 23 carries an empty arch=() block (just before _patches=) in
addition to its real arch=("$CARCH") later. repo_build.sh extracts the arch
list with an awk that matches the first /^arch=\(/ and then exits – so
that empty block becomes the arch list, repo_build.sh falls into its
“any”/x86_64-only path, and every real per-arch build including all remote
ARM ones is skipped with no error at all. That is exactly the failure its own
inline comment documents from 2026-09-21, and why our earlier fork had deleted
the block. Delete it again on every future resync from upstream, and verify
with:
awk '/^arch=\(/{...}' PKGBUILD – it must print
x86_64 i686 pentium4 armv7h aarch64, not nothing.
State after this session
- x86_64: published 23.1 (61 packages, 122 files with sigs; 22 min; no 11.7 remnants).
- i686: still 11.2 on the repo – an 11.7 i686 build was started before the upstream discovery and deliberately killed (0 uploads, nothing partial published, stale staging lock cleared). It needs a 23.1 build.
- pentium4: still absent – the documented permanent GD-link failure, do not chase.
- armv7h/aarch64: still 11.7 – need 23.1, which means the ARM cluster. Remember php74’s slow ARM start has twice been mistaken for a hang.
Also noticed: libxml-pear.patch is tracked but referenced nowhere in the
PKGBUILD (0 hits) – dead cruft from an older fork, worth deleting next time
this package is touched.