aurupdater

php74

Build times (auto-updated)


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):

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:

  1. A global CPPFLAGS/LDFLAGS override pointing at openssl-1.0 was 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, because configure emits its own -L/usr/lib (from --with-imap=shared,/usr) ahead of appended LDFLAGS. Confirmed by reading the failing link line in config.log. See memory/TOOLING_NOTES.md’s entry. Use PKG_CONFIG_PATH for this, not flag appending – it feeds PHP’s own PKG_CHECK_MODULES and is naturally scoped (curl/libxml2 resolve their own modules from the default path).
  2. Before finding the ext/openssl problem, the visible failure was an IMAP link error from c-client calling the removed TLSv1_{client,server}_method(). That got its own real fix (see memory/c-client.md, now adapted/c-client 21.2) – but it turned out not to be on the critical path, since openssl-3 still 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.).

Build notes (2026-08-19)

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:

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

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.