🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.debian.bugs.rc
2 messages
2 total messages Started by Stuart Prescott Fri, 20 Nov 2026 06:30
Bug#1154542: python-msgpack: Failing autopkgtests: test/test_except.py::test_unpacker_no_refcount_underflow_after_error
#3669
Author: Stuart Prescott
Date: Fri, 20 Nov 2026 06:30
84 lines
5111 bytes
Source: python-msgpack
Version: 1.2.1-3
Severity: serious
X-Debbugs-Cc: stuart@debian.org

Dear Maintainer,

The autopkgtest invocation of the upstream unittests fails for
python-msgpack. It fails both on ci.d.n with its mixed testing/unstable
setup and also locally when freshly rebuilt and then immediately run only
against packages from unstable. I've not investigated further as to why
(or how).

//---

  65s =================================== FAILURES ===================================
 65s _______________ test_unpacker_no_refcount_underflow_after_error ________________
 65s 
 65s     def test_unpacker_no_refcount_underflow_after_error() -> None:
 65s         """Regression test (CVE-2026-114613): after a failed skip(), the C
 65s         extension must not drop a stale reference to a previously returned
 65s         object (use-after-free)."""
 65s         up = Unpacker()
 65s         up.feed(packb({"a": [1, 2, 3]}, use_bin_type=True))
 65s         outer = up.unpack()
 65s         inner = outer["a"]
 65s         keep = inner  # safety reference keeping the probe object alive
 65s         gc.collect()
 65s         r1 = sys.getrefcount(inner)
 65s     
 65s         # Two nested fixarray headers then an invalid byte: skip() opens two
 65s         # containers without writing the stack slots, then fails, and the
 65s         # cleanup must not touch the stale slot left by the previous unpack().
 65s         up.feed(b"\x92\x92\xc1")
 65s         with raises(Exception):
 65s             up.skip()
 65s         gc.collect()
 65s     
 65s         assert sys.getrefcount(inner) == r1
 65s         # The parser context must be reusable afterwards: the same operation
 65s         # fails cleanly again (no corrupt-state crash), and after realigning
 65s         # past the rejected byte the unpacker resumes normally.
 65s         with raises(FormatError):
 65s >           up.skip()
 65s 
 65s test/test_except.py:216: 
 65s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
 65s msgpack/fallback.py:585: in skip
 65s     self._unpack(EX_SKIP)
 65s msgpack/fallback.py:489: in _unpack
 65s     typ, n, obj = self._read_header()
 65s                   ^^^^^^^^^^^^^^^^^^^
 65s msgpack/fallback.py:396: in _read_header
 65s     self._reserve(1)
 65s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
 65s 
 65s self = <msgpack.fallback.Unpacker object at 0x7f5b5e5b2030>, n = 1
 65s raise_outofdata = True
 65s 
 65s     def _reserve(self, n, raise_outofdata=True):
 65s         remain_bytes = len(self._buffer) - self._buff_i - n
 65s     
 65s         # Fast path: buffer has n bytes already
 65s         if remain_bytes >= 0:
 65s             return
 65s     
 65s         if self._feeding:
 65s             self._buff_i = self._buf_checkpoint
 65s >           raise OutOfData
 65s E           msgpack.exceptions.OutOfData
 65s 
 65s msgpack/fallback.py:367: OutOfData
 65s =========================== short test summary info ============================
 65s FAILED test/test_except.py::test_unpacker_no_refcount_underflow_after_error
 65s =================== 1 failed, 130 passed, 2 skipped in 1.77s ===================

---//

The failure above is with Python 3.14 so this is not related to the
on-going work to add Python 3.15 as a supported interpreter (but it will
get in the way of that transition at some stage).

regards
Stuart
Bug#1154542: marked as done (python-msgpack: Failing autopkgtests: test/test_except.py::test_unpacker_no_refcount_underflow_aft...
#3857
Author: Debian Bug Tracking System
Date: Sun, 22 Nov 2026 12:10
327 lines
15677 bytes
This is a multi-part message in MIME format...

------------=_1795349343-264105-0
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="utf-8"

Your message dated Sun, 22 Nov 2026 12:06:59 +0000
with message-id <179534921968.1679377.1122483374004499088@fasolo.debian.org>
and subject line Bug#1154542: fixed in python-msgpack 1.2.1-4
has caused the Debian Bug report #1154542,
regarding python-msgpack: Failing autopkgtests: test/test_except.py::test_u=
npacker_no_refcount_underflow_after_error
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


--=20
1154542: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D1154542
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems

