Source: perl
Version: 5.40.1-4
Severity: normal
Tags: patch
User: [email protected]
Usertags: ftcbfs

The upstream changes for CVE-2025-40909 introduced a new Configure
variable `d_fdopendir`. Unfortunately this broke cross builds as seen
at http://crossqa.debian.net/src/perl because I didn't think of updating
the bundled support files [1].

A minimal fix is to add

 d_fdopendir='define'

to the config.sh.static files under debian/cross/, as in the attached
patch. Some of those files are outdated as the architectures are not
built on the buildds anymore etc., but it seems easiest to update them
all for this.  The extra variable should not hurt in any case.

I have tested that this fixes cross building an armhf package on amd64.

I'll try to get this in trixie if it's not too late. The files in
debian/cross are not used for anything during native builds, so the risk
of regressions is very low.

[1] Building Perl currently requires running native probes with the
    Configure script. Fixing this to support cross builds is not
    trivial. So we work around it by bundling the configuration
    information from native builds in the source package, and using
    those for cross building. While this is far from the desired goal
    of full cross build support, the approach at least keeps the rest
    of the machinery working.

    See debian/cross/README for more information.

-- 
Niko Tyni   [email protected]
>From 466f731b016573f5df1f4ff5094727e3fe92d23e Mon Sep 17 00:00:00 2001
From: Niko Tyni <[email protected]>
Date: Sun, 27 Jul 2025 13:15:41 +0300
Subject: [PATCH] Update cross support files for CVE-2025-40909

---
 debian/cross/alpha/config.sh.static          | 1 +
 debian/cross/amd64/config.sh.static          | 1 +
 debian/cross/arm64/config.sh.static          | 1 +
 debian/cross/armel/config.sh.static          | 1 +
 debian/cross/armhf/config.sh.static          | 1 +
 debian/cross/hppa/config.sh.static           | 1 +
 debian/cross/hurd-amd64/config.sh.static     | 1 +
 debian/cross/hurd-i386/config.sh.static      | 1 +
 debian/cross/i386/config.sh.static           | 1 +
 debian/cross/ia64/config.sh.static           | 1 +
 debian/cross/kfreebsd-amd64/config.sh.static | 1 +
 debian/cross/kfreebsd-i386/config.sh.static  | 1 +
 debian/cross/loong64/config.sh.static        | 1 +
 debian/cross/m68k/config.sh.static           | 1 +
 debian/cross/mips/config.sh.static           | 1 +
 debian/cross/mips64el/config.sh.static       | 1 +
 debian/cross/mipsel/config.sh.static         | 1 +
 debian/cross/powerpc/config.sh.static        | 1 +
 debian/cross/powerpcspe/config.sh.static     | 1 +
 debian/cross/ppc64/config.sh.static          | 1 +
 debian/cross/ppc64el/config.sh.static        | 1 +
 debian/cross/riscv64/config.sh.static        | 1 +
 debian/cross/s390x/config.sh.static          | 1 +
 debian/cross/sh4/config.sh.static            | 1 +
 debian/cross/sparc64/config.sh.static        | 1 +
 debian/cross/x32/config.sh.static            | 1 +
 26 files changed, 26 insertions(+)

diff --git a/debian/cross/alpha/config.sh.static b/debian/cross/alpha/config.sh.static
index a2c3678c4..c783a286a 100644
--- a/debian/cross/alpha/config.sh.static
+++ b/debian/cross/alpha/config.sh.static
@@ -259,6 +259,7 @@ d_fd_macros='define'
 d_fd_set='define'
 d_fdclose='undef'
 d_fdim='define'
+d_fdopendir='define'
 d_fds_bits='define'
 d_fegetround='define'
 d_ffs='define'
diff --git a/debian/cross/amd64/config.sh.static b/debian/cross/amd64/config.sh.static
index 8217b6ff2..d6706b7ee 100644
--- a/debian/cross/amd64/config.sh.static
+++ b/debian/cross/amd64/config.sh.static
@@ -259,6 +259,7 @@ d_fd_macros='define'
 d_fd_set='define'
 d_fdclose='undef'
 d_fdim='define'
+d_fdopendir='define'
 d_fds_bits='define'
 d_fegetround='define'
 d_ffs='define'
