Описание
Potential buffer overflow in CBOR2 decoder
Summary
Ever since https://github.com/agronholm/cbor2/pull/204 (or specifically https://github.com/agronholm/cbor2/commit/387755eacf0be35591a478d3c67fe10618a6d542) was merged, I can create a reproducible crash when running the snippet under PoC on a current Debian bullseye aarm64 on a Raspberry Pi 3 (I was not able to reproduce this on my x86_64 Laptop with Python 3.11; I suspect because there is enough memory to allocate still)
Details
PoC
If one calls it without the indirection via the pool executor, a SystemError is shown that hides the buffer overflow.
Impact
An attacker can crash a service using cbor2 to parse a CBOR binary by sending a long enough object.
Ссылки
- https://github.com/agronholm/cbor2/security/advisories/GHSA-375g-39jq-vq7m
- https://nvd.nist.gov/vuln/detail/CVE-2024-26134
- https://github.com/agronholm/cbor2/pull/204
- https://github.com/agronholm/cbor2/commit/387755eacf0be35591a478d3c67fe10618a6d542
- https://github.com/agronholm/cbor2/commit/4de6991ba29bf2290d7b9d83525eda7d021873df
- https://github.com/agronholm/cbor2/releases/tag/5.6.2
- https://github.com/pypa/advisory-database/tree/main/vulns/cbor2/PYSEC-2024-155.yaml
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/BT42VXZMMMCSSHMA65KKPOZCXJEYHNR5
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/GX524ZG2XJWFV37UQKQ4LWIH4UICSGEQ
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PWC3VU6YV6EXKCSX5GTKWLBZIDIJNQJY
Пакеты
cbor2
>= 5.5.1, < 5.6.2
5.6.2
Связанные уязвимости
cbor2 provides encoding and decoding for the Concise Binary Object Representation (CBOR) (RFC 8949) serialization format. Starting in version 5.5.1 and prior to version 5.6.2, an attacker can crash a service using cbor2 to parse a CBOR binary by sending a long enough object. Version 5.6.2 contains a patch for this issue.
cbor2 provides encoding and decoding for the Concise Binary Object Representation (CBOR) (RFC 8949) serialization format. Starting in version 5.5.1 and prior to version 5.6.2, an attacker can crash a service using cbor2 to parse a CBOR binary by sending a long enough object. Version 5.6.2 contains a patch for this issue.
cbor2 provides encoding and decoding for the Concise Binary Object Rep ...