🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.devel.release
Article #1208

Bug#1155674: trixie-pu: package postfix/3.10.15-0+deb13u0

#1208
From: Michael Tokarev
Date: Sat, 28 Nov 2026 20:30
581 lines
46891 bytes
Package: release.debian.org
Severity: normal
Tags: trixie
X-Debbugs-Cc: postfix@packages.debian.org
Control: affects -1 + src:postfix
User: release.debian.org@packages.debian.org
Usertags: pu

[ Reason ]
There's a new upstream stable/bugfix minor release of postfix
the mail transfer agent, fixing a number of various issues in
the code.  As the upstream author puts it, "This release addresses
medium-impact problems that need to be fixed as some enable local
information disclosure or SMTP client DOS."

[ Tests ]
This build of postfix for debian passed all our local tests,
including real-life usage for a while.  There's no regressions
noticed.  Also, these releases were tested by a lot of other
users worldwide, with no issues noticed.

[ Risks ]
As usually happens with postfix stable/bugfix minor releases,
the risk of breakage is very small.

[ Checklist ]
  [x] *all* changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in (old)stable
  [x] the issue is verified as fixed in unstable

[ Changes ]
Every change, with possibe impact and explanation, is explained in
d/changelog below, and also in the original release announcement,
https://www.postfix.org/announcements/postfix-3.11.8.html

Thanks,

/mjt

diff -Nru postfix-3.10.14/debian/changelog postfix-3.10.15/debian/changelog
--- postfix-3.10.14/debian/changelog	2026-09-08 15:31:38.000000000 +0300
+++ postfix-3.10.15/debian/changelog	2026-11-24 00:23:53.000000000 +0300
@@ -1,3 +1,114 @@
+postfix (3.10.15-0+deb13u0) trixie; urgency=medium
+
+  * new upstream stable/bugfix/security release
+    From the release announcement by Wietse Wenema at
+    https://www.postfix.org/announcements/postfix-3.11.8.html :
+
+  o Incompatible changes
+
+   - [TLS protocol configuration syntax change] Relevant if your configuration
+     contains ">=" or "<=" followed by SPACE.  To avoid breakingi
+     configurations, Postfix will now treat ">= SPACE protocol-name" as
+     ">=protocol-name, and "<= SPACE protocol-name" as "<=protocol-name".
+     The forms "<=" or ">=" (i.e. not attached to a protocol name) were
+     treated as "<=0x0" or ">=0x0" (i.e. no upper or lower bound) and are
+     now treated as syntax errors.  Solution: look for "<=" or ">=" followed
+     by SPACE and correct the syntax.
+
+   - [SMTP client DNS total time limit] Relevant if you are sending mail over
+     very slow network connections to domains with a huge number of SMTP server
+     IP addresses.  The Postfix SMTP client now enforces a 100-second time
+     limit on SMTP server IP address lookups per delivery request.  This
+     reduces the impact from denial of service attacks in which a hostile DNS
+     operator returns up to 100 MX host names and deliberately lets each
+     address lookup request time out.
+
+   - [:include: /path/to/file read permission] Relevant if your root-owned
+     aliases file contains ":include:/path/to/file", where "/path/to/file" is
+     a symlink or hardlink to a file with a different owner than the "/path/to"
+     directory.  The Postfix local delivery agent will now defer delivery if
+     the "/path/to" owner has no permission to read "/path/to/file".
+     Workaround: make /path/to/file world-readable.
+
+  * Bugfixes:
+
+  o Local information leak:
+
+   - A compromised mailing list manager could replace a local(8) :include:
+     file, referenced in a root-owned alias database, with a hardlink or
+     symlink to a restricted file (not world readable), and reveal that
+     file's content in bounce messages.
+
+  o Denial of service:
+
+   - A hostile DNS operator could return a large number of MX hostnames
+     to the Postfix SMTP client, and deliberately let each SMTP server
+     IP address lookup request time out.
+
+   - The Postfix SMTP client did not count an empty reply line towards the
+     reply size limit, but still added an empty line entry to the in-memory
+     session history.  An SMTP server that replies with a stream of empty
+     lines could run an SMTP client process out of memory and degrade
+     performance of concurrent deliveries.
+
+  o Panic, crash:
+
+   - Unnecessary panic() while parsing a TLS policy with a 1-character
+     "match=" fingerprint.
+
+   - Null pointer read error in "sendmail -bs" (stand-alone SMTP server mode)
+     while rejecting a large SIZE parameter value in a MAIL FROM command.
+
+  o Milter support:
+
+   - With Milter support enabled, and "non_empty_end_of_header_action =
+     add_header" (not the default), Postfix wrote the "MIME-Error:" header
+     AFTER a dummy "header append" PTR record.  This caused Postfix's Milter
+     client to treat that header as body content instead of header content.
+
+   - When "milter_default_action = accept", and a Milter connection was lost
+     or aborted while a "replace body" request was in progress, the Postfix
+     cleanup daemon committed the queue file in an undefined state (with
+     pre-replacement body content which would still be consistent with the
+     'default accept' policy, or with partial new content which caused the
+     message to end up in the "corrupt" queue).
+
+   - When Postfix negotiated a new non_smtpd_milters connection and the Milter
+     sent a list of macro names, Postfix replaced a previously received list
+     from that Milter without freeing the old list's memory, resulting in a
+     small memory leak.  If the Milter did not send a per-milter macro name
+     list over a new connection, Postfix reused the list that was received
+     over an earlier connection with that same Milter.
+
+  o Other TLS support:
+
+   - when parsing TLS protocol bounds, Postfix treated a bare "<=" or ">="
+     (i.e. not attached to a protocol name) as "<=0x0" or ">=0x0" (i.e. no
+     upper or lower bound).  These forms are now treated as a syntax error.
+     Except, to avoid breaking existing configurations, Postfix will treat
+     ">= SPACE protocol-name" as ">=protocol-name, and "<= SPACE protocol-name"
+     as "<=protocol-name".
+
+  o SMTPUTF8 protocol support (SMTP client):
+
+   - With "smtputf8_enable = yes" (default setting) the Postfix SMTP client
+     could send unencoded content in the ORCPT parameter while sending
+     RCPT TO, because the internal uxtext_quote() function failed to propagate
+     an error condition.  This bug is unlikely in practice, because the
+     Postfix SMTP server accepts non-UTF8 content in an ORCPT parameter only
+     with "smtputf8_enable = no" (not a default setting).
+
+  o Other:
+
+   - Whitespace in an envelope address domain portion caused corruption of the
+     From_ line that separates messages in a mailbox file.
+
+   - A nested "MAIL FROM" command could reset ESMTP parameters for the still
+     active "MAIL FROM" transaction; ESMTP parameters specified in a rejected
+    "MAIL FROM" command could leak into the next "MAIL FROM" transaction.
+
+ -- Michael Tokarev <mjt@tls.msk.ru>  Tue, 24 Nov 2026 00:23:53 +0300
+
 postfix (3.10.14-0+deb13u1) trixie; urgency=medium
 
   * new upstream stable/bugfix/security release