diff --git a/debian/cross/arm64/config.sh.static b/debian/cross/arm64/config.sh.static
index 87a73062d..891340e99 100644
--- a/debian/cross/arm64/config.sh.static
+++ b/debian/cross/arm64/config.sh.static
@@ -259,6 +259,7 @@ d_fd_macros='define'
 d_fd_set='define'
 d_fdclose='undef'
 d_fdim='define'
+d_fdopendir='define'
 d_fds_bits='define'
 d_fegetround='define'
 d_ffs='define'
diff --git a/debian/cross/armel/config.sh.static b/debian/cross/armel/config.sh.static
index 1116dce8c..d8db4c792 100644
--- a/debian/cross/armel/config.sh.static
+++ b/debian/cross/armel/config.sh.static
@@ -259,6 +259,7 @@ d_fd_macros='define'
 d_fd_set='define'
 d_fdclose='undef'
 d_fdim='define'
+d_fdopendir='define'
 d_fds_bits='define'
 d_fegetround='define'
 d_ffs='define'
diff --git a/debian/cross/armhf/config.sh.static b/debian/cross/armhf/config.sh.static
index 238aaffa5..db77e0d1e 100644
--- a/debian/cross/armhf/config.sh.static
+++ b/debian/cross/armhf/config.sh.static
@@ -259,6 +259,7 @@ d_fd_macros='define'
 d_fd_set='define'
 d_fdclose='undef'
 d_fdim='define'
+d_fdopendir='define'
 d_fds_bits='define'
 d_fegetround='define'
 d_ffs='define'
diff --git a/debian/cross/hppa/config.sh.static b/debian/cross/hppa/config.sh.static
index 8afde8d7e..0e78b4fb5 100644
--- a/debian/cross/hppa/config.sh.static
+++ b/debian/cross/hppa/config.sh.static
@@ -259,6 +259,7 @@ d_fd_macros='define'
 d_fd_set='define'
 d_fdclose='undef'
 d_fdim='define'
+d_fdopendir='define'
 d_fds_bits='define'
 d_fegetround='define'
 d_ffs='define'
diff --git a/debian/cross/hurd-amd64/config.sh.static b/debian/cross/hurd-amd64/config.sh.static
index 3dc7e7040..b75b51a47 100644
--- a/debian/cross/hurd-amd64/config.sh.static
+++ b/debian/cross/hurd-amd64/config.sh.static
@@ -259,6 +259,7 @@ d_fd_macros='define'
 d_fd_set='define'
 d_fdclose='undef'
 d_fdim='define'
+d_fdopendir='define'
 d_fds_bits='define'
 d_fegetround='define'
 d_ffs='define'
diff --git a/debian/cross/hurd-i386/config.sh.static b/debian/cross/hurd-i386/config.sh.static
index 14222c065..b848f9ad6 100644
--- a/debian/cross/hurd-i386/config.sh.static
+++ b/debian/cross/hurd-i386/config.sh.static
@@ -259,6 +259,7 @@ d_fd_macros='define'
 d_fd_set='define'
 d_fdclose='undef'
 d_fdim='define'
+d_fdopendir='define'
 d_fds_bits='define'
 d_fegetround='define'
 d_ffs='define'
diff --git a/debian/cross/i386/config.sh.static b/debian/cross/i386/config.sh.static
index f52a9f784..3fe672d97 100644
--- a/debian/cross/i386/config.sh.static
+++ b/debian/cross/i386/config.sh.static
@@ -259,6 +259,7 @@ d_fd_macros='define'
 d_fd_set='define'
 d_fdclose='undef'
 d_fdim='define'
+d_fdopendir='define'
 d_fds_bits='define'
 d_fegetround='define'
 d_ffs='define'
diff --git a/debian/cross/ia64/config.sh.static b/debian/cross/ia64/config.sh.static
index f71517641..90d4dd88a 100644
--- a/debian/cross/ia64/config.sh.static
+++ b/debian/cross/ia64/config.sh.static
@@ -259,6 +259,7 @@ d_fd_macros='define'
 d_fd_set='define'
 d_fdclose='undef'
 d_fdim='define'
+d_fdopendir='define'
 d_fds_bits='define'
 d_fegetround='define'
 d_ffs='define'
