---
title: "CVE-2022-24795"
canonical_url: "https://pkgseek.com/security/CVE-2022-24795"
locale: "zh-CN"
source: "pkgseek"
entity_type: "cve"
severity: "high"
---

# CVE-2022-24795

yajl-ruby is a C binding to the YAJL JSON parsing and generation library. The 1.x branch and the 2.x branch of \`yajl\` contain an integer overflow which leads to subsequent heap memory corruption when dealing with large (~2GB) inputs. The reallocation logic at \`yajl_buf.c#L64\` may result in the \`need\` 32bit integer wrapping to 0 when \`need\` approaches a value of 0x80000000 (i.e. ~2GB of data), which results in a reallocation of buf-&gt;alloc into a small heap chunk. These integers are declared as \`size_t\` in the 2.x branch of \`yajl\`, which practically prevents the issue from triggering on 64bit pl…

CVE-2022-24795 严重级别为 HIGH (7.5)，共索引 12 条受影响软件包构建记录，涉及 4 个发行版。

- **级别 / 评分**: HIGH (7.5)
- **受影响构建数**: 12
- **涉及发行版**: 4
- **已标明修复版本发行版**: Alibaba Cloud Linux, Oracle Linux, Red Hat Enterprise Linux, Ubuntu

## Affected Packages

| Distribution | Release | Package | Version | Fixed In |
| --- | --- | --- | --- | --- |
| Alibaba Cloud Linux | 3 | yajl | 2.1.0-12.0.1.al8 | 2.1.0-13.0.1.al8 |
| Alibaba Cloud Linux | 3 | yajl-devel | 2.1.0-12.0.1.al8 | 2.1.0-13.0.1.al8 |
| Alibaba Cloud Linux | 3 | yajl-doc | 2.1.0-12.0.1.al8 | 2.1.0-13.0.1.al8 |
| Oracle Linux | 8 | yajl | 2.1.0-10.el8 | 2.1.0-11.el8 |
| Oracle Linux | 9 | yajl | 2.1.0-20.el9 | 2.1.0-21.el9 |
| Red Hat Enterprise Linux | 9.8 | yajl | 2.1.0-20.el9 | 2.1.0-21.el9 |
| Ubuntu | focal | libyajl2 | 2.1.0-3 | 2.1.0-3ubuntu0.20.04.1 |
| Ubuntu | focal | libyajl-dev | 2.1.0-3 | 2.1.0-3ubuntu0.20.04.1 |
| Ubuntu | focal | libyajl-doc | 2.1.0-3 | 2.1.0-3ubuntu0.20.04.1 |
| Ubuntu | jammy | libyajl2 | 2.1.0-3build2 | 2.1.0-3ubuntu0.22.04.1 |
| Ubuntu | jammy | libyajl-dev | 2.1.0-3build2 | 2.1.0-3ubuntu0.22.04.1 |
| Ubuntu | jammy | libyajl-doc | 2.1.0-3build2 | 2.1.0-3ubuntu0.22.04.1 |
