head 1.1; access; symbols pkgsrc-2026Q1:1.1.0.2; locks; strict; comment @ * @; 1.1 date 2026.05.27.22.28.20; author wiz; state Exp; branches 1.1.2.1; next ; commitid JYUFKGwor6sIivHG; 1.1.2.1 date 2026.05.27.22.28.20; author maya; state dead; branches; next 1.1.2.2; commitid 7Lex1JUIlSbPTaJG; 1.1.2.2 date 2026.06.09.22.30.58; author maya; state Exp; branches; next ; commitid 7Lex1JUIlSbPTaJG; desc @@ 1.1 log @perl: apply upstream security fix for regex on 32-bit systems. Bump PKGREVISION. @ text @$NetBSD$ Perl/perl-security#147: test against the actual character lengths https://github.com/Perl/perl5/commit/5e7f119eb2bb1181be908701f22bf7068e722f1c --- regcomp_study.c.orig 2026-01-18 17:50:04.000000000 +0000 +++ regcomp_study.c @@@@ -2770,6 +2770,13 @@@@ Perl_study_chunk(pTHX_ (U8 *) SvEND(data->last_found)) - (U8*)s; l -= old; + + if (l > 0 && + (mincount >= SSize_t_MAX / (SSize_t)l + || old > SSize_t_MAX - mincount * (SSize_t)l)) { + FAIL("Regexp out of space"); + } + /* Get the added string: */ last_str = newSVpvn_utf8(s + old, l, UTF); last_chrs = UTF ? utf8_length((U8*)(s + old), @ 1.1.2.1 log @file patch-regcomp__study.c was added on branch pkgsrc-2026Q1 on 2026-06-09 22:30:58 +0000 @ text @d1 21 @ 1.1.2.2 log @Pullup ticket #7132 - requested by taca lang/perl5: Security fix Revisions pulled up: - lang/perl5/Makefile 1.292-1.293 - lang/perl5/distinfo 1.197-1.198 - lang/perl5/patches/patch-cpan_Archive-Tar_lib_Archive_Tar.pm 1.1 - lang/perl5/patches/patch-regcomp__study.c 1.1 --- Module Name: pkgsrc Committed By: wiz Date: Wed May 27 22:28:20 UTC 2026 Modified Files: pkgsrc/lang/perl5: Makefile distinfo Added Files: pkgsrc/lang/perl5/patches: patch-regcomp__study.c Log Message: perl: apply upstream security fix for regex on 32-bit systems. Bump PKGREVISION. --- Module Name: pkgsrc Committed By: wiz Date: Wed May 27 22:35:30 UTC 2026 Modified Files: pkgsrc/lang/perl5: Makefile distinfo Added Files: pkgsrc/lang/perl5/patches: patch-cpan_Archive-Tar_lib_Archive_Tar.pm Log Message: perl: fix security problem in Archive::Tar Archive::Tar versions before 3.10 for Perl allow memory exhaustion via attacker controlled entry size field in tar header Bump PKGREVISION. @ text @a0 21 $NetBSD: patch-regcomp__study.c,v 1.1 2026/05/27 22:28:20 wiz Exp $ Perl/perl-security#147: test against the actual character lengths https://github.com/Perl/perl5/commit/5e7f119eb2bb1181be908701f22bf7068e722f1c --- regcomp_study.c.orig 2026-01-18 17:50:04.000000000 +0000 +++ regcomp_study.c @@@@ -2770,6 +2770,13 @@@@ Perl_study_chunk(pTHX_ (U8 *) SvEND(data->last_found)) - (U8*)s; l -= old; + + if (l > 0 && + (mincount >= SSize_t_MAX / (SSize_t)l + || old > SSize_t_MAX - mincount * (SSize_t)l)) { + FAIL("Regexp out of space"); + } + /* Get the added string: */ last_str = newSVpvn_utf8(s + old, l, UTF); last_chrs = UTF ? utf8_length((U8*)(s + old), @