diff --git a/debian/cross/kfreebsd-amd64/config.sh.static b/debian/cross/kfreebsd-amd64/config.sh.static
index ba1aa0f6f..7d7e7b438 100644
--- a/debian/cross/kfreebsd-amd64/config.sh.static
+++ b/debian/cross/kfreebsd-amd64/config.sh.static
@@ -256,6 +256,7 @@ d_fd_macros='define'
 d_fd_set='define'
 d_fdclose='undef'
 d_fdim='define'
+d_fdopendir='define'
 d_fds_bits='define'
 d_fegetround='define'
 d_fgetpos='define'
diff --git a/debian/cross/kfreebsd-i386/config.sh.static b/debian/cross/kfreebsd-i386/config.sh.static
index 21a0991df..550a05dbf 100644
--- a/debian/cross/kfreebsd-i386/config.sh.static
+++ b/debian/cross/kfreebsd-i386/config.sh.static
@@ -256,6 +256,7 @@ d_fd_macros='define'
 d_fd_set='define'
 d_fdclose='undef'
 d_fdim='define'
+d_fdopendir='define'
 d_fds_bits='define'
 d_fegetround='define'
 d_fgetpos='define'
diff --git a/debian/cross/loong64/config.sh.static b/debian/cross/loong64/config.sh.static
index 848dd9ac1..cd2e50a18 100644
--- a/debian/cross/loong64/config.sh.static
+++ b/debian/cross/loong64/config.sh.static
@@ -259,6 +259,7 @@ d_fd_macros='define'
 d_fd_set='define'
 d_fdclose='undef'
 d_fdim='define'
+d_fdopendir='define'
 d_fds_bits='define'
 d_fegetround='define'
 d_ffs='define'
diff --git a/debian/cross/m68k/config.sh.static b/debian/cross/m68k/config.sh.static
index ea2f983c0..aaa3f51bc 100644
--- a/debian/cross/m68k/config.sh.static
+++ b/debian/cross/m68k/config.sh.static
@@ -259,6 +259,7 @@ d_fd_macros='define'
 d_fd_set='define'
 d_fdclose='undef'
 d_fdim='define'
+d_fdopendir='define'
 d_fds_bits='define'
 d_fegetround='define'
 d_ffs='define'
diff --git a/debian/cross/mips/config.sh.static b/debian/cross/mips/config.sh.static
index 28fb9e69d..87774a4b0 100644
--- a/debian/cross/mips/config.sh.static
+++ b/debian/cross/mips/config.sh.static
@@ -255,6 +255,7 @@ d_fd_macros='define'
 d_fd_set='define'
 d_fdclose='undef'
 d_fdim='define'
+d_fdopendir='define'
 d_fds_bits='define'
 d_fegetround='define'
 d_fgetpos='define'
diff --git a/debian/cross/mips64el/config.sh.static b/debian/cross/mips64el/config.sh.static
index 668597a78..219591bdc 100644
--- a/debian/cross/mips64el/config.sh.static
+++ b/debian/cross/mips64el/config.sh.static
@@ -259,6 +259,7 @@ d_fd_macros='define'
 d_fd_set='define'
 d_fdclose='undef'
 d_fdim='define'
+d_fdopendir='define'
 d_fds_bits='define'
 d_fegetround='define'
 d_ffs='define'
diff --git a/debian/cross/mipsel/config.sh.static b/debian/cross/mipsel/config.sh.static
index 3edf14653..9d13b6f6a 100644
--- a/debian/cross/mipsel/config.sh.static
+++ b/debian/cross/mipsel/config.sh.static
@@ -256,6 +256,7 @@ d_fd_macros='define'
 d_fd_set='define'
 d_fdclose='undef'
 d_fdim='define'
+d_fdopendir='define'
 d_fds_bits='define'
 d_fegetround='define'
 d_ffs='define'
diff --git a/debian/cross/powerpc/config.sh.static b/debian/cross/powerpc/config.sh.static
index e4b53bdd8..adcc7abd3 100644
--- a/debian/cross/powerpc/config.sh.static
+++ b/debian/cross/powerpc/config.sh.static
@@ -259,6 +259,7 @@ d_fd_macros='define'
 d_fd_set='define'
 d_fdclose='undef'
 d_fdim='define'
+d_fdopendir='define'
 d_fds_bits='define'
 d_fegetround='define'
 d_ffs='define'