------------=_1795349343-264105-0
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at submit) by bugs.debian.org; 20 Nov 2026 06:22:36 +0000
X-Spam-Checker-Version: SpamAssassin 4.0.1-bugs.debian.org_2005_01_02
	(2024-03-25) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-8.0 required=4.0 tests=BAYES_00,FROMDEVELOPER,
	LONGWORD,NO_RELAYS,XMAILER_REPORTBUG autolearn=ham autolearn_force=no
	version=4.0.1-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 52; hammy, 149; neutral, 108; spammy,
	1. spammytokens:0.985-+--inner hammytokens:0.000-+--XDebbugsCc,
	0.000-+--X-Debbugs-Cc, 0.000-+--autopkgtest, 0.000-+--H*Ad:N*Bug,
	0.000-+--HTo:N*Debian
Return-path: <stuart@debian.org>
Received: via submission
	by buxtehude.debian.org with esmtp (Exim 4.96)
	(envelope-from <stuart@debian.org>)
	id 1xUI16-008v8k-2R
	for submit@bugs.debian.org;
	Fri, 20 Nov 2026 06:22:36 +0000
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Stuart Prescott <stuart@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: python-msgpack: Failing autopkgtests: test/test_except.py::test_unpacker_no_refcount_underflow_after_error
Message-ID: <179515575361.805707.2938311381008401321.reportbug@trochilus.nanonanonano.net>
X-Mailer: reportbug 13.2.0
Date: Fri, 20 Nov 2026 17:22:33 +1100
Delivered-To: submit@bugs.debian.org

Source: python-msgpack
Version: 1.2.1-3
Severity: serious
X-Debbugs-Cc: stuart@debian.org

Dear Maintainer,

The autopkgtest invocation of the upstream unittests fails for
python-msgpack. It fails both on ci.d.n with its mixed testing/unstable
setup and also locally when freshly rebuilt and then immediately run only
against packages from unstable. I've not investigated further as to why
(or how).

//---

  65s =================================== FAILURES ===================================
 65s _______________ test_unpacker_no_refcount_underflow_after_error ________________
 65s 
 65s     def test_unpacker_no_refcount_underflow_after_error() -> None:
 65s         """Regression test (CVE-2026-114613): after a failed skip(), the C
 65s         extension must not drop a stale reference to a previously returned
 65s         object (use-after-free)."""
 65s         up = Unpacker()
 65s         up.feed(packb({"a": [1, 2, 3]}, use_bin_type=True))
 65s         outer = up.unpack()
 65s         inner = outer["a"]
 65s         keep = inner  # safety reference keeping the probe object alive
 65s         gc.collect()
 65s         r1 = sys.getrefcount(inner)
 65s     
 65s         # Two nested fixarray headers then an invalid byte: skip() opens two
 65s         # containers without writing the stack slots, then fails, and the
 65s         # cleanup must not touch the stale slot left by the previous unpack().
 65s         up.feed(b"\x92\x92\xc1")
 65s         with raises(Exception):
 65s             up.skip()
 65s         gc.collect()
 65s     
 65s         assert sys.getrefcount(inner) == r1
 65s         # The parser context must be reusable afterwards: the same operation
 65s         # fails cleanly again (no corrupt-state crash), and after realigning
 65s         # past the rejected byte the unpacker resumes normally.
 65s         with raises(FormatError):
 65s >           up.skip()
 65s 
 65s test/test_except.py:216: 
 65s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
 65s msgpack/fallback.py:585: in skip
 65s     self._unpack(EX_SKIP)
 65s msgpack/fallback.py:489: in _unpack
 65s     typ, n, obj = self._read_header()
 65s                   ^^^^^^^^^^^^^^^^^^^
 65s msgpack/fallback.py:396: in _read_header
 65s     self._reserve(1)
 65s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
 65s 
 65s self = <msgpack.fallback.Unpacker object at 0x7f5b5e5b2030>, n = 1
 65s raise_outofdata = True
 65s 
 65s     def _reserve(self, n, raise_outofdata=True):
 65s         remain_bytes = len(self._buffer) - self._buff_i - n
 65s     
 65s         # Fast path: buffer has n bytes already
 65s         if remain_bytes >= 0:
 65s             return
 65s     
 65s         if self._feeding:
 65s             self._buff_i = self._buf_checkpoint
 65s >           raise OutOfData
 65s E           msgpack.exceptions.OutOfData
 65s 
 65s msgpack/fallback.py:367: OutOfData
 65s =========================== short test summary info ============================
 65s FAILED test/test_except.py::test_unpacker_no_refcount_underflow_after_error
 65s =================== 1 failed, 130 passed, 2 skipped in 1.77s ===================

---//

The failure above is with Python 3.14 so this is not related to the
on-going work to add Python 3.15 as a supported interpreter (but it will
get in the way of that transition at some stage).

regards
Stuart

