10 Commits

Author SHA256 Message Date
860dee7bfb Accepting request 1314563 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1314563
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-cbor2?expand=0&rev=18
2025-10-30 16:10:52 +00:00
31f1f8651d - Update to 5.7.1
* Improved performance on decoding large definite bytestrings
  * Fixed a read(-1) vulnerability caused by boundary handling error

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cbor2?expand=0&rev=37
2025-10-30 13:18:28 +00:00
aad6eaab4d Accepting request 1307718 from devel:languages:python
- update to 5.7.0:
  * Added support for Python 3.14 (no free-threading support yet,
    sorry)
  * Dropped support for Python 3.8
  * Added support for encoding indefinite containers
  * Added complex number support (tag 43000)

OBS-URL: https://build.opensuse.org/request/show/1307718
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-cbor2?expand=0&rev=17
2025-09-29 14:37:20 +00:00
a6c86ae467 - update to 5.7.0:
* Added support for Python 3.14 (no free-threading support yet,
    sorry)
  * Dropped support for Python 3.8
  * Added support for encoding indefinite containers
  * Added complex number support (tag 43000)

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cbor2?expand=0&rev=35
2025-09-29 10:21:47 +00:00
fd17d68952 Accepting request 1298978 from devel:languages:python
- Make the libalternatives transition conditional

OBS-URL: https://build.opensuse.org/request/show/1298978
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-cbor2?expand=0&rev=16
2025-08-12 15:05:09 +00:00
c9f7b13f08 - Make the libalternatives transition conditional
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cbor2?expand=0&rev=33
2025-08-12 08:01:34 +00:00
fdfe39a01d Accepting request 1288516 from devel:languages:python
- Convert to libalternatives

OBS-URL: https://build.opensuse.org/request/show/1288516
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-cbor2?expand=0&rev=15
2025-06-26 09:39:02 +00:00
9f8bb43810 - Convert to libalternatives
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cbor2?expand=0&rev=31
2025-06-25 11:44:47 +00:00
ed59bf6373 Accepting request 1243333 from devel:languages:python
Automatic submission by obs-autosubmit

OBS-URL: https://build.opensuse.org/request/show/1243333
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-cbor2?expand=0&rev=14
2025-02-05 16:21:21 +00:00
84b6145434 - Update to 5.6.3 (bsc#1220096, CVE-2024-26134):
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cbor2?expand=0&rev=29
2025-01-29 11:47:20 +00:00
5 changed files with 19 additions and 83 deletions

View File

@@ -1,71 +0,0 @@
From 851473490281f82d82560b2368284ef33cf6e8f9 Mon Sep 17 00:00:00 2001
From: lizhenghao <sculizhenghao@foxmail.com>
Date: Wed, 22 Oct 2025 10:26:34 +0800
Subject: [PATCH 1/3] Fix: Fixed a read(-1) vulnerability caused by boundary
handling error in #264
---
source/decoder.c | 8 +++++++-
tests/test_decoder.py | 22 ++++++++++++++++++++++
2 files changed, 29 insertions(+), 1 deletion(-)
Index: cbor2-5.6.5/source/decoder.c
===================================================================
--- cbor2-5.6.5.orig/source/decoder.c
+++ cbor2-5.6.5/source/decoder.c
@@ -758,7 +758,7 @@ decode_definite_long_string(CBORDecoderO
char *buffer = NULL;
while (left) {
// Read up to 65536 bytes of data from the stream
- Py_ssize_t chunk_length = 65536 - buffer_size;
+ Py_ssize_t chunk_length = 65536 - buffer_length;
if (left < chunk_length)
chunk_length = left;
@@ -828,7 +828,13 @@ decode_definite_long_string(CBORDecoderO
memcpy(buffer, bytes_buffer + consumed, unconsumed);
}
buffer_length = unconsumed;
+ } else {
+ // All bytes consumed, reset buffer_length
+ buffer_length = 0;
}
+
+ Py_DECREF(chunk);
+ chunk = NULL;
}
if (ret && string_namespace_add(self, ret, length) == -1)
Index: cbor2-5.6.5/tests/test_decoder.py
===================================================================
--- cbor2-5.6.5.orig/tests/test_decoder.py
+++ cbor2-5.6.5/tests/test_decoder.py
@@ -260,6 +260,28 @@ def test_string_oversized(impl) -> None:
(impl.loads(unhexlify("aeaeaeaeaeaeaeaeae0108c29843d90100d8249f0000aeaeffc26ca799")),)
+def test_string_issue_264_multiple_chunks_utf8_boundary(impl) -> None:
+ """Test for Issue #264: UTF-8 characters split across multiple 65536-byte chunk boundaries."""
+ import struct
+
+ # Construct: 65535 'a' + '€' (3 bytes) + 65533 'b' + '€' (3 bytes) + 100 'd'
+ # Total: 131174 bytes, which spans 3 chunks (65536 + 65536 + 102)
+ total_bytes = 65535 + 3 + 65533 + 3 + 100
+
+ payload = b"\x7a" + struct.pack(">I", total_bytes) # major type 3, 4-byte length
+ payload += b"a" * 65535
+ payload += "€".encode() # U+20AC: E2 82 AC
+ payload += b"b" * 65533
+ payload += "€".encode()
+ payload += b"d" * 100
+
+ expected = "a" * 65535 + "€" + "b" * 65533 + "€" + "d" * 100
+
+ result = impl.loads(payload)
+ assert result == expected
+ assert len(result) == 131170 # 65535 + 1 + 65533 + 1 + 100 characters
+
+
@pytest.mark.parametrize(
"payload, expected",
[

Binary file not shown.

3
cbor2-5.7.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7a405a1d7c8230ee9acf240aad48ae947ef584e8af05f169f3c1bde8f01f8b71
size 102467

View File

@@ -1,10 +1,19 @@
-------------------------------------------------------------------
Wed Nov 19 10:56:07 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com>
Thu Oct 30 13:11:54 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Add CVE-2025-64076.patch from upstream. Fix: bug in
decode_definite_long_string() that causes incorrect chunk length
calculation
(bsc#1253746, CVE-2025-64076, gh#agronholm/cbor2#265)
- Update to 5.7.1
* Improved performance on decoding large definite bytestrings
* Fixed a read(-1) vulnerability caused by boundary handling error
-------------------------------------------------------------------
Mon Sep 29 10:21:41 UTC 2025 - Dirk Müller <dmueller@suse.com>
- update to 5.7.0:
* Added support for Python 3.14 (no free-threading support yet,
sorry)
* Dropped support for Python 3.8
* Added support for encoding indefinite containers
* Added complex number support (tag 43000)
-------------------------------------------------------------------
Tue Aug 12 08:01:01 UTC 2025 - Markéta Machová <mmachova@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-cbor2
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -23,14 +23,12 @@
%endif
%{?sle15_python_module_pythons}
Name: python-cbor2
Version: 5.6.5
Version: 5.7.1
Release: 0
Summary: Pure Python CBOR (de)serializer with extensive tag support
License: MIT
URL: https://github.com/agronholm/cbor2
Source: https://files.pythonhosted.org/packages/source/c/cbor2/cbor2-%{version}.tar.gz
# PATCH-FIX-UPSTREAM CVE-2025-64076.patch bsc#1253746 gh#agronholm/cbor2#265
Patch0: CVE-2025-64076.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module hypothesis}
BuildRequires: %{python_module pip}