Projects
home:rottame:vhosts-ng:php74
php7
php7-CVE-2026-128090.patch
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File php7-CVE-2026-128090.patch of Package php7
From 7050cf338092a93e7d4caa4b7dc0bb8771f52a01 Mon Sep 17 00:00:00 2001 From: Alexandre Daubois <alex.daubois@gmail.com> Date: Fri, 13 Nov 2026 08:33:23 +0100 Subject: [PATCH] Fix GHSA-68fq-fh7h-f8gr: refuse keyless phar signature when .pubkey exists The signature type is not covered by the signature, so an OpenSSL signed phar could be downgraded to a keyless hash algorithm. --- ext/phar/tests/ghsa-68fq-fh7h-f8gr.phpt | 122 ++++++++++++++++++++++++ ext/phar/util.c | 17 ++++ 2 files changed, 139 insertions(+) create mode 100644 ext/phar/tests/ghsa-68fq-fh7h-f8gr.phpt Index: php-7.4.33/ext/phar/util.c =================================================================== --- php-7.4.33.orig/ext/phar/util.c +++ php-7.4.33/ext/phar/util.c @@ -21,6 +21,8 @@ #include "phar_internal.h" #include "ext/hash/php_hash_sha.h" +#include <stdbool.h> + #ifdef PHAR_HAVE_OPENSSL /* OpenSSL includes */ #include <openssl/evp.h> @@ -1506,6 +1508,23 @@ int phar_verify_signature(php_stream *fp php_stream_rewind(fp); + if (sig_type != PHAR_SIG_OPENSSL) { + php_stream_statbuf ssb; + char *pfile; + bool has_pubkey; + + spprintf(&pfile, 0, "%s.pubkey", fname); + has_pubkey = php_stream_stat_path_ex(pfile, PHP_STREAM_URL_STAT_QUIET, &ssb, NULL) == 0; + efree(pfile); + + if (has_pubkey) { + if (error) { + spprintf(error, 0, "openssl public key found, but the signature does not use openssl"); + } + return FAILURE; + } + } + switch (sig_type) { case PHAR_SIG_OPENSSL: { #ifdef PHAR_HAVE_OPENSSL
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.