Commit graph

3 commits

Author SHA1 Message Date
Eduardo Garcia
9ae2f9e22a
Publish the image on demand after PHP security releases; turn off session upload progress (CVE-2026-109618/109619) (#867)
* ci,docker: allow a manual image rebuild, and turn off session upload progress

PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 fix CVE-2026-109618 and CVE-2026-109619, which allow
unauthenticated remote code execution with Apache mod_php. The images are rebuilt on Sundays only,
so a maintainer needs a way to publish a rebuild right after a base image security release:
add workflow_dispatch to the Docker workflow.

The second advisory also names the session upload progress feature as a way to reach the
vulnerable path. LibreSpeed does not use it, so it is turned off in the image.

* ci: always pull the base image when building

A rebuild after a security release of the php or alpine image should not reuse a cached
older base (the job uses cache-from type=gha).
2026-10-21 23:04:38 +02:00
Akira Yamamoto
a30872a4e8 docs: shorten PHP upload limit comment 2026-06-09 18:19:10 +10:00
Akira Yamamoto
3b3cddeb41 fix(docker): raise PHP post_max_size for default 20MB upload chunks
speedtest_worker.js uploads in 20 MB chunks by default
(xhr_ul_blob_megabytes: 20) but the official Docker images inherit
PHP's stock post_max_size = 8M / upload_max_filesize = 2M, so every
upload chunk:

* triggers a "POST Content-Length ... exceeds the limit" warning
  (leaked into the response body of /backend/empty.php on the Debian
  variant where display_errors is on; suppressed but still emitted on
  Alpine where it's off);
* causes empty.php's subsequent header() calls to fail with "Cannot
  modify header information - headers already sent", leaving the
  response without proper status, cache, or CORS directives.

Ship a small docker/librespeed-php.ini with post_max_size = 32M,
upload_max_filesize = 32M, memory_limit = 256M and COPY it into the
right conf.d for each base image (/usr/local/etc/php/conf.d on
Debian, /etc/php84/conf.d on Alpine). 99- prefix follows the
NN-name.ini packaging convention so this loads after distro defaults
but never silently shadows operator overrides.

Verified post-fix on both variants: a 20 MB POST to /backend/empty.php
returns HTTP 200 / 0 bytes with no warning leakage.
2026-06-09 18:06:14 +10:00