Version in base suite: 2.0.13-2 Base version: libapache2-mod-perl2_2.0.13-2 Target version: libapache2-mod-perl2_2.0.14-1~deb13u1 Base file: /srv/ftp-master.debian.org/ftp/pool/main/liba/libapache2-mod-perl2/libapache2-mod-perl2_2.0.13-2.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/liba/libapache2-mod-perl2/libapache2-mod-perl2_2.0.14-1~deb13u1.dsc Changes | 24 ++++++++++ META.yml | 2 README | 4 - RELEASE | 44 +++++++++--------- STATUS | 3 - debian/changelog | 17 +++++++ debian/patches/ftbfs-armhf-fix.patch | 40 ---------------- debian/patches/series | 1 lib/ModPerl/DummyVersions.pm | 62 +++++++++++++------------- lib/mod_perl2.pm | 2 mod_perl.spec | 8 +-- src/modules/perl/modperl_cmd.c | 8 +-- src/modules/perl/modperl_common_util.c | 2 src/modules/perl/modperl_interp.c | 9 +++ src/modules/perl/modperl_module.c | 8 +-- src/modules/perl/modperl_perl_global.c | 18 ++++++- src/modules/perl/modperl_perl_global.h | 3 - src/modules/perl/modperl_tipool.c | 8 +++ xs/Apache2/Module/Apache2__Module.h | 7 ++ xs/Apache2/RequestIO/Apache2__RequestIO.h | 21 +++++++- xs/Apache2/RequestUtil/Apache2__RequestUtil.h | 7 +- 21 files changed, 174 insertions(+), 124 deletions(-) dpkg-source: warning: cannot verify inline signature for /srv/release.debian.org/tmp/tmp99jffhtg/libapache2-mod-perl2_2.0.13-2.dsc: no acceptable signature found dpkg-source: warning: cannot verify inline signature for /srv/release.debian.org/tmp/tmp99jffhtg/libapache2-mod-perl2_2.0.14-1~deb13u1.dsc: no acceptable signature found diff -Nru libapache2-mod-perl2-2.0.13/Changes libapache2-mod-perl2-2.0.14/Changes --- libapache2-mod-perl2-2.0.13/Changes 2023-10-21 09:47:11.000000000 +0000 +++ libapache2-mod-perl2-2.0.14/Changes 2026-11-22 20:02:26.000000000 +0000 @@ -12,6 +12,30 @@ =over 3 +=item 2.0.14 November 22, 2026 + +Check offset in mpxs_Apache2__RequestRec_write() [Satoru Yano +] + +Use SvPV_nolen() with apr_pstrdup() for ERRSV handling where necessary [Satoru +Yano ] + +In modperl_perl_global_svpv_save()/modperl_perl_global_svpv_restore(), use a +full copy of the SV so that undef ($/ = undef, slurp mode) and reference +($/ = \4096, fixed-length records) values are preserved faithfully [Steve Hay, +Satoru Yano ] + +Check len in mpxs_Apache2__Module_loaded() [Satoru Yano ] + +Use apr_palloc() in mpxs_Apache2__RequestRec_set_basic_credentials() [Satoru +Yano ] + +Abort when necessary in modperl_interp_new() and modperl_list_new [Steve Hay, +Satoru Yano ] + +Use I32 rather than int for 'namelen' argument, fixing an incompatible +function pointer error/warning in a 32-bit build [Joe Orton] + =item 2.0.13 October 21, 2023 Use get_server_banner() instead of deprecated get_server_version() in diff -Nru libapache2-mod-perl2-2.0.13/META.yml libapache2-mod-perl2-2.0.14/META.yml --- libapache2-mod-perl2-2.0.13/META.yml 2023-10-21 09:47:12.000000000 +0000 +++ libapache2-mod-perl2-2.0.14/META.yml 2026-11-22 20:02:28.000000000 +0000 @@ -1,5 +1,5 @@ name: mod_perl -version: 2.0.13 +version: 2.0.14 installdirs: site distribution_type: module no_index: diff -Nru libapache2-mod-perl2-2.0.13/README libapache2-mod-perl2-2.0.14/README --- libapache2-mod-perl2-2.0.13/README 2023-10-21 09:47:13.000000000 +0000 +++ libapache2-mod-perl2-2.0.14/README 2026-11-22 20:02:28.000000000 +0000 @@ -3,8 +3,8 @@ *** Prerequisites *** Apache: - Dynamic mod_perl (DSO): Apache 2.0.47 - 2.4.57. - Static mod_perl: Apache 2.0.51 - 2.4.57. + Dynamic mod_perl (DSO): Apache 2.0.47 - 2.4.71. + Static mod_perl: Apache 2.0.51 - 2.4.71. Newer Apache versions may work with this version of mod_perl. If not, the svn version likely will, which can be obtained from: diff -Nru libapache2-mod-perl2-2.0.13/RELEASE libapache2-mod-perl2-2.0.14/RELEASE --- libapache2-mod-perl2-2.0.13/RELEASE 2023-10-21 09:47:13.000000000 +0000 +++ libapache2-mod-perl2-2.0.14/RELEASE 2026-11-22 20:02:28.000000000 +0000 @@ -30,7 +30,7 @@ make sure you give the correct permissions to them. 1. 'make mydist' - to make sure nothing is missing from the manifest, - etc. Now test this generated package mod_perl-2.0.13.tar.gz (not + etc. Now test this generated package mod_perl-2.0.14.tar.gz (not the current build) with as many configurations as possible on as many platforms as possible, unpacking the package each time afresh. @@ -40,7 +40,7 @@ - edit META.yml to the rc\d version above in the version key b. commit Changes - % svn ci -m "2.0.13 rc1" Changes + % svn ci -m "2.0.14 rc1" Changes c. nuke any preinstalled mod_perl libs and run 'make test' @@ -58,7 +58,7 @@ candidate alert to the modperl/dev list (may be longer to give most people a chance to catch up). no need to tag this package - Subject: [RELEASE CANDIDATE]: mod_perl-2.0.13 RC\d+ + Subject: [RELEASE CANDIDATE]: mod_perl-2.0.14 RC\d+ 2a. if problems are detected during stage 2, repeat stages 1 and 2. @@ -79,28 +79,28 @@ % make -n tag d. commit Changes README Makefile.PL - % svn ci -m "2.0.13 release" Changes README Makefile.PL + % svn ci -m "2.0.14 release" Changes README Makefile.PL e. tag % make tag f. Update the svn:externals in the new tag to refer to the new docs tag that was created by the previous step: - % svn co https://svn.apache.org/repos/asf/perl/modperl/tags/2_0_13 - % svn propedit svn:externals 2_0_13 + % svn co https://svn.apache.org/repos/asf/perl/modperl/tags/2_0_14 + % svn propedit svn:externals 2_0_14 Update the docs line from: ^/perl/modperl/docs/trunk/src/docs/2.0 to: - ^/perl/modperl/docs/tags/2_0_13/src/docs/2.0 + ^/perl/modperl/docs/tags/2_0_14/src/docs/2.0 The complete svn:externals should now look like: - % svn propget svn:externals 2_0_13 + % svn propget svn:externals 2_0_14 Apache-Test ^/perl/Apache-Test/tags/ Apache-Reload ^/perl/Apache-Reload/tags/ Apache-SizeLimit ^/perl/Apache-SizeLimit/tags/ - docs ^/perl/modperl/docs/tags/2_0_13/src/docs/2.0 + docs ^/perl/modperl/docs/tags/2_0_14/src/docs/2.0 where , and are the tags of the releases of Apache-Test, Apache-Reload and Apache-SizeLimit included in this release of mod_perl. - % svn ci -m "2.0.13 release" + % svn ci -m "2.0.14 release" g. create the final package % make dist @@ -114,13 +114,13 @@ a. sign your local copy of the tarball: - % gpg --detach-sign --armor mod_perl-2.0.13.tar.gz + % gpg --detach-sign --armor mod_perl-2.0.14.tar.gz - % pgps -b --armor mod_perl-2.0.13.tar.gz + % pgps -b --armor mod_perl-2.0.14.tar.gz b. create SHA256 and SHA512 checksums of the tarball: - % sha256sum mod_perl-2.0.13.tar.gz >mod_perl-2.0.13.tar.gz.sha256 - % sha512sum mod_perl-2.0.13.tar.gz >mod_perl-2.0.13.tar.gz.sha512 + % sha256sum mod_perl-2.0.14.tar.gz >mod_perl-2.0.14.tar.gz.sha256 + % sha512sum mod_perl-2.0.14.tar.gz >mod_perl-2.0.14.tar.gz.sha512 5. Release the package and update links @@ -136,12 +136,12 @@ d. ask one of the other developers to double check the signature file and tarball: download both files and verify the signature: - https://www.apache.org/dist/perl/mod_perl-2.0.13.tar.gz.asc - https://www.apache.org/dist/perl/mod_perl-2.0.13.tar.gz + https://www.apache.org/dist/perl/mod_perl-2.0.14.tar.gz.asc + https://www.apache.org/dist/perl/mod_perl-2.0.14.tar.gz - % gpg --verify mod_perl-2.0.13.tar.gz.asc + % gpg --verify mod_perl-2.0.14.tar.gz.asc - % pgpv mod_perl-2.0.13.tar.gz.asc + % pgpv mod_perl-2.0.14.tar.gz.asc e. respond to the automated email that will arrive requesting that release data be filled in at https://reporter.apache.org/addrelease.html?perl @@ -150,7 +150,7 @@ % vi modperl-docs/src/download/index_top.html % vi modperl-docs/doap_Perl.rdf and commit. - % svn ci -m "2.0.13 release" \ + % svn ci -m "2.0.14 release" \ modperl-docs/src/download/index_top.html \ modperl-docs/doap_Perl.rdf @@ -176,7 +176,7 @@ Note, to post to announce@, you must be sending from an apache.org address. - Subject: [ANNOUNCE] mod_perl 2.0.13 + Subject: [ANNOUNCE] mod_perl 2.0.14 include: - link at perl.apache.org: @@ -193,7 +193,7 @@ c. edit ./Changes: - start a new item with incremented version + '-dev' - =item 2.0.14-dev + =item 2.0.15-dev d. add a release entry in STATUS @@ -202,7 +202,7 @@ % perl -pi.bak -e 's/(\d+)([._])(\d+)(\2)(\d+)/join($2, $1, $3, $5+1)/eg' RELEASE f. commit the changed files - % svn ci -m "start 2.0.13-dev cycle" Changes META.yml lib/mod_perl2.pm \ + % svn ci -m "start 2.0.14-dev cycle" Changes META.yml lib/mod_perl2.pm \ STATUS RELEASE 9. Old Versions diff -Nru libapache2-mod-perl2-2.0.13/STATUS libapache2-mod-perl2-2.0.14/STATUS --- libapache2-mod-perl2-2.0.13/STATUS 2023-10-21 09:47:13.000000000 +0000 +++ libapache2-mod-perl2-2.0.14/STATUS 2026-11-22 20:02:29.000000000 +0000 @@ -1,8 +1,9 @@ mod_perl 2.0 STATUS: -*-text-*- - Last modified at [$Date: 2022-01-30 13:47:35 +0000 (Sun, 30 Jan 2022) $] + Last modified at [$Date: 2023-10-21 11:48:21 +0100 (Sat, 21 Oct 2023) $] Release: -------- + 2.000.13 : Released Oct 21, 2023 2.000.12 : Released Jan 30, 2022 2.000.11 : Released Oct 05, 2019 2.000.10 : Released Oct 27, 2016 diff -Nru libapache2-mod-perl2-2.0.13/debian/changelog libapache2-mod-perl2-2.0.14/debian/changelog --- libapache2-mod-perl2-2.0.13/debian/changelog 2024-09-25 17:12:11.000000000 +0000 +++ libapache2-mod-perl2-2.0.14/debian/changelog 2026-11-25 12:56:56.000000000 +0000 @@ -1,3 +1,20 @@ +libapache2-mod-perl2 (2.0.14-1~deb13u1) trixie-security; urgency=high + + * Team upload. + * Rebuild for trixie-security + + -- Salvatore Bonaccorso Wed, 25 Nov 2026 13:56:56 +0100 + +libapache2-mod-perl2 (2.0.14-1) unstable; urgency=medium + + * Team upload. + * Import upstream version 2.0.14. + - Fixes CVE-2026-116001, CVE-2026-116005, CVE-2026-116032, + CVE-2026-116043, CVE-2026-116772 and CVE-2026-116799 (Closes: #1155197) + * Drop patches applied upstream + + -- Salvatore Bonaccorso Wed, 25 Nov 2026 06:56:45 +0100 + libapache2-mod-perl2 (2.0.13-2) unstable; urgency=medium [ Andreas Hasenack ] diff -Nru libapache2-mod-perl2-2.0.13/debian/patches/ftbfs-armhf-fix.patch libapache2-mod-perl2-2.0.14/debian/patches/ftbfs-armhf-fix.patch --- libapache2-mod-perl2-2.0.13/debian/patches/ftbfs-armhf-fix.patch 2024-09-25 17:12:11.000000000 +0000 +++ libapache2-mod-perl2-2.0.14/debian/patches/ftbfs-armhf-fix.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,40 +0,0 @@ -commit ead5012b9f8bca08415f39e15226dbc6112a9538 (upstream-mirror/trunk, upstream-trunk) -Author: Joe Orton -Date: Tue Feb 6 08:33:52 2024 +0000 - - * src/modules/perl/modperl_common_util.c (modperl_table_magic_copy): - Use I32 rather than int for 'namelen' argument, fixing an - incompatible function pointer error/warning in a 32-bit build: - - modperl_common_util.c:57:53: error: initialization of ‘int (*)(PerlInterpreter *, SV *, MAGIC *, SV *, const char *, I32)’ {aka ‘int (*)(struct interpreter *, struct sv *, struct magic *, struct sv *, const char *, long int)’} from incompatible pointer type ‘int (*)(PerlInterpreter *, SV *, MAGIC *, SV *, const char *, int)’ {aka ‘int (*)(struct interpreter *, struct sv *, struct magic *, struct sv *, const char *, int)’} [-Wincompatible-pointer-types] - 57 | modperl_table_magic_copy}; - | ^~~~~~~~~~~~~~~~~~~~~~~~ - - Checked back to Perl 5.14.x which has I32 (a typedef of long int on - i686) rather than int in the prototype for the svt_copy function - pointer in MGVTBL, so I32 appears to have been always correct here: - - int (*svt_copy)(SV *sv, MAGIC* mg, SV *nsv, const char *name, I32 namlen); - - per https://perldoc.perl.org/5.14.0/perlguts - - - git-svn-id: https://svn.apache.org/repos/asf/perl/modperl/trunk@1915593 13f79535-47bb-0310-9956-ffa450edef68 - -Origin: upstream, https://github.com/apache/mod_perl/commit/ead5012b9f8bca08415f39e15226dbc6112a9538 -Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/libapache2-mod-perl2/+bug/2081981 -Last-Update: 2024-09-25 - -diff --git a/src/modules/perl/modperl_common_util.c b/src/modules/perl/modperl_common_util.c -index c5f285f9d..461750f2f 100644 ---- a/src/modules/perl/modperl_common_util.c -+++ b/src/modules/perl/modperl_common_util.c -@@ -41,7 +41,7 @@ - - MP_INLINE static - int modperl_table_magic_copy(pTHX_ SV *sv, MAGIC *mg, SV *nsv, -- const char *name, int namelen) -+ const char *name, I32 namelen) - { - /* prefetch the value whenever we're iterating over the keys */ - MAGIC *tie_magic = mg_find(nsv, PERL_MAGIC_tiedelem); diff -Nru libapache2-mod-perl2-2.0.13/debian/patches/series libapache2-mod-perl2-2.0.14/debian/patches/series --- libapache2-mod-perl2-2.0.13/debian/patches/series 2024-09-25 17:12:11.000000000 +0000 +++ libapache2-mod-perl2-2.0.14/debian/patches/series 2026-11-25 12:56:56.000000000 +0000 @@ -12,4 +12,3 @@ 360-conditional-linux-pid-module.patch 0001-Skip-t-protocol-pseudo_http.t-incompatible-with-Apac.patch honour-env-LDFLAGS.patch -ftbfs-armhf-fix.patch diff -Nru libapache2-mod-perl2-2.0.13/lib/ModPerl/DummyVersions.pm libapache2-mod-perl2-2.0.14/lib/ModPerl/DummyVersions.pm --- libapache2-mod-perl2-2.0.13/lib/ModPerl/DummyVersions.pm 2023-10-21 09:47:12.000000000 +0000 +++ libapache2-mod-perl2-2.0.14/lib/ModPerl/DummyVersions.pm 2026-11-22 20:02:28.000000000 +0000 @@ -77,95 +77,95 @@ $APR::Util::VERSION = 0.009000; package Apache2::Access; -$Apache2::Access::VERSION = 2.000013; +$Apache2::Access::VERSION = 2.000014; package Apache2::CmdParms; -$Apache2::CmdParms::VERSION = 2.000013; +$Apache2::CmdParms::VERSION = 2.000014; package Apache2::Command; -$Apache2::Command::VERSION = 2.000013; +$Apache2::Command::VERSION = 2.000014; package Apache2::Connection; -$Apache2::Connection::VERSION = 2.000013; +$Apache2::Connection::VERSION = 2.000014; package Apache2::ConnectionUtil; -$Apache2::ConnectionUtil::VERSION = 2.000013; +$Apache2::ConnectionUtil::VERSION = 2.000014; package Apache2::Directive; -$Apache2::Directive::VERSION = 2.000013; +$Apache2::Directive::VERSION = 2.000014; package Apache2::Filter; -$Apache2::Filter::VERSION = 2.000013; +$Apache2::Filter::VERSION = 2.000014; package Apache2::FilterRec; -$Apache2::FilterRec::VERSION = 2.000013; +$Apache2::FilterRec::VERSION = 2.000014; package Apache2::HookRun; -$Apache2::HookRun::VERSION = 2.000013; +$Apache2::HookRun::VERSION = 2.000014; package Apache2::Log; -$Apache2::Log::VERSION = 2.000013; +$Apache2::Log::VERSION = 2.000014; package Apache2::MPM; -$Apache2::MPM::VERSION = 2.000013; +$Apache2::MPM::VERSION = 2.000014; package Apache2::Module; -$Apache2::Module::VERSION = 2.000013; +$Apache2::Module::VERSION = 2.000014; package Apache2::Process; -$Apache2::Process::VERSION = 2.000013; +$Apache2::Process::VERSION = 2.000014; package Apache2::Provider; -$Apache2::Provider::VERSION = 2.000013; +$Apache2::Provider::VERSION = 2.000014; package Apache2::RequestIO; -$Apache2::RequestIO::VERSION = 2.000013; +$Apache2::RequestIO::VERSION = 2.000014; package Apache2::RequestRec; -$Apache2::RequestRec::VERSION = 2.000013; +$Apache2::RequestRec::VERSION = 2.000014; package Apache2::RequestUtil; -$Apache2::RequestUtil::VERSION = 2.000013; +$Apache2::RequestUtil::VERSION = 2.000014; package Apache2::Response; -$Apache2::Response::VERSION = 2.000013; +$Apache2::Response::VERSION = 2.000014; package Apache2::ServerRec; -$Apache2::ServerRec::VERSION = 2.000013; +$Apache2::ServerRec::VERSION = 2.000014; package Apache2::ServerUtil; -$Apache2::ServerUtil::VERSION = 2.000013; +$Apache2::ServerUtil::VERSION = 2.000014; package Apache2::SubProcess; -$Apache2::SubProcess::VERSION = 2.000013; +$Apache2::SubProcess::VERSION = 2.000014; package Apache2::SubRequest; -$Apache2::SubRequest::VERSION = 2.000013; +$Apache2::SubRequest::VERSION = 2.000014; package Apache2::URI; -$Apache2::URI::VERSION = 2.000013; +$Apache2::URI::VERSION = 2.000014; package Apache2::Util; -$Apache2::Util::VERSION = 2.000013; +$Apache2::Util::VERSION = 2.000014; package ModPerl::Global; -$ModPerl::Global::VERSION = 2.000013; +$ModPerl::Global::VERSION = 2.000014; package ModPerl::InterpPool; -$ModPerl::InterpPool::VERSION = 2.000013; +$ModPerl::InterpPool::VERSION = 2.000014; package ModPerl::Interpreter; -$ModPerl::Interpreter::VERSION = 2.000013; +$ModPerl::Interpreter::VERSION = 2.000014; package ModPerl::MethodLookup; -$ModPerl::MethodLookup::VERSION = 2.000013; +$ModPerl::MethodLookup::VERSION = 2.000014; package ModPerl::TiPool; -$ModPerl::TiPool::VERSION = 2.000013; +$ModPerl::TiPool::VERSION = 2.000014; package ModPerl::TiPoolConfig; -$ModPerl::TiPoolConfig::VERSION = 2.000013; +$ModPerl::TiPoolConfig::VERSION = 2.000014; package ModPerl::Util; -$ModPerl::Util::VERSION = 2.000013; +$ModPerl::Util::VERSION = 2.000014; diff -Nru libapache2-mod-perl2-2.0.13/lib/mod_perl2.pm libapache2-mod-perl2-2.0.14/lib/mod_perl2.pm --- libapache2-mod-perl2-2.0.13/lib/mod_perl2.pm 2023-10-21 09:47:12.000000000 +0000 +++ libapache2-mod-perl2-2.0.14/lib/mod_perl2.pm 2026-11-22 20:02:28.000000000 +0000 @@ -20,7 +20,7 @@ use strict; BEGIN { - our $VERSION = "2.000013"; + our $VERSION = "2.000014"; our $VERSION_TRIPLET; if ($VERSION =~ /(\d+)\.(\d\d\d)(\d+)/) { diff -Nru libapache2-mod-perl2-2.0.13/mod_perl.spec libapache2-mod-perl2-2.0.14/mod_perl.spec --- libapache2-mod-perl2-2.0.13/mod_perl.spec 2023-10-21 09:47:13.000000000 +0000 +++ libapache2-mod-perl2-2.0.14/mod_perl.spec 2026-11-22 20:02:28.000000000 +0000 @@ -1,7 +1,7 @@ -%define _version 2.0.13 -%define _release -%define _source https://apache.org/dist/perl/mod_perl-2.0.13-rc1.tar.gz -%define _dirname mod_perl-2.0.13-rc1 +%define _version 2.0.14 +%define _release 1 +%define _source https://apache.org/dist/perl/mod_perl-2.0.14.tar.gz +%define _dirname mod_perl-2.0.14 %define _httpd_min_ver 2.0.47 %define _perl_min_ver 5.6.1 Name: mod_perl diff -Nru libapache2-mod-perl2-2.0.13/src/modules/perl/modperl_cmd.c libapache2-mod-perl2-2.0.14/src/modules/perl/modperl_cmd.c --- libapache2-mod-perl2-2.0.13/src/modules/perl/modperl_cmd.c 2023-10-21 09:47:13.000000000 +0000 +++ libapache2-mod-perl2-2.0.14/src/modules/perl/modperl_cmd.c 2026-11-22 20:02:28.000000000 +0000 @@ -186,7 +186,7 @@ MP_PERL_CONTEXT_STORE_OVERRIDE(scfg->mip->parent->perl); if (!modperl_require_module(aTHX_ arg, FALSE)) { - error = SvPVX(ERRSV); + error = apr_pstrdup(parms->pool, SvPV_nolen(ERRSV)); } else { modperl_env_sync_srv_env_hash2table(aTHX_ parms->pool, scfg); @@ -224,7 +224,7 @@ MP_PERL_CONTEXT_STORE_OVERRIDE(scfg->mip->parent->perl); if (!modperl_require_file(aTHX_ arg, FALSE)) { - error = SvPVX(ERRSV); + error = apr_pstrdup(parms->pool, SvPV_nolen(ERRSV)); } else { modperl_env_sync_srv_env_hash2table(aTHX_ parms->pool, scfg); @@ -610,7 +610,7 @@ if (SvTRUE(ERRSV)) { MP_PERL_CONTEXT_RESTORE; - return SvPVX(ERRSV); + return apr_pstrdup(p, SvPV_nolen(ERRSV)); } if (handler) { @@ -632,7 +632,7 @@ } if (status != OK) { - char *error = SvTRUE(ERRSV) ? SvPVX(ERRSV) : + char *error = SvTRUE(ERRSV) ? apr_pstrdup(p, SvPV_nolen(ERRSV)) : apr_psprintf(p, " handler %s failed with status=%d", handler->name, status); MP_PERL_CONTEXT_RESTORE; diff -Nru libapache2-mod-perl2-2.0.13/src/modules/perl/modperl_common_util.c libapache2-mod-perl2-2.0.14/src/modules/perl/modperl_common_util.c --- libapache2-mod-perl2-2.0.13/src/modules/perl/modperl_common_util.c 2023-10-21 09:47:13.000000000 +0000 +++ libapache2-mod-perl2-2.0.14/src/modules/perl/modperl_common_util.c 2026-11-22 20:02:28.000000000 +0000 @@ -41,7 +41,7 @@ MP_INLINE static int modperl_table_magic_copy(pTHX_ SV *sv, MAGIC *mg, SV *nsv, - const char *name, int namelen) + const char *name, I32 namelen) { /* prefetch the value whenever we're iterating over the keys */ MAGIC *tie_magic = mg_find(nsv, PERL_MAGIC_tiedelem); diff -Nru libapache2-mod-perl2-2.0.13/src/modules/perl/modperl_interp.c libapache2-mod-perl2-2.0.14/src/modules/perl/modperl_interp.c --- libapache2-mod-perl2-2.0.13/src/modules/perl/modperl_interp.c 2023-10-21 09:47:13.000000000 +0000 +++ libapache2-mod-perl2-2.0.14/src/modules/perl/modperl_interp.c 2026-11-22 20:02:29.000000000 +0000 @@ -44,6 +44,15 @@ modperl_interp_t *interp = (modperl_interp_t *)malloc(sizeof(*interp)); + if (!interp) { + /* allocation failure is unrecoverable: interpreter pool state + * cannot be maintained safely. Mirror the existing abort() on + * pool exhaustion in modperl_tipool_new_item() rather than + * returning NULL that callers do not check. + */ + abort(); + } + memset(interp, '\0', sizeof(*interp)); interp->mip = mip; diff -Nru libapache2-mod-perl2-2.0.13/src/modules/perl/modperl_module.c libapache2-mod-perl2-2.0.14/src/modules/perl/modperl_module.c --- libapache2-mod-perl2-2.0.13/src/modules/perl/modperl_module.c 2023-10-21 09:47:13.000000000 +0000 +++ libapache2-mod-perl2-2.0.14/src/modules/perl/modperl_module.c 2026-11-22 20:02:29.000000000 +0000 @@ -318,7 +318,7 @@ FREETMPS;LEAVE; if (SvTRUE(ERRSV)) { - return SvPVX(ERRSV); + return apr_pstrdup(p, SvPV_nolen(ERRSV)); } } else { @@ -468,7 +468,7 @@ } if (SvTRUE(ERRSV)) { - retval = SvPVX(ERRSV); + retval = apr_pstrdup(p, SvPV_nolen(ERRSV)); } MP_INTERP_PUTBACK(interp, aTHX); @@ -611,7 +611,7 @@ FREETMPS;LEAVE; if (SvTRUE(ERRSV)) { - errmsg = SvPVX(ERRSV); + errmsg = SvPV_nolen(ERRSV); } } else if (SvROK(obj) && (SvTYPE(SvRV(obj)) == SVt_PVHV)) { @@ -658,7 +658,7 @@ if ((errmsg = modperl_module_cmd_fetch(aTHX_ obj, "name", &val))) { MP_INTERP_PUTBACK(interp, aTHX); - return errmsg; + return apr_pstrdup(p, errmsg); } cmd->name = apr_pstrdup(p, SvPV(val, len)); diff -Nru libapache2-mod-perl2-2.0.13/src/modules/perl/modperl_perl_global.c libapache2-mod-perl2-2.0.14/src/modules/perl/modperl_perl_global.c --- libapache2-mod-perl2-2.0.13/src/modules/perl/modperl_perl_global.c 2023-10-21 09:47:13.000000000 +0000 +++ libapache2-mod-perl2-2.0.14/src/modules/perl/modperl_perl_global.c 2026-11-22 20:02:29.000000000 +0000 @@ -374,14 +374,26 @@ static void modperl_perl_global_svpv_save(pTHX_ modperl_perl_global_svpv_t *svpv) { - svpv->cur = SvCUR(*svpv->sv); - strncpy(svpv->pv, SvPVX(*svpv->sv), sizeof(svpv->pv)); + /* Take a full copy of the SV so that undef ($/ = undef, slurp mode) + * and reference ($/ = \4096, fixed-length records) values are + * preserved faithfully. newSVsv() handles every scalar flavour and + * never dereferences a NULL string pointer. + * + * saved_sv starts NULL (struct is apr_pcalloc'd) and is freed by + * modperl_perl_global_svpv_restore() after each use, so it is + * always NULL here and we always allocate fresh. */ + svpv->saved_sv = newSVsv(*svpv->sv); } static void modperl_perl_global_svpv_restore(pTHX_ modperl_perl_global_svpv_t *svpv) { - sv_setpvn(*svpv->sv, svpv->pv, svpv->cur); + /* Only restore if save() was ever called (saved_sv non-NULL). */ + if (svpv->saved_sv) { + SvSetSV(*svpv->sv, svpv->saved_sv); + SvREFCNT_dec(svpv->saved_sv); + svpv->saved_sv = NULL; + } } typedef enum { diff -Nru libapache2-mod-perl2-2.0.13/src/modules/perl/modperl_perl_global.h libapache2-mod-perl2-2.0.14/src/modules/perl/modperl_perl_global.h --- libapache2-mod-perl2-2.0.13/src/modules/perl/modperl_perl_global.h 2023-10-21 09:47:13.000000000 +0000 +++ libapache2-mod-perl2-2.0.14/src/modules/perl/modperl_perl_global.h 2026-11-22 20:02:29.000000000 +0000 @@ -59,8 +59,7 @@ typedef struct { SV **sv; - char pv[256]; /* XXX: only need enough for $/ at the moment */ - I32 cur; + SV *saved_sv; /* full SV copy; NULL before first save */ } modperl_perl_global_svpv_t; typedef struct { diff -Nru libapache2-mod-perl2-2.0.13/src/modules/perl/modperl_tipool.c libapache2-mod-perl2-2.0.14/src/modules/perl/modperl_tipool.c --- libapache2-mod-perl2-2.0.13/src/modules/perl/modperl_tipool.c 2023-10-21 09:47:13.000000000 +0000 +++ libapache2-mod-perl2-2.0.14/src/modules/perl/modperl_tipool.c 2026-11-22 20:02:29.000000000 +0000 @@ -35,6 +35,14 @@ { modperl_list_t *listp = (modperl_list_t *)malloc(sizeof(*listp)); + if (!listp) { + /* allocation failure is unrecoverable: pool state cannot be + * maintained safely. Mirror the existing abort() on pool + * exhaustion rather than propagating a NULL that callers do + * not check. + */ + abort(); + } memset(listp, '\0', sizeof(*listp)); return listp; } diff -Nru libapache2-mod-perl2-2.0.13/xs/Apache2/Module/Apache2__Module.h libapache2-mod-perl2-2.0.14/xs/Apache2/Module/Apache2__Module.h --- libapache2-mod-perl2-2.0.13/xs/Apache2/Module/Apache2__Module.h 2023-10-21 09:47:15.000000000 +0000 +++ libapache2-mod-perl2-2.0.14/xs/Apache2/Module/Apache2__Module.h 2026-11-22 20:02:31.000000000 +0000 @@ -24,7 +24,12 @@ /* Does the module name have a '.' in it ? */ if ((base = ap_strchr(name, '.'))) { - int len = base - name; + ptrdiff_t len = base - name; + + /* need room for ".c\0" (3 bytes) */ + if (len < 0 || len > (ptrdiff_t)sizeof(nameptr) - 3) { + return 0; + } memcpy(nameptr, name, len); memcpy(nameptr + len, ".c\0", 3); diff -Nru libapache2-mod-perl2-2.0.13/xs/Apache2/RequestIO/Apache2__RequestIO.h libapache2-mod-perl2-2.0.14/xs/Apache2/RequestIO/Apache2__RequestIO.h --- libapache2-mod-perl2-2.0.13/xs/Apache2/RequestIO/Apache2__RequestIO.h 2023-10-21 09:47:15.000000000 +0000 +++ libapache2-mod-perl2-2.0.14/xs/Apache2/RequestIO/Apache2__RequestIO.h 2026-11-22 20:02:31.000000000 +0000 @@ -153,11 +153,28 @@ buf = (const char *)SvPV(buffer, avail); - if (len == -1) { - wlen = offset ? avail - offset : avail; + /* Validate offset first while it is still signed (apr_off_t), so a + * negative value is caught before any conversion to unsigned arithmetic. + * Compare against avail cast to apr_off_t (not the other way round) so + * that a large offset on a 32-bit LFS build (where apr_off_t is 64-bit + * but apr_size_t is 32-bit) cannot truncate and silently pass the check. + */ + if (offset < 0 || offset > (apr_off_t)avail) + Perl_croak(aTHX_ "$r->write: offset out of range"); + + /* -1 (the typemap default) means "rest of buffer from offset" */ + if (len == (apr_size_t)-1) { + wlen = avail - (apr_size_t)offset; } else { + /* Explicit length: reject if it runs past the end. + * Use subtraction (avail - offset) rather than addition (offset + len) + * to avoid a second unsigned overflow in the comparison. + * The cast to apr_size_t is safe: offset <= avail was verified above. + */ wlen = len; + if (wlen > avail - (apr_size_t)offset) + Perl_croak(aTHX_ "$r->write: length exceeds available bytes"); } MP_CHECK_WBUCKET_INIT("$r->write"); diff -Nru libapache2-mod-perl2-2.0.13/xs/Apache2/RequestUtil/Apache2__RequestUtil.h libapache2-mod-perl2-2.0.14/xs/Apache2/RequestUtil/Apache2__RequestUtil.h --- libapache2-mod-perl2-2.0.13/xs/Apache2/RequestUtil/Apache2__RequestUtil.h 2023-10-21 09:47:15.000000000 +0000 +++ libapache2-mod-perl2-2.0.14/xs/Apache2/RequestUtil/Apache2__RequestUtil.h 2026-11-22 20:02:31.000000000 +0000 @@ -168,14 +168,13 @@ char *username, char *password) { - char encoded[1024]; - int elen; + char *encoded; char *auth_value, *auth_cat; auth_cat = apr_pstrcat(r->pool, username, ":", password, NULL); - elen = apr_base64_encode(encoded, auth_cat, strlen(auth_cat)); - encoded[elen] = '\0'; + encoded = apr_palloc(r->pool, apr_base64_encode_len(strlen(auth_cat))); + apr_base64_encode(encoded, auth_cat, strlen(auth_cat)); auth_value = apr_pstrcat(r->pool, "Basic ", encoded, NULL); apr_table_setn(r->headers_in, "Authorization", auth_value);