#1152739 trixie-pu: package pymongo/4.10.1-6+deb13u1

#1152739#5
Date:
2026-10-31 20:46:17 UTC
From:
To:
Dear Release Team,

Please consider pymongo 4.10.1-6+deb13u1 for the next trixie point release.
I am requesting pre-approval before arranging an upload.

[ Reason ]
Backport the upstream fix for CVE-2026-106435 / #1150462 (severity
important). Trixie 4.10.1-6 contains unbounded regular-expression scans
in the native BSON decoder. The Security Tracker marks this no-dsa.

The fix entered Debian unstable in 4.19.0-1, remains in 4.19.0-2, and is
also in testing. This candidate carries only upstream commit
bb8d4e195275e75bd94ebeffb53cc747d357fcf4 and its two regression tests.

[ Impact ]
An application decoding untrusted, malformed BSON through decode or
decode_all can terminate when the C extension is loaded. Normal database
wire-protocol decoding does not reach this code. This is a focused
proposed update for an existing flaw in trixie, with normal maintenance
priority.

[ Tests ]
Tests completed on 18 October 2026 in a trixie amd64 chroot with
Python 3.13.5, using the built Debian packages:

- sbuild succeeded: 806 passed, 3703 skipped, 788 deselected, 2 warnings.
- The same BSON suite, including the upstream regressions, gave
    83 passed, 1 failed, 1 skipped on 4.10.1-6; the candidate gave
    84 passed, 0 failed, 1 pre-existing skip. Both new methods pass.
- Both C extensions were loaded from the built .deb files; their hashes
    matched the package contents.
- The declared autopkgtest passed as a superficial import test (exit 8).
    BSON/C regression coverage comes from the separate comparison above.

MongoDB was not used. The attached validation summary describes the
existing runs and their limits; no new test run is claimed for today.

[ Risks ]
The runtime change is confined to C BSON regular-expression decoding,
replacing unbounded scans with searches bounded by the remaining document
bytes. Regression risks are incorrect bounds handling or rejection of
valid regex values; the BSON suite covers valid data as well as the new
malformed-data cases. No external dependency or public API changes are
introduced. The four existing Debian patches are retained.

[ Checklist ]
    [x] All changes are documented in debian/changelog.
    [x] The complete source diff has been reviewed locally.
    [x] A source debdiff against trixie 4.10.1-6 is attached.
    [x] The issue is fixed in unstable.

[ Changes ]
The debdiff changes exactly three Debian files:
- debian/changelog: document CVE-2026-106435 / #1150462.
- debian/patches/00006_CVE-2026-106435.patch: upstream fix and two tests.
- debian/patches/series: enable that patch.

[ Other info ]
I maintain pymongo within the Debian Python Team and am a Debian
Maintainer. Aryan is copied for coordination; a stable uploader has not
yet been arranged.

The Security Team was contacted. On 29 October Salvatore Bonaccorso said
he was not aware of parallel work on a trixie update and suggested filing
a pu bug in coordination with the maintainer.

The attached debdiff is the tested, unsigned UNRELEASED candidate. The
changelog distribution will be set to trixie and its date finalised before
an approved upload. No upload has been made.

For the Debian Python Team: would a Salsa MR be useful for packaging
review? If so, which repository and target branch should I use?
The local work is on the separate work/trixie-1150462 branch.

Attachments: source debdiff and validation summary. Full logs and the
unsigned source package are available on request.

References:
https://bugs.debian.org/1150462
https://security-tracker.debian.org/tracker/CVE-2026-106435
https://github.com/mongodb/mongo-python-driver/commit/bb8d4e195275e75bd94ebeffb53cc747d357fcf4

Best regards,
Federico Molara

#1152739#12
Date:
2026-11-02 21:18:43 UTC
From:
To:
Hi,

FWIW, there are more CVEs marked as no-dsa, so maybe include those as
well in the batch of updates for pymongo via the the next point
release.

Regards,
Salvatore

#1152739#17
Date:
2026-11-03 20:21:34 UTC
From:
To:
Dear Release Team, Salvatore and Python Team,

Thank you, Salvatore, for suggesting on 2 November that the other no-dsa
CVEs be included in this update. I have prepared and tested that batch.
The attached source debdiff against trixie 4.10.1-6 supersedes the one
sent on 31 October. The version remains 4.10.1-6+deb13u1; it has not
been uploaded.

The candidate now covers:
- CVE-2026-106435 / #1150462: BSON C regex bounds (original request);
- CVE-2026-96749 / #1148967: BSON C buffer overflow;
- CVE-2026-96748 / #1148967: URI hostname parsing;
- CVE-2026-96747 / #1148967: KMS endpoint validation;
- CVE-2026-88029 / #1147408: GridFS identifier queries.

All five fixes are already in unstable. The changes are limited to
backported upstream fixes and relevant regressions, with adaptations
for 4.10.1. The orig tarball, external dependencies and Uploaders are
unchanged. Much of the debdiff consists of upstream test fixtures.

The final candidate builds in trixie (812 passed). Separate tests on the
built packages report 103 passed / 1 skipped for BSON, URI and KMS, and
160 passed / 9 skipped for GridFS against local MongoDB 8.0.34. The six
offline and five GridFS baseline failures pass on the candidate.
The attached report includes native C-extension provenance, test limits,
the superficial autopkgtest result and the remaining Lintian warning.

Could you review the expanded candidate for pre-approval? It remains
UNRELEASED; I will finalize the changelog for trixie and the upload
qualification after review.

I would also appreciate a Python Team reviewer and a sponsor able to
upload to stable. As asked in the initial request, would a Salsa MR be
helpful for packaging review, and if so, against which repository/branch?

Best regards,
Federico Molara

#1152739#22
Date:
2026-11-10 21:46:43 UTC
From:
To:
Dear Release Team, Salvatore and Python Team,

A short follow-up to the trixie batch sent on 3 November: upstream has
merged PR #3195 (PYTHON-6252), fixing signed integer overflow when the
C BSON buffer doubles its capacity:
https://github.com/mongodb/mongo-python-driver/pull/3195

This complements the addition-size guard for CVE-2026-96749 already in
our batch. A source-level check shows that the old doubling code is
still present in Debian 4.19.0-2, trixie 4.10.1-6 and our candidate.
The small buffer.c hunk applies directly to the candidate; the PR also
contains upstream sanitizer CI additions.

The submitted candidate is unchanged. Would you prefer to include this
complementary fix in the batch, once it is also fixed in unstable, or
handle it separately?

Best regards,
Federico Molara

#1152739#27
Date:
2026-11-12 06:28:28 UTC
From:
To:
Hi

[Note I'm not speaking authoritatively here for SRM, I'm not member,
but giving you some input]

The issue needs first to be fixed in unstable, so maybe fill a
separate bug in the BTS to track it, fix it there.

If by then the current proposed update for pymongo with the proposed
changes is not yet uploaded to trixie-pu, then make a revision of
4.10.1-6+deb13u1 debdiff including that followup as well. If in
meanwhile 4.10.1-6+deb13u1 was uploaded to trixie-pu (and hopefully
included in the upcoming point release, but then that needs to happen
latest this upcoming weekend), then make a new release.d.o bug for
4.10.1-6+deb13u2 including that followup (I'm sure until then there
will be more CVEs to cover ;-)).

Regards,
Salvatore