[packages/exim] Up to 4.100.2; security release (GCVE-25-2026-11-82-1)
arekm
arekm at pld-linux.org
Wed Nov 25 15:18:43 CET 2026
commit 528a11b3c9cb95bbf0999c42e24f7cd8972e8177
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Wed Nov 25 14:52:13 2026 +0100
Up to 4.100.2; security release (GCVE-25-2026-11-82-1)
branch.sh | 2 +-
exim-eval-overflow-check.patch | 32 +++++++++++
exim-extract-field-bounds.patch | 84 ++++++++++++++++++++++++++++
exim-extract-leading-digits.patch | 113 ++++++++++++++++++++++++++++++++++++++
exim-forall-json-unwrap.patch | 25 +++++++++
exim.spec | 17 ++++--
6 files changed, 268 insertions(+), 5 deletions(-)
---
diff --git a/exim.spec b/exim.spec
index b3c9350..1e7dd76 100644
--- a/exim.spec
+++ b/exim.spec
@@ -22,15 +22,15 @@ Summary: University of Cambridge Mail Transfer Agent
Summary(pl.UTF-8): Agent Transferu Poczty Uniwersytetu w Cambridge
Summary(pt_BR.UTF-8): Servidor de correio eletrônico exim
Name: exim
-Version: 4.100.1
-Release: 3
+Version: 4.100.2
+Release: 1
Epoch: 2
License: GPL v2+
Group: Networking/Daemons/SMTP
Source0: https://ftp.exim.org/pub/exim/exim4/%{name}-%{version}.tar.bz2
-# Source0-md5: 925a55dba4269090520636711e451c47
+# Source0-md5: 7ed18227f8426a080f60e14f26f91ff2
Source1: https://ftp.exim.org/pub/exim/exim4/%{name}-html-%{version}.tar.bz2
-# Source1-md5: 3b81fdbe565503485eb6700f5a5d4464
+# Source1-md5: 9f42c57d05aaeb23ff1098168adf2a2a
Source2: %{name}.init
Source3: %{name}.cron.db
Source4: %{name}4.conf
@@ -59,6 +59,11 @@ Patch4: %{name}4-Makefile-Default.patch
Patch5: 90_localscan_dlopen.dpatch
Patch6: %{name}-spam-timeout.patch
Patch7: autoreply-return-path.patch
+Patch8: %{name}-extract-leading-digits.patch
+# Patch8 widens the field number; this bounds it before the int conversion
+Patch9: %{name}-extract-field-bounds.patch
+Patch10: %{name}-eval-overflow-check.patch
+Patch11: %{name}-forall-json-unwrap.patch
URL: http://www.exim.org/
%{?with_sasl:BuildRequires: cyrus-sasl-devel >= 2.1.0}
BuildRequires: db-devel
@@ -201,6 +206,10 @@ Pliki nagłówkowe dla Exima.
%patch -P5 -p1
%patch -P6 -p1
%patch -P7 -p2
+%patch -P8 -p1
+%patch -P9 -p1
+%patch -P10 -p1
+%patch -P11 -p1
# fixup version
sed -i 's/^[[:space:]]*#define[[:space:]]\+EXIM_RELEASE_VERSION[[:space:]]\+".*"/#define EXIM_RELEASE_VERSION "%{version}"/' src/version.h
diff --git a/branch.sh b/branch.sh
index d04ce9f..4612de2 100755
--- a/branch.sh
+++ b/branch.sh
@@ -2,7 +2,7 @@
set -e
url=https://code.exim.org/exim/exim.git
package=exim
-tag=4.100.1
+tag=4.100.2
#branch=exim-4.97+fixes
branch=master
out=$package-git.patch
diff --git a/exim-eval-overflow-check.patch b/exim-eval-overflow-check.patch
new file mode 100644
index 0000000..f1ef504
--- /dev/null
+++ b/exim-eval-overflow-check.patch
@@ -0,0 +1,32 @@
+Expansions: detect overflow in ${eval} sum and difference exactly
+
+The check compared x with itself, so a sum or difference with x >= 2^62
+failed even for 1. Upstream 274bc85d fixed the typo, but the check stays
+heuristic: MAX + 1 then wraps silently, and differences were never caught.
+
+Based-on: https://code.exim.org/exim/exim/commit/274bc85d924dcb682dbdd7a870ca5dcdb5056dbf
+---
+diff --git a/src/expand.c b/src/expand.c
+index bc56821..266b664 100644
+--- a/src/expand.c
++++ b/src/expand.c
+@@ -4436,14 +4436,15 @@ if (!*error)
+ {
+ int_eximarith_t y = eval_op_mult(&s, decimal, error);
+ if (*error) break;
+- if ( (x >= EXIM_ARITH_MAX/2 && x >= EXIM_ARITH_MAX/2)
+- || (x <= -(EXIM_ARITH_MAX/2) && y <= -(EXIM_ARITH_MAX/2)))
+- { /* over-conservative check */
++ int_eximarith_t r;
++ if (isplus ? __builtin_add_overflow(x, y, &r)
++ : __builtin_sub_overflow(x, y, &r))
++ {
+ *error = isplus ? US"overflow in sum" : US"overflow in difference";
+ break;
+ }
+ eval_dbg_op_2(isplus ? US"plus" : US"minus", x, y);
+- if (isplus) x += y; else x -= y;
++ x = r;
+ eval_dbg_res(x);
+ }
+ expand_level--;
diff --git a/exim-extract-field-bounds.patch b/exim-extract-field-bounds.patch
new file mode 100644
index 0000000..7e4dbf3
--- /dev/null
+++ b/exim-extract-field-bounds.patch
@@ -0,0 +1,84 @@
+From: Jeremy Harris <jgh146exb at wizmail.org>
+Subject: Expansions: harden extract, listextract
+
+Upstream: https://code.exim.org/exim/exim/commit/521d8624fcd59762148a4e9023724abc56c79f60
+---
+diff --git a/src/expand.c b/src/expand.c
+index a9d4cb9..bc56821 100644
+--- a/src/expand.c
++++ b/src/expand.c
+@@ -1288,7 +1288,7 @@ static uschar *
+ expand_gettokened (int field, const uschar * separators, uschar * s)
+ {
+ int sep = 1, count;
+-uschar * ss = s, * fieldtext = NULL;
++uschar * fieldtext = NULL;
+
+ if (field == 0) return s;
+
+@@ -1298,7 +1298,7 @@ the string, counting the number of fields. */
+
+ count = field > 0 ? field : INT_MAX;
+
+-while (count-- > 0)
++for (uschar * ss = s; count-- > 0; )
+ {
+ size_t len;
+
+@@ -1320,12 +1320,12 @@ while (count-- > 0)
+ }
+
+ /* Previous field was not last in the string; save its start and put a
+- zero at its end. */
++ NUL at its end. */
+
+ fieldtext = ss;
+ len = Ustrcspn(ss, separators);
+ sep = ss[len];
+- ss[len] = 0;
++ ss[len] = '\0';
+ ss += len + 1;
+ }
+
+@@ -6453,7 +6453,7 @@ while (*s) /* known to be untainted */
+ field_number = Ustrtol(p, &p, 10);
+ if (!*p)
+ {
+- if (field_number > 10000)
++ if (field_number > 10000 || field_number < -10000)
+ {
+ expand_string_message = US"extract: field number too large";
+ goto EXPAND_FAILED;
+@@ -6631,9 +6631,8 @@ while (*s) /* known to be untainted */
+
+ if (i == 0)
+ {
+- int len;
+- int x = 0;
+- uschar *p = sub[0];
++ int x = 0, len;
++ uschar * p = sub[0];
+
+ Uskip_whitespace(&p);
+ sub[0] = p;
+@@ -6654,13 +6653,19 @@ while (*s) /* known to be untainted */
+ field_number = -1;
+ p++;
+ }
+- while (*p && isdigit(*p)) x = x * 10 + *p++ - '0';
++ while (*p && isdigit(*p))
++ if ((x = x * 10 + *p++ - '0') > 10000)
++ {
++ expand_string_message = US"listextract: field number too large";
++ goto EXPAND_FAILED;
++ }
+ if (*p)
+ {
+ expand_string_message = US"first argument of \"listextract\" must "
+ "be numeric";
+ goto EXPAND_FAILED;
+ }
++
+ field_number *= x;
+ }
+ }
diff --git a/exim-extract-leading-digits.patch b/exim-extract-leading-digits.patch
new file mode 100644
index 0000000..4997f91
--- /dev/null
+++ b/exim-extract-leading-digits.patch
@@ -0,0 +1,113 @@
+From: Jeremy Harris <jgh146exb at wizmail.org>
+Subject: Fix ${extract } for field name-with-leading-digits. Bug 3245
+
+Broken-by: 7fcacbc7cd
+Upstream: https://code.exim.org/exim/exim/commit/7e3fe40280f9a7b133345d6485ae0e3443942ce9
+---
+diff --git a/src/expand.c b/src/expand.c
+index 01c69a0..a9d4cb9 100644
+--- a/src/expand.c
++++ b/src/expand.c
+@@ -1287,10 +1287,8 @@ Returns: NULL if the field was not found,
+ static uschar *
+ expand_gettokened (int field, const uschar * separators, uschar * s)
+ {
+-int sep = 1;
+-int count;
+-uschar *ss = s;
+-uschar *fieldtext = NULL;
++int sep = 1, count;
++uschar * ss = s, * fieldtext = NULL;
+
+ if (field == 0) return s;
+
+@@ -1298,7 +1296,7 @@ if (field == 0) return s;
+ done the number of fields we want. For field < 0 we continue till the end of
+ the string, counting the number of fields. */
+
+-count = (field > 0)? field : INT_MAX;
++count = field > 0 ? field : INT_MAX;
+
+ while (count-- > 0)
+ {
+@@ -1315,7 +1313,7 @@ while (count-- > 0)
+ while (field++ < 0)
+ {
+ ss--;
+- while (ss[-1] != 0) ss--;
++ while (ss[-1]) ss--;
+ }
+ fieldtext = ss;
+ break;
+@@ -6359,7 +6357,7 @@ while (*s) /* known to be untainted */
+
+ case EITEM_EXTRACT:
+ {
+- int field_number = 1;
++ long field_number = 1;
+ BOOL field_number_set = FALSE;
+ uschar * save_lookup_value = lookup_value, * sub[3];
+ int save_expand_nmax =
+@@ -6368,7 +6366,7 @@ while (*s) /* known to be untainted */
+ /* On reflection the original behaviour of extract-json for a string
+ result, leaving it quoted, was a mistake. But it was already published,
+ hence the addition of jsons. In a future major version, make json
+- work like josons, and withdraw jsons. */
++ work like jsons, and withdraw jsons. */
+
+ enum {extract_basic, extract_json, extract_jsons} fmt = extract_basic;
+
+@@ -6413,7 +6411,8 @@ while (*s) /* known to be untainted */
+ }
+ }
+
+- else for (int i = 0, j = 2; i < j; i++) /* Read the proper number of arguments */
++ else /* Read the proper number of arguments: key, ?separators, subject */
++ for (int i = 0, j = 2; i < j; i++)
+ {
+ if (Uskip_whitespace(&s) == '{') /*'}'*/
+ {
+@@ -6435,7 +6434,6 @@ while (*s) /* known to be untainted */
+ if (i == 0)
+ {
+ int len;
+- int x = 0;
+ uschar * p = sub[0];
+
+ Uskip_whitespace(&p);
+@@ -6452,23 +6450,14 @@ while (*s) /* known to be untainted */
+ goto EXPAND_FAILED;
+ }
+
+- if (*p == '-')
++ field_number = Ustrtol(p, &p, 10);
++ if (!*p)
+ {
+- field_number = -1;
+- p++;
+- }
+- for (int digits = 0; isdigit(*p); digits++)
+- if (digits > 5)
++ if (field_number > 10000)
+ {
+ expand_string_message = US"extract: field number too large";
+ goto EXPAND_FAILED;
+ }
+- else
+- x = x * 10 + *p++ - '0';
+-
+- if (!*p)
+- {
+- field_number *= x;
+ if (fmt == extract_basic) j = 3; /* Need 3 args */
+ field_number_set = TRUE;
+ }
+@@ -6492,7 +6481,7 @@ while (*s) /* known to be untainted */
+ {
+ case extract_basic:
+ lookup_value = field_number_set
+- ? expand_gettokened(field_number, sub[1], sub[2])
++ ? expand_gettokened((int)field_number, sub[1], sub[2])
+ : expand_getkeyed(sub[0], sub[1]);
+ break;
+
diff --git a/exim-forall-json-unwrap.patch b/exim-forall-json-unwrap.patch
new file mode 100644
index 0000000..1385511
--- /dev/null
+++ b/exim-forall-json-unwrap.patch
@@ -0,0 +1,25 @@
+Expansions: fix crash in forall_json/forany_json on an unwrappable list
+
+dewrap() returns NULL for a list without its [ ], and json_nextinlist()
+then dereferences it. A skipped condition always hits this, as its list
+expands to an empty string, e.g. ${if or{{true}{forany_json{[1]}{...}}}}.
+---
+diff --git a/src/expand.c b/src/expand.c
+index 266b664..69cab30 100644
+--- a/src/expand.c
++++ b/src/expand.c
+@@ -3549,7 +3549,13 @@ switch(cond_type = identify_operator(&s, &opname))
+
+ if (yield) *yield = !testfor;
+ list = sub[0];
+- if (is_json) list = dewrap(string_copy(list), US"[]");
++ /* When skipping, sub[0] is empty and must not be unwrapped */
++ if (is_json && yield && !(list = dewrap(string_copy(list), US"[]")))
++ {
++ expand_string_message = string_sprintf("%s wrapping list for %s",
++ expand_string_message, opname);
++ goto failout;
++ }
+ while ((iterate_item = is_json
+ ? json_nextinlist(&list) : string_nextinlist(&list, &sep, NULL, 0)))
+ {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/exim.git/commitdiff/528a11b3c9cb95bbf0999c42e24f7cd8972e8177
More information about the pld-cvs-commit
mailing list