diff -Nru postfix-3.10.14/HISTORY postfix-3.10.15/HISTORY
--- postfix-3.10.14/HISTORY	2026-09-06 17:10:47.000000000 +0300
+++ postfix-3.10.15/HISTORY	2026-11-20 22:39:36.000000000 +0300
@@ -29866,3 +29866,122 @@
 	command and crash the Postfix SMTP server with a null pointer
 	read error. Reported by Wonyoung Jung (정원영). File:
 	smtpd/smtpd.c.
+
+20261030
+
+	Bugfix (defect introduced: Postfix 1.0 and various later):
+	a nested "MAIL FROM" command could reset ESMTP parameters
+	for the still active "MAIL FROM" transaction; ESMTP parameters
+	specified in a rejected "MAIL FROM" command could leak into
+	the next "MAIL FROM" transaction. Fixed by resetting "MAIL
+	FROM" ESMTP parameters after the check for nested "MAIL
+	FROM" commands, and by adding missing SIZE and AUTH
+	initializations. Problem and fix by coredump.ws with Claude
+	Opus 5.5. File: smtpd.c.
+
+20261101
+
+	Bugfix (defect introduced: Postfix alpha, date: 19980804):
+	null pointer read error in "sendmail -bs" stand-alone mode
+	while rejecting a large SIZE parameter value in a MAIL FROM
+	command. Problem report and fix by coredump.ws assisted
+	by Claude Opus 5.5. File: smtpd.c.
+
+	Bugfix (defect introduced: Postfix 3.6, date: 20200725):
+	when parsing TLS protocol bounds, Postfix treated a bare
+	"<=" or ">=" (i.e. not attached to a protocol name) as
+	"<=0x0" or ">=0x0" (i.e. no upper or lower bound). These
+	forms are now treated as a syntax error. Except, to avoid
+	breaking existing configurations, Postfix will treat ">=
+	SPACE protocol-name" as ">=protocol-name, and "<= SPACE
+	protocol-name" as "<=protocol-name". Problem reported by
+	coredump.ws, assisted by Claude Opus 5.5. Fix by Wietse.
+	File: tls_misc.c.
+
+20261102
+
+	Bugfix (defect introduced: Postfix 2.3, date: 20060511):
+	When "milter_default_action = accept", and a Milter connection
+	was lost or aborted while a "replace body" request was in
+	progress, the Postfix cleanup daemon committed the queue
+	file in an undefined state (with pre-replacement body content
+	which would still be consistent with the 'default accept'
+	policy, or with partial new content which caused the message
+	to end up in the "corrupt" queue). Reported by OpenAI
+	Security and other parties. Fix by Wietse (don't accept).
+	File: milter8.c.
+
+20261105
+
+	Bugfix (defect introduced: before Postfix alpha, date:
+	19970514): Whitespace in an envelope address domain portion
+	caused corruption of the mailbox From_ line that separates
+	messages. Problem reported by coredump.ws with assistance
+	from Claude Opus 5.5. Fix by Wietse: replace the domain
+	portion with "domain.invalid". File: global/mailbox.c. File:
+	mailbox.c.
+
+20261108
+
+	Bugfix (defect introduced: Postfix 2.5, date: 20071123):
+	When Postfix negotiated a new non_smtpd_milters connection
+	and the Milter sent a list of macro names, Postfix replaced
+	a previously received list from that Milter without freeing
+	the old list's memory, resulting in a small memory leak.
+	If the Milter did not send a per-milter macro name list
+	over a new connection, Postfix reused the list that was
+	received over an earlier connection with that same Milter.
+	Report and fix by coredump.ws assisted by Claude Opus 5.5.
+	File: milter8.c.
+
+20261111
+
+	Bugfix (defect introduced: Postfix 3.6, date: 20200718):
+	panic() while parsing a TLS policy with a 1-character
+	"match=" fingerprint. Report and fix by coredump.ws assisted
+	by Claude Opus 5.5. File: tls_dane.c.
+
+	Bugfix (defect introduced: Postfix 3.0, date: 20140715):
+	With "smtputf8_enable = yes" (default setting) the Postfix
+	SMTP client could send unencoded content in the ORCPT
+	parameter while sending RCPT TO, because the internal
+	uxtext_quote() function failed to propagate an error
+	condition. This bug is unlikely in practice, because the
+	Postfix SMTP server accepts non-UTF8 content in an ORCPT
+	parameter only with "smtputf8_enable = no" (not a default
+	setting). Reported by coredump.ws, found with fuzzing. File:
+	uxtext.c.
+
+	Robustness (defect introduced: Postfix 2.3, date: 20060511):
+	a hostile DNS operator could return up to 100 MX hostnames
+	to the Postfix SMTP client, and deliberately let each SMTP
+	server IP address lookup request time out. Problem reported
+	by coredump.ws assisted by pf-outbound. Fix by Wietse: stop
+	making queries after their combined elapsed time exceeds
+	100s per delivery request. File: smtp_addr.c.
+
+2026113
+
+	Safety: don't panic when vstring_alloc() is called with a
+	zero-length argument. File: vstring.c.
+
+20261115
+
+	Bug (defect introduced: Postfix before alpha, date: 19971211):
+	The Postfix SMTP client did not count an empty reply line
+	towards the reply size limit, but still added an empty line
+	entry to the in-memory session history. An SMTP server that
+	replies with a stream of empty lines could run an SMTP
+	client process out of memory and degrade performance of
+	concurrent deliveries. Problem report by macintog, fix by
+	Wietse and macintog. File: smtp_chat.c.
+
+20261116
+
+	Bugfix (defect introduced: Postfix beta, date: 19981104):
+	a compromised mailing list manager could replace a local(8)
+	:include: file, referenced in a root-owned alias database,
+	with a hardlink or symlink to a restricted file (not world
+	readable), and reveal that file's content in bounce messages.
+	Reported by Anton Klingspor assisted with AI, fixed by
+	Wietse. File: local/include.c.
diff -Nru postfix-3.10.14/README_FILES/RELEASE_NOTES postfix-3.10.15/README_FILES/RELEASE_NOTES
--- postfix-3.10.14/README_FILES/RELEASE_NOTES	2025-02-17 23:12:35.000000000 +0300
+++ postfix-3.10.15/README_FILES/RELEASE_NOTES	2026-11-23 02:39:41.000000000 +0300
@@ -26,6 +26,35 @@
 license of their choice. Those who are more comfortable with the
 IPL can continue with that license.
 
+Incompatible changes due to bugfixes
+------------------------------------
+
+Postfix 3.11.8, 3.10.15, 3.9.16, 3.8.22, 3.7.24, 3.6.22, 3.5.29:
+
+[TLS protocol syntax change] Relevant if your configuration contains
+">=" or "<=" followed by SPACE. To avoid breaking configurations,
+Postfix will now treat ">= SPACE protocol-name" as ">=protocol-name, and
+"<= SPACE protocol-name" as "<=protocol-name". The forms "<=" or ">="
+(i.e.  not attached to a protocol name) were treated as "<=0x0" or
+">=0x0" (i.e. no upper or lower bound) and are now treated as syntax
+errors. Solution: look for "<=" or ">=" followed by SPACE and correct
+the syntax.
+
+[SMTP client DNS total time limit] Relevant if you are sending mail
+over very slow network connections to domains with a huge number
+of SMTP server IP addresses. The Postfix SMTP client now enforces
+a 100-second time limit on SMTP server IP address lookups per
+delivery request. This reduces the impact from denial of service
+attacks in which a hostile DNS operator returns up to 100 MX host
+names and deliberately lets each address lookup request time out.
+
+[:include: /path/to/file read permission] Relevant if your root-owned
+aliases file contains ":include:/path/to/file", where "/path/to/file" is a
+symlink or hardlink to a file with a different owner than the "/path/to"
+directory. The Postfix local delivery agent will now defer delivery if
+the "/path/to" owner has no permission to read "/path/to/file".
+Workaround: make /path/to/file world-readable.
+
 Major changes - tls
 -------------------
 
diff -Nru postfix-3.10.14/RELEASE_NOTES postfix-3.10.15/RELEASE_NOTES
--- postfix-3.10.14/RELEASE_NOTES	2025-02-17 23:12:35.000000000 +0300
+++ postfix-3.10.15/RELEASE_NOTES	2026-11-23 02:39:41.000000000 +0300
@@ -26,6 +26,35 @@
 license of their choice. Those who are more comfortable with the
 IPL can continue with that license.
 
+Incompatible changes due to bugfixes
+------------------------------------
+
+Postfix 3.11.8, 3.10.15, 3.9.16, 3.8.22, 3.7.24, 3.6.22, 3.5.29:
+
+[TLS protocol syntax change] Relevant if your configuration contains
+">=" or "<=" followed by SPACE. To avoid breaking configurations,
+Postfix will now treat ">= SPACE protocol-name" as ">=protocol-name, and
+"<= SPACE protocol-name" as "<=protocol-name". The forms "<=" or ">="
+(i.e.  not attached to a protocol name) were treated as "<=0x0" or
+">=0x0" (i.e. no upper or lower bound) and are now treated as syntax
+errors. Solution: look for "<=" or ">=" followed by SPACE and correct
+the syntax.
+
+[SMTP client DNS total time limit] Relevant if you are sending mail
+over very slow network connections to domains with a huge number
+of SMTP server IP addresses. The Postfix SMTP client now enforces
+a 100-second time limit on SMTP server IP address lookups per
+delivery request. This reduces the impact from denial of service
+attacks in which a hostile DNS operator returns up to 100 MX host
+names and deliberately lets each address lookup request time out.
+
+[:include: /path/to/file read permission] Relevant if your root-owned
+aliases file contains ":include:/path/to/file", where "/path/to/file" is a
+symlink or hardlink to a file with a different owner than the "/path/to"
+directory. The Postfix local delivery agent will now defer delivery if
+the "/path/to" owner has no permission to read "/path/to/file".
+Workaround: make /path/to/file world-readable.
+
 Major changes - tls
 -------------------
 
diff -Nru postfix-3.10.14/src/global/Makefile.in postfix-3.10.15/src/global/Makefile.in
--- postfix-3.10.14/src/global/Makefile.in	2025-01-17 21:58:50.000000000 +0300
+++ postfix-3.10.15/src/global/Makefile.in	2026-11-20 21:04:17.000000000 +0300
@@ -1863,6 +1863,7 @@
 mail_copy.o: ../../include/safe_open.h
 mail_copy.o: ../../include/stringops.h
 mail_copy.o: ../../include/sys_defs.h
+mail_copy.o: ../../include/valid_hostname.h
 mail_copy.o: ../../include/vbuf.h
 mail_copy.o: ../../include/vstream.h
 mail_copy.o: ../../include/vstring.h
@@ -1882,6 +1883,7 @@
 mail_copy.o: rec_type.h
 mail_copy.o: record.h
 mail_copy.o: sys_exits.h
+mail_copy.o: valid_mailhost_addr.h
 mail_date.o: ../../include/check_arg.h
 mail_date.o: ../../include/msg.h
 mail_date.o: ../../include/sys_defs.h
diff -Nru postfix-3.10.14/src/global/mail_copy.c postfix-3.10.15/src/global/mail_copy.c
--- postfix-3.10.14/src/global/mail_copy.c	2024-10-11 01:15:20.000000000 +0300
+++ postfix-3.10.15/src/global/mail_copy.c	2026-11-20 21:04:17.000000000 +0300
@@ -128,6 +128,8 @@
 #include "mbox_open.h"
 #include "dsn_buf.h"
 #include "sys_exits.h"
+#include "valid_mailhost_addr.h"
+#include "valid_hostname.h"
 
 /* mail_copy - copy message with extreme prejudice */
 
@@ -181,9 +183,19 @@
      * Prepend a bunch of headers to the message.
      */
     if (flags & (MAIL_COPY_FROM | MAIL_COPY_RETURN_PATH)) {
+	char   *at;
+
 	if (sender == 0)
 	    msg_panic("%s: null sender", myname);
 	quote_822_local(buf, sender);
+	/* coredump.ws + Claude Opus 5.5: bad domain corrupts mailbox. */
+	if ((at = strrchr(vstring_str(buf), '@')) != 0
+	    && !valid_mailhost_literal(at + 1, DONT_GRIPE)
+	    && !valid_hostname(at + 1, DONT_GRIPE)) {
+	    msg_warn("replacing bad sender domain in: '%s'", vstring_str(buf));
+	    vstring_truncate(buf, at +1 - vstring_str(buf));
+	    vstring_strcat(buf, "domain.invalid");
+	}
 	if (flags & MAIL_COPY_FROM) {
 	    time(&now);
 	    vstream_fprintf(dst, "From %s  %.24s%s", *sender == 0 ?
diff -Nru postfix-3.10.14/src/global/mail_version.h postfix-3.10.15/src/global/mail_version.h
--- postfix-3.10.14/src/global/mail_version.h	2026-09-07 19:24:23.000000000 +0300
+++ postfix-3.10.15/src/global/mail_version.h	2026-11-20 21:08:37.000000000 +0300
@@ -20,8 +20,8 @@
   * Patches change both the patchlevel and the release date. Snapshots have no
   * patchlevel; they change the release date only.
   */
-#define MAIL_RELEASE_DATE	"20260907"
-#define MAIL_VERSION_NUMBER	"3.10.14"
+#define MAIL_RELEASE_DATE	"20261122"
+#define MAIL_VERSION_NUMBER	"3.10.15"
 
 #ifdef SNAPSHOT
 #define MAIL_VERSION_DATE	"-" MAIL_RELEASE_DATE
diff -Nru postfix-3.10.14/src/global/uxtext.c postfix-3.10.15/src/global/uxtext.c
--- postfix-3.10.14/src/global/uxtext.c	2018-11-28 02:05:11.000000000 +0300
+++ postfix-3.10.15/src/global/uxtext.c	2026-11-20 21:04:17.000000000 +0300
@@ -143,8 +143,7 @@
 VSTRING *uxtext_quote(VSTRING *quoted, const char *unquoted, const char *special)
 {
     VSTRING_RESET(quoted);
-    uxtext_quote_append(quoted, unquoted, special);
-    return (quoted);
+    return (uxtext_quote_append(quoted, unquoted, special));
 }
 
 /* uxtext_unquote_append - quoted data to unquoted */
diff -Nru postfix-3.10.14/src/local/Makefile.in postfix-3.10.15/src/local/Makefile.in
--- postfix-3.10.14/src/local/Makefile.in	2025-01-10 01:06:10.000000000 +0300
+++ postfix-3.10.15/src/local/Makefile.in	2026-11-20 21:04:17.000000000 +0300
@@ -343,6 +343,7 @@
 include.o: ../../include/resolve_clnt.h
 include.o: ../../include/sent.h
 include.o: ../../include/stat_as.h
+include.o: ../../include/stringops.h
 include.o: ../../include/sys_defs.h
 include.o: ../../include/tok822.h
 include.o: ../../include/vbuf.h
diff -Nru postfix-3.10.14/src/local/include.c postfix-3.10.15/src/local/include.c
--- postfix-3.10.14/src/local/include.c	2026-06-28 23:39:06.000000000 +0300
+++ postfix-3.10.15/src/local/include.c	2026-11-20 21:04:17.000000000 +0300
@@ -61,6 +61,7 @@
 #include <stat_as.h>
 #include <iostuff.h>
 #include <mypwd.h>
+#include <stringops.h>
 
 /* Global library. */
 
@@ -144,6 +145,8 @@
 	return (bounce_append(BOUNCE_FLAGS(state.request),
 			      BOUNCE_ATTR(state.msg_attr)));
     }
+    if (st.st_mode & S_IWGRP)
+	msg_warn(":include: file %s is group writable", path);
 
     /*
      * DELIVERY POLICY
@@ -156,16 +159,43 @@
     /*
      * DELIVERY RIGHTS
      * 
-     * When a non-root include file is listed in a root-owned alias, use the
-     * rights of the include file owner.  We do not want to give the include
-     * file owner control of the default account.
+     * When an include file is listed in a root-owned alias: (1) use the rights
+     * of the parent directory owner if that is a non-root user, else (2) use
+     * the rights of the include file owner. Branch (1) defends against an
+     * attack reported by Anton Klingspor where a compromised mailing list
+     * manager could replace an include file with a hardlink or symlink to a
+     * protected file, and reveal its content in bounce messages.
      * 
      * When an include file is listed in a user-owned alias or .forward file,
      * leave the delivery rights alone. Users should not be able to make
      * things happen with someone else's rights just by including some file
      * that is owned by their victim.
+     * 
+     * In all cases, delivery to command or file will reduce root privilege to
+     * default user privilege.
      */
     if (usr_attr.uid == 0) {
+	VSTRING *parent_buf = vstring_alloc(100);
+	const char *parent_path = sane_dirname(parent_buf, path);
+	struct stat parent_st;
+	int     stat_res;
+
+	stat_res = stat(parent_path, &parent_st);	/* not lstat */
+	if (stat_res == 0 && (parent_st.st_mode & (S_IWGRP | S_IWOTH)))
+	    /* Warn not reject, to avoid breaking existing deployments. */
+	    msg_warn(":include: file %s has group or world writable "
+		     "parent %s", path, parent_path);
+	vstring_free(parent_buf);
+	if (stat_res < 0) {
+	    msg_warn("%s: cannot find :include: file parent", path);
+	    dsb_simple(state.msg_attr.why, "4.3.5",
+		       "mail system configuration error");
+	    return (defer_append(BOUNCE_FLAGS(state.request),
+				 BOUNCE_ATTR(state.msg_attr)));
+	}
+	/* Non-root parent owner rights override file owner rights. */
+	if (parent_st.st_uid != 0)
+	    st = parent_st;
 	if ((errno = mypwuid_err(st.st_uid, &file_pwd)) != 0 || file_pwd == 0) {
 	    msg_warn(errno ? "cannot find username for uid %ld: %m" :
 		     "cannot find username for uid %ld", (long) st.st_uid);
@@ -207,9 +237,14 @@
 #define FOPEN_AS(p,u,g) ((fd = open_as(p,O_RDONLY,0,u,g)) >= 0 ? \
 				vstream_fdopen(fd,O_RDONLY) : 0)
 
+    if (msg_verbose)
+	msg_info("%s: open_as(path=%s, uid=%lu, gid=%lu)", __func__, path,
+		 (unsigned long) usr_attr.uid, (unsigned long) usr_attr.gid);
     if ((fp = FOPEN_AS(path, usr_attr.uid, usr_attr.gid)) == 0) {
-	msg_warn("cannot open include file %s: %m", path);
-	dsb_simple(state.msg_attr.why, "5.3.5",
+	msg_warn("cannot open :include: file %s as uid=%lu gid=%lu: %m", path,
+		 (unsigned long) usr_attr.uid, (unsigned long) usr_attr.gid);
+	/* 4.x.x Because this may be triggered by new Klingspor defense. */
+	dsb_simple(state.msg_attr.why, "4.3.5",
 		   "mail system configuration error");
 	status = bounce_append(BOUNCE_FLAGS(state.request),
 			       BOUNCE_ATTR(state.msg_attr));
diff -Nru postfix-3.10.14/src/milter/milter8.c postfix-3.10.15/src/milter/milter8.c
--- postfix-3.10.14/src/milter/milter8.c	2026-09-04 00:12:22.000000000 +0300
+++ postfix-3.10.15/src/milter/milter8.c	2026-11-20 21:04:17.000000000 +0300
@@ -581,6 +581,11 @@
 	(void) vstream_fclose(milter->fp);
 	milter->fp = 0;
     }
+    /* 202611 coredump.ws + Claude Opus 5.5: avoid stale or leaked data. */
+    if (milter->m.macros) {
+        milter_macros_free(milter->m.macros);
+        milter->m.macros = 0;
+    }
     milter->state = MILTER8_STAT_CLOSED;
 }
 
@@ -1679,8 +1684,11 @@
     /*
      * Clean up after aborted message body replacement.
      */
-    if (body_line_buf)
+    if (body_line_buf) {
+	 if (edit_resp == 0 && (retval == 0 || strchr("DS45", retval[0]) == 0))
+	    retval = "421 4.7.0 Service unavailable";
 	vstring_free(body_line_buf);
+    }
 
     /*
      * XXX Some cleanup clients ask the cleanup server to bounce mail for
@@ -1753,6 +1761,7 @@
 	    msg_warn("milter %s: bad protocol information: %s",
 		     milter->m.name, name);
 	    milter8_conf_error(milter);
+	    myfree(saved_version);
 	    return;
 	}
 	if (vers != 0)
@@ -1946,7 +1955,12 @@
 
     /*
      * Secondary negotiations: override lists of macro names.
+     *
+     * 202611 coredump.ws + Claude Opus 5.5: avoid stale data or memory leak.
      */
+    if (milter->m.macros)
+	msg_panic("%s: milter %s: macros exist",
+		  myname, milter->m.name);
     if (data_len > 0) {
 	VSTRING *buf = vstring_alloc(100);
 	UINT32_TYPE mac_type;
diff -Nru postfix-3.10.14/src/smtp/smtp_addr.c postfix-3.10.15/src/smtp/smtp_addr.c
--- postfix-3.10.14/src/smtp/smtp_addr.c	2025-04-22 00:02:21.000000000 +0300
+++ postfix-3.10.15/src/smtp/smtp_addr.c	2026-11-20 21:04:17.000000000 +0300
@@ -295,6 +295,7 @@
     DNS_RR *addr_list = 0;
     DNS_RR *rr;
     int     res_opt = 0;
+    time_t  start, elapsed;
 
     if (mx_names->dnssec_valid)
 	res_opt = RES_USE_DNSSEC;
@@ -324,7 +325,22 @@
      * getaddrinfo() may invoke a resolver that runs in a different process
      * (NIS server, nscd), so we can't even reliably turn this off by
      * tweaking the in-process resolver flags.
+     * 
+     * This code may look up more MX addresses than it will use. To avoid a
+     * mailer loop if this MTA is MX for the destination, we MUST exclude all
+     * MX addresses that have the same or worse MX preference as this MTA.
+     * Therefore, we MUST NOT stop looking up MX addresses in the middle of a
+     * preference level (at least, don't stop before we know whether this MTA
+     * is listed with that preference level). This logic assumes that the
+     * address record for this MTA is always available, and that the address
+     * is never excluded by dns_rr_append().
+     * 
+     * These loop detection considerations to not apply when the DNS is
+     * compromised; we give up immediately after address lookup has taken too
+     * long. That leaves the normal path for loop detection intact, and
+     * breaks rules only when DNS is compromised.
      */
+    start = time((time_t *) 0);
     for (rr = mx_names; rr; rr = rr->next) {
 	if (rr->type != T_MX && rr->type != T_SRV)
 	    msg_panic("smtp_addr_list: bad resource type: %d", rr->type);
@@ -332,6 +348,12 @@
 				  rr->pref, rr->port, why);
 	if (addr_list && DNS_RR_IS_TRUNCATED(addr_list))
 	    break;
+	if (var_dns_rr_list_limit > 0 
+	    && (elapsed = time((time_t *) 0) - start) > var_dns_rr_list_limit) {
+	    msg_info("%s: skipping further MX address lookup after %d seconds",
+		     rr->qname, (int) elapsed);
+	    break;
+	}
     }
     return (addr_list);
 }
diff -Nru postfix-3.10.14/src/smtp/smtp_chat.c postfix-3.10.15/src/smtp/smtp_chat.c
--- postfix-3.10.14/src/smtp/smtp_chat.c	2026-09-04 00:12:43.000000000 +0300
+++ postfix-3.10.15/src/smtp/smtp_chat.c	2026-11-20 21:04:17.000000000 +0300
@@ -318,7 +318,9 @@
 	if (chat_append_flag) {
 	    if (LEN(rdata.str_buf))
 		VSTRING_ADDCH(rdata.str_buf, '\n');
-	    vstring_strcat(rdata.str_buf, STR(session->buffer));
+	    /* 202611 macintog: count empty line towards reply size limit. */
+	    vstring_strcat(rdata.str_buf, *STR(session->buffer) != 0 ?
+			   STR(session->buffer) : "(empty line received)");
 	}
 
 	/*
diff -Nru postfix-3.10.14/src/smtpd/smtpd.c postfix-3.10.15/src/smtpd/smtpd.c
--- postfix-3.10.14/src/smtpd/smtpd.c	2026-09-04 00:12:43.000000000 +0300
+++ postfix-3.10.15/src/smtpd/smtpd.c	2026-11-22 20:31:49.000000000 +0300
@@ -2572,10 +2572,6 @@
     int     rate;
     int     dsn_envid = 0;
 
-    state->flags &= ~SMTPD_FLAG_SMTPUTF8;
-    state->encoding = 0;
-    state->dsn_ret = 0;
-
     /*
      * Sanity checks.
      * 
@@ -2608,6 +2604,25 @@
     }
 
     /*
+     * The following are set during MAIL FROM command parsing, and are not
+     * reset after syntax error.
+     * 
+     * 202610 Credit: coredump.ws with Claude Opus 5.5: move these resets after
+     * the nested MAIL FROM checks.
+     * 
+     * 202610 Credit: coredump.ws with Claude Opus 5.5: add missing resets for
+     * state->msg_size and state->sasl_sender.
+     */
+    state->flags &= ~SMTPD_FLAG_SMTPUTF8;
+    state->encoding = 0;
+    state->dsn_ret = 0;
+    state->msg_size = 0;
+#ifdef USE_SASL_AUTH
+    if (state->sasl_sender)
+	smtpd_sasl_mail_reset(state);
+#endif
+
+    /*
      * XXX The client event count/rate control must be consistent in its use
      * of client address information in connect and disconnect events. For
      * now we exclude xclient authorized hosts from event count/rate control.
@@ -2736,10 +2751,21 @@
 	    return (-1);
 	}
     }
-    /* Fix 20161205: show the envelope sender in reject logging. */
-    PUSH_STRING(saved_sender, state->sender, STR(state->addr_buf));
-    err = smtpd_check_size(state, state->msg_size);
-    POP_STRING(saved_sender, state->sender);
+
+    /*
+     * 202610 Don't call smtpd_check_xxx() in stand-alone mode. Credit:
+     * coredump.ws with Claude Opus 5.5.
+     */
+    if (SMTPD_STAND_ALONE(state)) {
+	err = (ENFORCING_SIZE_LIMIT(var_message_limit)
+	       && state->msg_size > var_message_limit) ?
+	    "552 5.3.4 Message size exceeds fixed limit" : 0;
+    } else {
+	/* Fix 20161205: show the envelope sender in reject logging. */
+	PUSH_STRING(saved_sender, state->sender, STR(state->addr_buf));
+	err = smtpd_check_size(state, state->msg_size);
+	POP_STRING(saved_sender, state->sender);
+    }
     if (err != 0) {
 	smtpd_chat_reply(state, "%s", err);
 	return (-1);
diff -Nru postfix-3.10.14/src/tls/tls_dane.c postfix-3.10.15/src/tls/tls_dane.c
--- postfix-3.10.14/src/tls/tls_dane.c	2026-06-17 20:06:59.000000000 +0300
+++ postfix-3.10.15/src/tls/tls_dane.c	2026-11-20 21:07:13.000000000 +0300
@@ -453,7 +453,8 @@
 		     values->argv[i]);
 	    continue;
 	}
-	raw = vstring_alloc(ilen / 2);
+	/* 202611 coredump.ws + Claude Opus 5.5: avoid vstring_alloc(0). */
+	raw = vstring_alloc(ilen / 2 + 1);
 	if (hex_decode_opt(raw, cp, ilen, HEX_DECODE_FLAG_ALLOW_COLON) == 0) {
 	    myfree(raw);
 	    msg_warn("malformed fingerprint value: %.384s", values->argv[i]);
diff -Nru postfix-3.10.14/src/tls/tls_misc.c postfix-3.10.15/src/tls/tls_misc.c
--- postfix-3.10.14/src/tls/tls_misc.c	2025-02-15 23:09:55.000000000 +0300
+++ postfix-3.10.15/src/tls/tls_misc.c	2026-11-20 21:07:13.000000000 +0300
@@ -604,9 +604,15 @@
 	*version = code;
 	return (0);
     }
+
+    /*
+     * 202610 coredump.ws with Claude Opus 5.5: Don't parse an empty string
+     * as numerical zero.
+     */
     errno = 0;
     ulval = strtoul(tok, &_end, 16);
     if (*_end != 0
+	|| _end == tok
 	|| (ulval == ULONG_MAX && errno == ERANGE)
 	|| ulval > INT_MAX)
 	return TLS_PROTOCOL_INVALID;
@@ -633,12 +639,19 @@
 
     *floor = *ceiling = 0;
 
+    /* Human factors: merge ">=" or "<=" token with the next token. */
     save = cp = mystrdup(plist);
     while ((tok = mystrtok(&cp, CHARS_COMMA_SP ":")) != 0) {
 	if (strncmp(tok, ">=", 2) == 0)
-	    code = parse_tls_version(tok + 2, floor);
+	    if (*(tok += 2) || (tok = mystrtok(&cp, CHARS_COMMA_SP ":")) != 0)
+		code = parse_tls_version(tok, floor);
+	    else
+		code = TLS_PROTOCOL_INVALID;
 	else if (strncmp(tok, "<=", 2) == 0)
-	    code = parse_tls_version(tok + 2, ceiling);
+	    if (*(tok += 2) || (tok = mystrtok(&cp, CHARS_COMMA_SP ":")) != 0)
+		code = parse_tls_version(tok, ceiling);
+	    else
+		code = TLS_PROTOCOL_INVALID;
 	else if (*tok == '!')
 	    exclude |= code =
 		name_code(protocol_table, NAME_CODE_FLAG_NONE, ++tok);
diff -Nru postfix-3.10.14/src/util/vstring.c postfix-3.10.15/src/util/vstring.c
--- postfix-3.10.14/src/util/vstring.c	2021-12-19 17:59:36.000000000 +0300
+++ postfix-3.10.15/src/util/vstring.c	2026-11-20 21:07:13.000000000 +0300
@@ -371,9 +371,9 @@
 
     /*
      * Safety net: add a gratuitous null terminator so that C-style string
-     * operations won't scribble past the end.
+     * operations won't scribble past the end. 20261113 Allow zero length.
      */
-    if (len < 1 || len > SSIZE_T_MAX - 1)
+    if (len < 0 || len > SSIZE_T_MAX - 1)
 	msg_panic("vstring_alloc: bad length %ld", (long) len);
     vp = (VSTRING *) mymalloc(sizeof(*vp));
     vp->vbuf.flags = 0;
Technical Details
Message-ID: <O4xdw-eJKZ-13@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-ams.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!news.servidellagleba.it!bofh.it!news.nic.it!robomod

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-ams.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!news.servidellagleba.it!bofh.it!news.nic.it!robomod
From: Michael Tokarev <mjt@tls.msk.ru>
Newsgroups: linux.debian.bugs.dist,linux.debian.devel.release
Subject: Bug#1155674: trixie-pu: package postfix/3.10.15-0+deb13u0
Date: Sat, 28 Nov 2026 21:30:02 +0100
Message-ID: <O4xdw-eJKZ-13@gated-at.bofh.it>
X-Original-To: Debian Bug Tracking System <submit@bugs.debian.org>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Sat Nov 28 20:27:15 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.451
Reply-To: Michael Tokarev <mjt@tls.msk.ru>, 1155674@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: postfix@packages.debian.org, debian-release@lists.debian.org
X-Debian-Pr-Message: report 1155674
X-Debian-Pr-Package: release.debian.org
X-Debian-Pr-Keywords: trixie
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
X-Mailer: reportbug 13.2.0
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2005680
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 581
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Sat, 28 Nov 2026 23:25:51 +0300
X-Original-Message-ID: <179589755165.603478.7417135546587312321.reportbug@localhost>