21日に総理もPHPの脆弱性対策せよと言っていたことを22日朝のニュースで知った。かなりやばそうなのでとりあえずサーバーを停止しておいた。そして本日(23日)PHPをアップデートしようとした。、
まずは対策版のバージョン確認。
PHP
php83-8.3.36
php84-8.4.27
php85-8.5.12そこで、さくっとpkgでupgrade簡単さ
PHP
# pkg update
# pkg upgrade
# php -v
PHP 8.5.11 (cli) (built: Oct 15 2026 02:43:30) (NTS)あれ?対策前のバージョンにしかならない。
仕方がないので、リポジトリーlatest版に変更するしか無い。以下のパスに下記内容のファイルを作る
/usr/local/etc/pkg/repos/FreeBSD.conf
Plaintext
FreeBSD-ports: {
url: "pkg+https://pkg.FreeBSD.org/${ABI}/latest",
mirror_type: "srv",
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
}もう一度データベース更新から
Bash
# pkg update -f
# pkg upgrade
Updating FreeBSD-ports repository catalogue...
FreeBSD-ports repository is up to date.
Updating FreeBSD-ports-kmods repository catalogue...
FreeBSD-ports-kmods repository is up to date.
All repositories are up to date.
Checking for upgrades (44 candidates): 100%
Processing candidates (44 candidates): 100%
The following 44 package(s) will be affected (of 0 checked):
Installed packages to be UPGRADED:
expat: 2.8.4 -> 2.9.0 [FreeBSD-ports]
ffmpeg: 9.0.2,1 -> 9.0.2_2,1 [FreeBSD-ports]
fontconfig: 2.17.1,1 -> 2.18.3,1 [FreeBSD-ports]
gcc12: 12.4.0_6 -> 12.5.0 [FreeBSD-ports]
gcc13: 13.3.0_6 -> 13.5.0 [FreeBSD-ports]
graphite2: 1.3.15 -> 1.3.15_1 [FreeBSD-ports]
harfbuzz: 14.2.1 -> 14.6.0 [FreeBSD-ports]
hwdata: 0.411,1 -> 0.412,1 [FreeBSD-ports]
librsvg2-rust: 2.62.3_2 -> 2.62.3_3 [FreeBSD-ports]
lmdb0: 0.9.35 -> 0.9.36 [FreeBSD-ports]
mod_php85: 8.5.11 -> 8.5.12 [FreeBSD-ports]
php85: 8.5.11 -> 8.5.12 [FreeBSD-ports]
php85-bz2: 8.5.11 -> 8.5.12 [FreeBSD-ports]
php85-ctype: 8.5.11 -> 8.5.12 [FreeBSD-ports]
php85-dom: 8.5.11 -> 8.5.12 [FreeBSD-ports]
php85-filter: 8.5.11 -> 8.5.12 [FreeBSD-ports]
php85-gd: 8.5.11 -> 8.5.12 [FreeBSD-ports]
php85-gettext: 8.5.11 -> 8.5.12 [FreeBSD-ports]
php85-iconv: 8.5.11 -> 8.5.12 [FreeBSD-ports]
php85-mbstring: 8.5.11 -> 8.5.12 [FreeBSD-ports]
php85-mysqli: 8.5.11 -> 8.5.12 [FreeBSD-ports]
php85-pdo: 8.5.11 -> 8.5.12 [FreeBSD-ports]
php85-pdo_sqlite: 8.5.11 -> 8.5.12 [FreeBSD-ports]
php85-phar: 8.5.11 -> 8.5.12 [FreeBSD-ports]
php85-posix: 8.5.11 -> 8.5.12 [FreeBSD-ports]
php85-session: 8.5.11 -> 8.5.12 [FreeBSD-ports]
php85-simplexml: 8.5.11 -> 8.5.12 [FreeBSD-ports]
php85-sqlite3: 8.5.11 -> 8.5.12 [FreeBSD-ports]
php85-tokenizer: 8.5.11 -> 8.5.12 [FreeBSD-ports]
php85-xml: 8.5.11 -> 8.5.12 [FreeBSD-ports]
php85-xmlreader: 8.5.11 -> 8.5.12 [FreeBSD-ports]
php85-xmlwriter: 8.5.11 -> 8.5.12 [FreeBSD-ports]
php85-zip: 8.5.11 -> 8.5.12 [FreeBSD-ports]
php85-zlib: 8.5.11 -> 8.5.12 [FreeBSD-ports]
png: 1.6.58 -> 1.6.59_1 [FreeBSD-ports]
py312-cryptography: 50.0.1,1 -> 50.0.1_1,1 [FreeBSD-ports]
py312-dnspython: 2.8.0_1,1 -> 2.9.0,1 [FreeBSD-ports]
py312-pytz: 2026.3,1 -> 2026.5,1 [FreeBSD-ports]
shaderc: 2026.4 -> 2026.4_1 [FreeBSD-ports]
vulkan-loader: 1.4.360 -> 1.4.365 [FreeBSD-ports]
x265: 4.1 -> 4.3 [FreeBSD-ports]
xorgproto: 2025.1 -> 2026.1 [FreeBSD-ports]
Installed packages to be REINSTALLED:
cyrus-sasl-2.1.28_6 [FreeBSD-ports] (option changed: LMDB0 (added))
cyrus-sasl-saslauthd-2.1.28_4 [FreeBSD-ports] (option changed: LMDB0 (added))
Number of packages to be upgraded: 42
Number of packages to be reinstalled: 2
The process will require 3 MiB more space.
213 MiB to be downloaded.
Proceed with this action? [y/N]:
今度はOKです。(おまけ PHPだけでなくPostfix & bindがらみの問題もついでに解決してました。)
PHP
# php -v
PHP 8.5.12 (cli) (built: Oct 21 2026 19:37:18) (NTS)
