1
0
forked from pool/python-orjson

26 Commits

Author SHA256 Message Date
00f03220b9 Fix write outsize of allocated memory on json dump
Add CVE-2025-67221.patch to fix write outsize of allocated memory
on json dump (bsc#1257121, gh#ijl/orjson#637)
2026-01-26 09:53:38 +01:00
3346e0e69c Accepting request 1244153 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1244153
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-orjson?expand=0&rev=11
2025-02-09 18:59:07 +00:00
829877aa3d - Update to 3.10.15
* Publish PyPI manylinux aarch64 wheels built and tested on aarch64.
  * Publish PyPI musllinux aarch64 and arm7l wheels built and tested on aarch64.
  * Publish PyPI manylinux Python 3.13 wheels for i686, arm7l, ppc64le, and s390x.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-orjson?expand=0&rev=25
2025-02-07 13:11:05 +00:00
edeac2ad8b Accepting request 1236919 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1236919
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-orjson?expand=0&rev=10
2025-01-12 10:09:19 +00:00
20568c0341 - Update to 3.10.14
* Specify build system dependency on maturin>=1,<2 again.
  * Allocate memory using PyMem_Malloc() and similar APIs for
    integration with pymalloc, mimalloc, and tracemalloc.
  * Source distribution does not ship compressed test documents and
    relevant tests skip if fixtures are not present.
  * Build now depends on Rust 1.82 or later instead of 1.72.
- Release 3.10.13
  * Fix compatibility with maturin introducing a breaking change in
    1.8.0 and specify a fixed version of maturin. Projects relying
    on any previous version being buildable from source by end
    users (via PEP 517) must upgrade to at least this version.
- Remove pendulum from tests: Not desired in Ring1 and not
  maintained upstream. It's only supported on x86_64.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-orjson?expand=0&rev=23
2025-01-10 16:55:16 +00:00
0e46bef571 Accepting request 1227755 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1227755
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-orjson?expand=0&rev=9
2024-12-03 19:45:41 +00:00
93c1023f65 update to 3.10.12
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-orjson?expand=0&rev=21
2024-12-02 12:29:44 +00:00
719bbc61f2 Accepting request 1199665 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1199665
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-orjson?expand=0&rev=8
2024-09-10 19:12:25 +00:00
2183a10681 Accepting request 1153104 from devel:languages:python
- Update to 3.9.15 (bsc#1220489, CVE-2024-27454):
  * Implement recursion limit of 1024 on orjson.loads().
  * Use byte-exact read on str formatting SIMD path to avoid crash.
- 3.9.14:
  * Fix crash serializing str introduced in 3.9.11.
  * Build now depends on Rust 1.72 or later.
- 3.9.13:
  * Serialization str escape uses only 128-bit SIMD.
  * Fix compatibility with CPython 3.13 alpha 3.
  * Publish musllinux_1_2 instead of musllinux_1_1 wheels.
  * Serialization uses small integer optimization in CPython 3.12 or later.
- 3.9.12:
  * Minimal musllinux_1_1 build due to sporadic CI failure.
- 3.9.11:
  * Improve performance of serializing. str is significantly faster. Documents
    using dict, list, and tuple are somewhat faster.
- Update to 3.9.10
  * Fix debug assert failure on 3.12 --profile=dev build.
- Release 3.9.9
  * orjson module metadata explicitly marks subinterpreters as not
    supported.
- Release 3.9.8
  * Improve performance.
  * Drop support for Python 3.7.
- Release 3.9.7
  * Fix crash in orjson.loads() due to non-reentrant handling of
    persistent buffer. This was introduced in 3.9.3.
  * Handle some FFI removals in CPython 3.13.
- Release 3.9.6
  * Fix numpy reference leak on unsupported array dtype.
  * Fix numpy.datetime64 reference handling.
  * Minor performance improvements.
- Release 3.9.5
  * Remove futex from module import and initialization path.
- Release 3.9.4
  * Fix hash builder using default values.
  * Fix non-release builds of orjson copying large deserialization
    buffer from stack to heap. This was introduced in 3.9.3.
- Release 3.9.3
  * Fix compatibility with CPython 3.12.
  * Support i686/x86 32-bit Python installs on Windows.
- Release 3.9.2
  * Fix the __cause__ exception on orjson.JSONEncodeError possibly
    being denormalized, i.e., of type str instead of Exception.
- Release 3.9.1
  * Fix memory leak on chained tracebacks of exceptions raised in
    default. This was introduced in 3.8.12.
- Release 3.9.0
  * orjson.Fragment includes already-serialized JSON in a document.
- Release 3.8.13
  * Source distribution contains all source code required for an
    offline build.
  * Build uses maturin v1.
- Release 3.8.12
    * Exceptions raised in default are now chained as the __cause__
      attribute on orjson.JSONEncodeError.
- Release 3.8.11
  * orjson.loads() on an empty document has a specific error
    message.
- Avoid cargo_audit error because of shipped old vulnerable
  zerocopy: Devendor the shipped cargo and update the cargo_vendor
  service
- Add %{?sle15_python_module_pythons}
- Update to 3.8.10:
  - Fix compatibility with CPython 3.12.0a7.
  - Fix compatibility with big-endian architectures.
  - Fix crash in serialization.
  - Fix parallel initialization of orjson.
- update to 3.8.3:
  * `orjson.dumps()` accepts `option=None` per `Optional[int]` type.
  * Fix tests on 32-bit for `numpy.intp` and `numpy.uintp`.
  * Build now depends on rustc 1.60 or later.
  * Support building with maturin 0.13 or 0.14.
- Update to 3.8.1 
  - Build maintenance for Python 3.11.
- Update to 3.8.0:
  - Support serializing numpy.int16 and numpy.uint16.
  - Fix datetime regression tests with tzinfo 2022b.
- Activate test suite
- Tidy spec
- initial package of version 3.7.7

OBS-URL: https://build.opensuse.org/request/show/1153104
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-orjson?expand=0&rev=7
2024-02-29 20:49:54 +00:00
a0f90736f1 - Update to 3.9.15 (bsc#1220489, CVE-2024-27454):
* Implement recursion limit of 1024 on orjson.loads().
  * Use byte-exact read on str formatting SIMD path to avoid crash.
- 3.9.14:
  * Fix crash serializing str introduced in 3.9.11.
  * Build now depends on Rust 1.72 or later.
- 3.9.13:
  * Serialization str escape uses only 128-bit SIMD.
  * Fix compatibility with CPython 3.13 alpha 3.
  * Publish musllinux_1_2 instead of musllinux_1_1 wheels.
  * Serialization uses small integer optimization in CPython 3.12 or later.
- 3.9.12:
  * Minimal musllinux_1_1 build due to sporadic CI failure.
- 3.9.11:
  * Improve performance of serializing. str is significantly faster. Documents
    using dict, list, and tuple are somewhat faster.
- Update to 3.9.10

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-orjson?expand=0&rev=17
2024-02-29 06:56:38 +00:00
1bfe16a5e4 Accepting request 1138742 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1138742
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-orjson?expand=0&rev=6
2024-01-15 21:19:59 +00:00
cd0daeabc7 Accepting request 1138592 from home:bnavigator:branches:devel:languages:python
- Update to 3.8.10
  * Fix debug assert failure on 3.12 --profile=dev build.
- Release 3.9.9
  * orjson module metadata explicitly marks subinterpreters as not
    supported.
- Release 3.9.8
  * Improve performance.
  * Drop support for Python 3.7.
- Release 3.9.7
  * Fix crash in orjson.loads() due to non-reentrant handling of
    persistent buffer. This was introduced in 3.9.3.
  * Handle some FFI removals in CPython 3.13.
- Release 3.9.6
  * Fix numpy reference leak on unsupported array dtype.
  * Fix numpy.datetime64 reference handling.
  * Minor performance improvements.
- Release 3.9.5
  * Remove futex from module import and initialization path.
- Release 3.9.4
  * Fix hash builder using default values.
  * Fix non-release builds of orjson copying large deserialization
    buffer from stack to heap. This was introduced in 3.9.3.
- Release 3.9.3
  * Fix compatibility with CPython 3.12.
  * Support i686/x86 32-bit Python installs on Windows.
- Release 3.9.2
  * Fix the __cause__ exception on orjson.JSONEncodeError possibly
    being denormalized, i.e., of type str instead of Exception.
- Release 3.9.1
  * Fix memory leak on chained tracebacks of exceptions raised in

OBS-URL: https://build.opensuse.org/request/show/1138592
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-orjson?expand=0&rev=15
2024-01-15 03:47:22 +00:00
4843e91312 Accepting request 1092239 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1092239
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-orjson?expand=0&rev=5
2023-06-12 13:25:47 +00:00
2f205c164f Accepting request 1092118 from home:ecsos:python
- Add %{?sle15_python_module_pythons}

OBS-URL: https://build.opensuse.org/request/show/1092118
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-orjson?expand=0&rev=13
2023-06-11 11:37:07 +00:00
4824a5ddff Accepting request 1079288 from devel:languages:python
- Update to 3.8.10:
  - Fix compatibility with CPython 3.12.0a7.
  - Fix compatibility with big-endian architectures.
  - Fix crash in serialization.
  - Fix parallel initialization of orjson.

OBS-URL: https://build.opensuse.org/request/show/1079288
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-orjson?expand=0&rev=4
2023-04-14 11:13:24 +00:00
945e2381fd - Update to 3.8.10:
- Fix compatibility with CPython 3.12.0a7.
  - Fix compatibility with big-endian architectures.
  - Fix crash in serialization.
  - Fix parallel initialization of orjson.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-orjson?expand=0&rev=11
2023-04-13 19:02:59 +00:00
aaee006568 Accepting request 1046301 from devel:languages:python
- update to 3.8.3:
  * `orjson.dumps()` accepts `option=None` per `Optional[int]` type.
  * Fix tests on 32-bit for `numpy.intp` and `numpy.uintp`.
  * Build now depends on rustc 1.60 or later.
  * Support building with maturin 0.13 or 0.14.

OBS-URL: https://build.opensuse.org/request/show/1046301
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-orjson?expand=0&rev=3
2023-01-03 14:05:29 +00:00
decba6fff4 - update to 3.8.3:
* `orjson.dumps()` accepts `option=None` per `Optional[int]` type.
  * Fix tests on 32-bit for `numpy.intp` and `numpy.uintp`.
  * Build now depends on rustc 1.60 or later.
  * Support building with maturin 0.13 or 0.14.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-orjson?expand=0&rev=9
2023-01-02 20:10:26 +00:00
13ebf4b5a3 Accepting request 1032049 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1032049
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-orjson?expand=0&rev=2
2022-10-29 18:16:38 +00:00
bd1931843c Accepting request 1032026 from home:yarunachalam:branches:devel:languages:python
- Update to 3.8.1 
  - Build maintenance for Python 3.11.

OBS-URL: https://build.opensuse.org/request/show/1032026
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-orjson?expand=0&rev=7
2022-10-28 20:13:18 +00:00
3e3d4325a4 Accepting request 1005242 from devel:languages:python
dep of sr#1004914

OBS-URL: https://build.opensuse.org/request/show/1005242
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-orjson?expand=0&rev=1
2022-09-22 12:49:44 +00:00
39319bfa41 Accepting request 1005240 from home:mcalabkova:branches:devel:languages:python
no need to skip so many tests

OBS-URL: https://build.opensuse.org/request/show/1005240
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-orjson?expand=0&rev=5
2022-09-21 15:19:34 +00:00
f9e995d349 - Update to 3.8.0:
- Support serializing numpy.int16 and numpy.uint16.
  - Fix datetime regression tests with tzinfo 2022b.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-orjson?expand=0&rev=4
2022-09-21 12:13:50 +00:00
47f0c26c36 Update vendored cargo modules.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-orjson?expand=0&rev=3
2022-09-21 12:03:33 +00:00
853d01aecc Accepting request 1005082 from home:jayvdb:branches:devel:languages:python
- Activate test suite
- Tidy spec

OBS-URL: https://build.opensuse.org/request/show/1005082
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-orjson?expand=0&rev=2
2022-09-21 07:48:56 +00:00
069ae44ecf Accepting request 1004332 from home:VortexAcherontic:bottles:Next
I'd like to submit this package on my own even though I did not packaged it myself.

But I'll require this module to be in this repo and Factory in order to submit python-fvs from home:VortexAcherontic:bottles:Next to this repo and Factory too.

To finally update bottles in games:tools to it's most recent release as libadwaita 1.2 is now stable. Which was a long time blocker for bottles to be updated in games:tools.

If I should better ask the original maintainer to submit this package please let me know.

All the best, V.

OBS-URL: https://build.opensuse.org/request/show/1004332
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-orjson?expand=0&rev=1
2022-09-19 11:18:49 +00:00
11 changed files with 132 additions and 19 deletions

45
CVE-2025-67221.patch Normal file
View File

@@ -0,0 +1,45 @@
From e959d90ac722022b781b19f86e6ea9adaba8e383 Mon Sep 17 00:00:00 2001
From: Daniel Garcia Moreno <dani@danigm.net>
Date: Fri, 23 Jan 2026 20:22:23 +0100
Subject: [PATCH] formatter: reserve_minimum in end_ methods
In highly nested json objects it's possible to have a lot of consecutive
closing characters that are added by end_array and end_object. These
methods adds one byte without checking the buffer capacity, so it's
possible to try to write when there's no capacity.
This patch makes sure that the buffer has at least minimum space before
writing.
This is the upstream commit that removes this check: c369ea44820e2e0798f17f99a0dff65bec2186a9
```
$ git log -p c369ea44820e2e0798f17f99a0dff65bec2186a9 -- src/serialize/writer/formatter.rs
```
Fix https://github.com/ijl/orjson/issues/636
---
src/serialize/writer/formatter.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: orjson-3.10.15/src/serialize/writer/formatter.rs
===================================================================
--- orjson-3.10.15.orig/src/serialize/writer/formatter.rs
+++ orjson-3.10.15/src/serialize/writer/formatter.rs
@@ -202,7 +202,7 @@ pub trait Formatter {
where
W: ?Sized + io::Write + WriteExt,
{
- debug_assert_has_capacity!(writer);
+ reserve_minimum!(writer);
unsafe { writer.write_reserved_punctuation(b']').unwrap() };
Ok(())
}
@@ -244,7 +244,7 @@ pub trait Formatter {
where
W: ?Sized + io::Write + WriteExt,
{
- debug_assert_has_capacity!(writer);
+ reserve_minimum!(writer);
unsafe {
writer.write_reserved_punctuation(b'}').unwrap();
}

7
PACKAGING_README.md Normal file
View File

@@ -0,0 +1,7 @@
# Packaging python-orjson
1. Change the version in the spec file
2. Delete the old sdist
3. Run `osc service runall download_files && sh ./devendor-sdist.sh && osc service runall cargo_vendor`
4. Create a changelog entry
5. Commit the changes as usual

BIN
orjson-3.10.15-devendored.tar.xz LFS Normal file

Binary file not shown.

BIN
orjson-3.10.15.tar.gz LFS Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1,3 +1,68 @@
-------------------------------------------------------------------
Mon Jan 26 08:53:23 UTC 2026 - Daniel Garcia <daniel.garcia@suse.com>
- Add CVE-2025-67221.patch to fix write outsize of allocated memory
on json dump (bsc#1257121, gh#ijl/orjson#637)
-------------------------------------------------------------------
Fri Feb 7 12:53:21 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Update to 3.10.15
* Publish PyPI manylinux aarch64 wheels built and tested on aarch64.
* Publish PyPI musllinux aarch64 and arm7l wheels built and tested on aarch64.
* Publish PyPI manylinux Python 3.13 wheels for i686, arm7l, ppc64le, and s390x.
-------------------------------------------------------------------
Fri Jan 10 14:28:05 UTC 2025 - Ben Greiner <code@bnavigator.de>
- Update to 3.10.14
* Specify build system dependency on maturin>=1,<2 again.
* Allocate memory using PyMem_Malloc() and similar APIs for
integration with pymalloc, mimalloc, and tracemalloc.
* Source distribution does not ship compressed test documents and
relevant tests skip if fixtures are not present.
* Build now depends on Rust 1.82 or later instead of 1.72.
- Release 3.10.13
* Fix compatibility with maturin introducing a breaking change in
1.8.0 and specify a fixed version of maturin. Projects relying
on any previous version being buildable from source by end
users (via PEP 517) must upgrade to at least this version.
- Remove pendulum from tests: Not desired in Ring1 and not
maintained upstream. It's only supported on x86_64.
-------------------------------------------------------------------
Mon Dec 2 11:05:13 UTC 2024 - Johannes Kastl <opensuse_buildservice@ojkastl.de>
- update to 3.10.12:
* Changed
- Publish PyPI manylinux i686 wheels.
- Publish PyPI musllinux i686 and arm7l wheels.
- Publish PyPI macOS wheels for Python 3.10 or later built on
macOS 15.
- Publish PyPI Windows wheels using trusted publishing.
- update to 3.10.11:
* Changed
- Improve performance of UUIDs.
- Publish PyPI wheels with trusted publishing and PEP 740
attestations.
- Include text of licenses for vendored dependencies.
- update to 3.10.10:
* Fixed
- Fix int serialization on s390x. This was introduced in 3.10.8.
* Changed
- Publish aarch64 manylinux_2_17 wheel for 3.13 to PyPI.
- update to 3.10.9:
* Fixed
- Fix int serialization on 32-bit Python 3.8, 3.9, 3.10. This
was introduced in 3.10.8.
- update to 3.10.8:
* Changed
- int serialization no longer chains OverflowError to the
- the __cause__ attribute of orjson.JSONEncodeError when range
exceeded.
- Compatibility with CPython 3.14 alpha 1.
- Improve performance.
-------------------------------------------------------------------
Mon Sep 9 10:29:05 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-orjson
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,16 +18,19 @@
%{?sle15_python_module_pythons}
Name: python-orjson
Version: 3.10.7
Version: 3.10.15
Release: 0
Summary: Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy
License: Apache-2.0 OR MIT
URL: https://github.com/ijl/orjson
# Update: Run `osc service runall download_files && sh ./devendor-sdist.sh && osc service runall cargo_vendor`
# Update: Change version and run `osc rm orjson-*.tar.gz && osc service runall download_files && sh ./devendor-sdist.sh && osc service runall cargo_vendor`
Source0: orjson-%{version}-devendored.tar.xz
Source1: vendor.tar.xz
Source2: https://files.pythonhosted.org/packages/source/o/orjson/orjson-%{version}.tar.gz
Source3: devendor-sdist.sh
Source4: PACKAGING_README.md
# PATCH-FIX-OPENSUSE CVE-2025-67221.patch gh#ijl/orjson#637
Patch0: CVE-2025-67221.patch
BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module maturin >= 1}
BuildRequires: %{python_module pip}
@@ -38,7 +41,6 @@ BuildRequires: fdupes
BuildRequires: python-rpm-macros
# SECTION test requirements
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module pendulum}
BuildRequires: %{python_module psutil}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module python-dateutil}
@@ -53,7 +55,7 @@ orjson is a fast JSON library for Python.
It benchmarks as the fastest Python library for JSON.
%prep
%autosetup -a1 -n orjson-%{version}
%autosetup -p1 -a1 -n orjson-%{version}
%build
%pyproject_wheel

BIN
vendor.tar.xz LFS

Binary file not shown.