diff --git a/debian/cross/powerpcspe/config.sh.static b/debian/cross/powerpcspe/config.sh.static
index 1287e44d4..3d6ea6624 100644
--- a/debian/cross/powerpcspe/config.sh.static
+++ b/debian/cross/powerpcspe/config.sh.static
@@ -255,6 +255,7 @@ d_fd_macros='define'
 d_fd_set='define'
 d_fdclose='undef'
 d_fdim='define'
+d_fdopendir='define'
 d_fds_bits='define'
 d_fegetround='define'
 d_fgetpos='define'
diff --git a/debian/cross/ppc64/config.sh.static b/debian/cross/ppc64/config.sh.static
index bfe5ff568..45f1db8bc 100644
--- a/debian/cross/ppc64/config.sh.static
+++ b/debian/cross/ppc64/config.sh.static
@@ -259,6 +259,7 @@ d_fd_macros='define'
 d_fd_set='define'
 d_fdclose='undef'
 d_fdim='define'
+d_fdopendir='define'
 d_fds_bits='define'
 d_fegetround='define'
 d_ffs='define'
diff --git a/debian/cross/ppc64el/config.sh.static b/debian/cross/ppc64el/config.sh.static
index 13323605e..dab42835a 100644
--- a/debian/cross/ppc64el/config.sh.static
+++ b/debian/cross/ppc64el/config.sh.static
@@ -259,6 +259,7 @@ d_fd_macros='define'
 d_fd_set='define'
 d_fdclose='undef'
 d_fdim='define'
+d_fdopendir='define'
 d_fds_bits='define'
 d_fegetround='define'
 d_ffs='define'
diff --git a/debian/cross/riscv64/config.sh.static b/debian/cross/riscv64/config.sh.static
index ce4aa36c7..71746beac 100644
--- a/debian/cross/riscv64/config.sh.static
+++ b/debian/cross/riscv64/config.sh.static
@@ -259,6 +259,7 @@ d_fd_macros='define'
 d_fd_set='define'
 d_fdclose='undef'
 d_fdim='define'
+d_fdopendir='define'
 d_fds_bits='define'
 d_fegetround='define'
 d_ffs='define'
diff --git a/debian/cross/s390x/config.sh.static b/debian/cross/s390x/config.sh.static
index 3928c582d..0c5b1a8b3 100644
--- a/debian/cross/s390x/config.sh.static
+++ b/debian/cross/s390x/config.sh.static
@@ -259,6 +259,7 @@ d_fd_macros='define'
 d_fd_set='define'
 d_fdclose='undef'
 d_fdim='define'
+d_fdopendir='define'
 d_fds_bits='define'
 d_fegetround='define'
 d_ffs='define'
diff --git a/debian/cross/sh4/config.sh.static b/debian/cross/sh4/config.sh.static
index 3800797e5..b85d22d4e 100644
--- a/debian/cross/sh4/config.sh.static
+++ b/debian/cross/sh4/config.sh.static
@@ -259,6 +259,7 @@ d_fd_macros='define'
 d_fd_set='define'
 d_fdclose='undef'
 d_fdim='define'
+d_fdopendir='define'
 d_fds_bits='define'
 d_fegetround='define'
 d_ffs='define'
diff --git a/debian/cross/sparc64/config.sh.static b/debian/cross/sparc64/config.sh.static
index cc4a9aa2b..fdfaa1e81 100644
--- a/debian/cross/sparc64/config.sh.static
+++ b/debian/cross/sparc64/config.sh.static
@@ -259,6 +259,7 @@ d_fd_macros='define'
 d_fd_set='define'
 d_fdclose='undef'
 d_fdim='define'
+d_fdopendir='define'
 d_fds_bits='define'
 d_fegetround='define'
 d_ffs='define'
diff --git a/debian/cross/x32/config.sh.static b/debian/cross/x32/config.sh.static
index a0d478f2a..6152a3550 100644
--- a/debian/cross/x32/config.sh.static
+++ b/debian/cross/x32/config.sh.static
@@ -259,6 +259,7 @@ d_fd_macros='define'
 d_fd_set='define'
 d_fdclose='undef'
 d_fdim='define'
+d_fdopendir='define'
 d_fds_bits='define'
 d_fegetround='define'
 d_ffs='define'
-- 
2.39.5

Reply via email to