------------=_1795349343-264105-0
Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at 1154542-close) by bugs.debian.org; 22 Nov 2026 12:07:02 +0000
X-Spam-Checker-Version: SpamAssassin 4.0.1-bugs.debian.org_2005_01_02
	(2024-03-25) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-113.1 required=4.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FVGT_m_MULTI_ODD,HAS_BUG_NUMBER,
	MD5_SHA1_SUM,PGPSIGNATURE,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS,
	USER_IN_DKIM_WELCOMELIST autolearn=ham autolearn_force=no
	version=4.0.1-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 93; hammy, 150; neutral, 170; spammy,
	0. spammytokens: hammytokens:0.000-+--HX-Debian:DAK,
	0.000-+--H*rp:D*ftp-master.debian.org, 0.000-+--HX-DAK:process-upload,
	0.000-+--UD:debian.tar.xz, 0.000-+--H*r:sk:fasolo.
Return-path: <envelope@ftp-master.debian.org>
Received: from mitropoulos.debian.org ([2001:648:2ffc:deb:216:61ff:fe9d:958d]:60362)
	by buxtehude.debian.org with esmtps (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
	(Exim 4.96)
	(envelope-from <envelope@ftp-master.debian.org>)
	id 1xV6LX-0016DA-1a
	for 1154542-close@bugs.debian.org;
	Sun, 22 Nov 2026 12:07:02 +0000
Received: via submission
	from C=NA,ST=NA,L=Ankh Morpork,O=Debian SMTP,OU=Debian SMTP CA,CN=fasolo.debian.org,EMAIL=hostmaster@fasolo.debian.org (verified)
	by mitropoulos.debian.org with esmtps (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
	(Exim 4.96)
	(envelope-from <envelope@ftp-master.debian.org>)
	id 1xV6LU-005zko-31
	for 1154542-close@bugs.debian.org;
	Sun, 22 Nov 2026 12:07:00 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
	d=ftp-master.debian.org; s=smtpauto.fasolo; h=Content-Type:Message-Id:Date:
	Subject:MIME-Version:To:Reply-To:From:Cc:Content-Transfer-Encoding:Content-ID
	:Content-Description:In-Reply-To:References;
	bh=JPFUn6GVbA1YuIstfTnYsHo09EqlGeypwcAeqZUxiKE=; b=bPpa4PtZvuQVUsk1L882OQ3Vla
	/2AWOvnjKlAyhz7+bn2q0BMcpQYq4tDFTXNHn6j+6mMFP1Zn8iyzehKVu6uzkfdcvm8mb2d5i+3da
	J+7ZIa6u+3BMZ90YHoLfA1cS+8T8Xvu8F7r/duZyBBWbFKjKF7gfhswTNILh7Pemqatt89q0sVa5l
	9mdoVscyfuaU0xXc16q5GIvjjdR2qe3tD45Us94sXCc7wmlM/DG1MFKkHm669Vcwy54akPoii88nx
	F8v1+vN4n6zK7KDo3gsZtUdVfNxV0iYqModRJoDBhXhX1kql0J4i/o1xHo4/m5BLE7OhZlsYBSuLq
	QQkqkhGg==;
Received: from dak by fasolo.debian.org with local (Exim 4.98.2)
	(envelope-from <envelope@ftp-master.debian.org>)
	id 1xV6LT-0000000730B-31Yc;
	Sun, 22 Nov 2026 12:06:59 +0000
From: Debian FTP Masters <ftpmaster@ftp-master.debian.org>
Reply-To: Thomas Goirand <zigo@debian.org>
To: 1154542-close@bugs.debian.org
X-DAK: dak process-upload
X-Debian: DAK
X-Debian-Package: python-msgpack
Debian: DAK
Debian-Changes: python-msgpack_1.2.1-4_source.changes
Debian-Source: python-msgpack
Debian-Version: 1.2.1-4
Debian-Architecture: source
Debian-Suite: unstable
Debian-Archive-Action: accept
MIME-Version: 1.0
Subject: Bug#1154542: fixed in python-msgpack 1.2.1-4
Date: Sun, 22 Nov 2026 12:06:59 +0000
Message-Id: <179534921968.1679377.1122483374004499088@fasolo.debian.org>
Content-Type: multipart/signed; micalg="pgp-sha256";
 protocol="application/pgp-signature";
 boundary="===============4966116195276534732=="

--===============4966116195276534732==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

Source: python-msgpack
Source-Version: 1.2.1-4
Done: Thomas Goirand <zigo@debian.org>

We believe that the bug you reported is fixed in the latest version of
python-msgpack, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1154542@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Thomas Goirand <zigo@debian.org> (supplier of updated python-msgpack package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Mon, 02 Nov 2026 21:45:13 +0100
Source: python-msgpack
Architecture: source
Version: 1.2.1-4
Distribution: unstable
Urgency: high
Maintainer: Debian OpenStack <team+openstack@tracker.debian.org>
Changed-By: Thomas Goirand <zigo@debian.org>
Closes: 1154542
Changes:
 python-msgpack (1.2.1-4) unstable; urgency=3Dhigh
 .
   * Limit unpacker container preallocation to 10000 items, fixing excessive
     memory allocation from deeply nested, large array or map headers;
     larger containers grow as their contents are decoded (upstream 1.2.4).
     Applied upstream patch:
     - limit-container-preallocation-to-10000-items.patch
   * debian/tests: run the autopkgtest suite against the installed
     python3-msgpack instead of the source tree, so the C extension is
     actually exercised: pytest from the source root shadowed the installed
     _cmsgpack with the pure-Python fallback, failing the CVE-2026-114613
     regression test on its C extension-specific post-error assertions.
     Also add a pure-Python pass (Closes: #1154542).
   * Skip the C extension-specific post-error assertions of the
     CVE-2026-114613 regression test when the pure-Python fallback is in
     use, with the same guard upstream uses for its C extension-only tests.
Checksums-Sha1:
 340cfa37c0daf483f74e358ddd58e0f8a3127fd2 2225 python-msgpack_1.2.1-4.dsc
 8cd93e26e0065e81cc679c5f71681704eca465c1 15192 python-msgpack_1.2.1-4.debian=
.tar.xz
 9bf986c355347ebb4240b3de5cf8ab701721d248 7690 python-msgpack_1.2.1-4_amd64.b=
uildinfo
Checksums-Sha256:
 c6b22ff5a160852ffef3ab52252c202bcc97d4ac11d6afe84c1e0c3d8c3d8b48 2225 python=
-msgpack_1.2.1-4.dsc
 b0882a7f6abe6e97495566bbc6f637d9e78b11bc4c3937ed2e3719e1d531922a 15192 pytho=
n-msgpack_1.2.1-4.debian.tar.xz
 a0e793da756d29c5e06988a174ec88918607442e0cefee39b8b6721642621616 7690 python=
-msgpack_1.2.1-4_amd64.buildinfo
Files:
 149b2ed204bd458023029af0f4f75a0c 2225 python optional python-msgpack_1.2.1-4=
.dsc
 5bc952d05c02e6a059ad6f0e64cd0662 15192 python optional python-msgpack_1.2.1-=
4.debian.tar.xz
 be6c4c4dab4e56f2ee1f305a543f1227 7690 python optional python-msgpack_1.2.1-4=
_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEoLGp81CJVhMOekJc1BatFaxrQ/4FAmsC1a0ACgkQ1BatFaxr
Q/5c0BAAhWxXTL5qFBVYi//JjUzhNMOrt1MTlIKkKxqC+XVj4MMPd3Afs0+Ofp+1
8JL9gfWq0tz0EtiYoOJeYVpo3heF1hx6cT10D1JjVgzvGoQj4+Yf1V2qflT681mx
zdQTtAAvRJxFdE6P70uoiJSg/bP/1fLC8wUTAUejs64pT1uVTyhh2r9aQP8mCqiD
LIR4Y3XARZzsZenm9jtxJOfvv3hA9GaX84cOun/f8vXpg0J9YKX1ii/IL8I0yJlR
xHfdIAIeDVnBy33cdVgXeQPCfE3WVbPseDTu5YhG7ly9bH8XRKPdlFDnBLuRgnNg
hiDobNOmZzgtkUdS9hhtxgGfUq/keL3F1d7ZQmAupVWg/RKIejVn5PA4OaO8GZ4X
nGRWeuCNH+y9JSodZc79IS5rLyl1WhtmsGcHE4WJQRXE4JgGJJV6m/4eWip0EvVc
rDK3aL4fehifkW46FwEELvUIoVVypq1n6iwF6ret+RgjCMCS8GVKm5dGSnuL8vWb
4lW091qErAYtryqILx5PjC6orQUOtJgL4147izqd4Oge4hz+S+AxbCrpCQsooluG
Qz1PsYfT3YfU8CunCe1vZ3+kAmYqp2d1mOmbkRQg2LMo+0nwDGolhKjvd3bgrIzZ
tJKwUOdIeyksJdea3cGuF8rLzphYGhJF4Vl8VEWMIGoY3zjSTcg=3D
=3Dlazq
-----END PGP SIGNATURE-----


--===============4966116195276534732==
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQTziqJOuF8J+ZI8pJSb9qggYcy5IQUCawLa4wAKCRCb9qggYcy5
If/hAP4zP472SzdmIYi4wYcO2Xm/V8SfexHlMRcuRcirJkjQAQEA/slpPim4JqoQ
cFZok0HkVVWKDeH277GedBWJe9CmMQM=
=NYL1
-----END PGP SIGNATURE-----

--===============4966116195276534732==--
------------=_1795349343-264105-0--
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads