Page MenuHomeFreeBSD

lang/python314: Backport poplib security fix
Needs ReviewPublic

Authored by des on Jun 20 2026, 8:08 PM.
Tags
None
Referenced Files
F166663178: D57718.diff
Sat, Aug 15, 8:32 AM
F166652924: D57718.id.diff
Sat, Aug 15, 5:58 AM
F166650650: D57718.id183715.diff
Sat, Aug 15, 5:27 AM
Unknown Object (File)
Thu, Aug 13, 5:54 AM
Unknown Object (File)
Wed, Aug 12, 11:12 PM
Unknown Object (File)
Wed, Aug 12, 3:54 PM
Unknown Object (File)
Wed, Aug 12, 11:37 AM
Unknown Object (File)
Wed, Aug 12, 12:45 AM

Details

Reviewers
vishwin
Group Reviewers
Python
ports secteam
Summary

Backport patch for CVE-2025-15367.

MFH: 2026Q3

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 75478
Build 72361: arc lint + arc unit

Event Timeline

des requested review of this revision.Jun 20 2026, 8:08 PM
des created this revision.
vishwin requested changes to this revision.Jun 20 2026, 8:56 PM
vishwin added a subscriber: vishwin.

These are intentionally omitted because upstream is still evaluating their functional correctness relative to the RFCs these modules implement, despite having committed in trunk.

This revision now requires changes to proceed.Jun 20 2026, 8:56 PM

These are intentionally omitted because upstream is still evaluating their functional correctness relative to the RFCs these modules implement, despite having committed in trunk.

That is not an accurate representation of the situation. Upstream has decided not to backport these patches not because they have doubts about their correctness but because they don't want to break backward compatibility on an existing release branch. We would not be the first redistributor to disagree with upstream and backport the patches; Red Hat for instance currently ships Python 3.12 with these patches backported.

@vishwin have you found the time to correct your misapprehension of the imaplib / poplib situation?

Speaking as a member of the ports-secteam: a solution needs to be found here as soon as possible! I would ask for a prompt resolution; otherwise, I will approve the commit for security reasons

The correct fix for imaplib (CVE-2025-15366) included in the latest release, 3.14.7. poplib (CVE-2025-15367) remains not backported upstream for good reason. For commentary's sake however:

CVE-2025-15366: https://github.com/python/cpython/issues/143921
The initial fix rejected all control characters, which violates the IMAP RFC in regards to quoted characters, and explains "potentially breaking existing behaviour". Further evaluations were necessary to determine which control characters are not part of the quoted characters set. Introducing new bugs on our end was not tenable.

CVE-2025-15367: https://github.com/python/cpython/issues/143923
Similar deal. However, possible ENOTIME to work out which specific control characters should actually be rejected, whilst also preserving backwards compatibility as much as practicable.

In all, we should not be breaking existing functionality for a cross-platform language runtime, especially one where many users are not apt to diagnose operating system-specific nuances, so upstream will continue to be followed here.

des retitled this revision from lang/python314: Backport two security fixes to lang/python314: Backport poplib security fix.Sun, Aug 9, 7:04 AM
des edited the summary of this revision. (Show Details)