Description
在 openGauss-server 的 src/gausskernel/cbb/utils/hll/hll.cpp 中,内置函数 HllObjectUnpack() 存在长度校验缺陷。该函数从用户提供的 packed HLL 解析 lenUsed 与 lenTotal 后,仅检查输入长度足以覆盖 HLL_HEAD_SIZE + lenUsed,随后按 lenTotal 分配缓冲区、按 lenUsed 调用 memcpy_s() 拷贝输入,既未校验 lenTotal >= lenUsed,也将 memcpy_s() 目标大小写成 lenUsed 而非实际分配的 lenTotal,导致安全拷贝无法拦截越界写。hll_in()、hll_print()、hll_cardinality() 等 SQL 入口会走同一解包路径。因此,普通数据库连接用户只需构造 lenTotal 小于 lenUsed 的畸形 packed HLL(例如经 ::hll 进入 hll_in()),即可触发服务端堆越界写,存在内存破坏风险。此问题随 packed HLL 解包函数 HllObjectUnpack() 进入代码,v2.1.0 起即存在。受影响版本包括 2.1.0、3.0.x、3.1.x、5.0.x、5.1.0、6.0.x,以及 7.0.0-RC1、7.0.0-RC2、7.0.0-RC3。该问题已在 7.0.0-LTS 版本修复,通过在 HllObjectUnpack() 中补齐 lenUsed <= lenTotal 校验,并将 memcpy_s() 的目标大小改为实际分配的 lenTotal。修复 PR 见 https://gitcode.com/opengauss/openGauss-server/pull/9380 。
Published: 2026-10-19
Score: 8.1 High
EPSS: < 1% Very Low
KEV: No
Impact: Heap overflow leading to memory corruption
Action: Patch Immediately
AI Analysis

Impact

The vulnerability resides in the HLL unpacking routine of openGauss-server. An attacker can craft a packed HLL payload where lenTotal is smaller than lenUsed. The function incorrectly validates only the header length, allocates a buffer of size lenTotal, and copies lenUsed bytes using memcpy_s with a target size of lenUsed. This mismatch allows an out‑of‑bounds write that corrupts heap memory, potentially leading to data corruption or a service crash. The flaw is triggered via standard database connections and through the SQL functions hll_in, hll_print, and hll_cardinality.

Affected Systems

Affected products are openGauss-server from version 2.1.0 through 6.x, plus the release‑candidate builds 7.0.0‑RC1 to RC3. All of these versions contain the defective HLL unpacking path. The fix was first introduced in the 7.0.0‑LTS release, which enforces a lenUsed <= lenTotal check and corrects the memcpy_s destination size.

Risk and Exploitability

The CVSS score of 8.1 indicates high severity. EPSS is not reported, and the vulnerability is not listed in the CISA KEV catalog. The flaw can be exploited by a normal database user by sending a malformed HLL literal, such as via the ::hll cast. No public exploit is known, but the potential for arbitrary heap memory overwrite makes the attack path dangerous.

Generated by OpenCVE AI on October 19, 2026 at 03:50 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to openGauss-server 7.0.0‑LTS or later, or apply the patch referenced by pull request 9380 from the vendor repository.
  • Disable or restrict the use of HLL functions (hll_in, hll_print, hll_cardinality) for untrusted connections by revoking privileges or configuring the database to reject malformed packed HLL inputs.
  • Validate the packed HLL data in application code before sending it to the database, ensuring that lenTotal is at least lenUsed and that the payload length matches the declared lengths.

Generated by OpenCVE AI on October 19, 2026 at 03:50 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 21 Oct 2026 17:15:00 +0000

Type Values Removed Values Added
First Time appeared Opengauss-server
Opengauss-server opengauss-server
Vendors & Products Opengauss-server
Opengauss-server opengauss-server

Mon, 19 Oct 2026 18:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Mon, 19 Oct 2026 02:45:00 +0000

Type Values Removed Values Added
Description 在 openGauss-server 的 src/gausskernel/cbb/utils/hll/hll.cpp 中,内置函数 HllObjectUnpack() 存在长度校验缺陷。该函数从用户提供的 packed HLL 解析 lenUsed 与 lenTotal 后,仅检查输入长度足以覆盖 HLL_HEAD_SIZE + lenUsed,随后按 lenTotal 分配缓冲区、按 lenUsed 调用 memcpy_s() 拷贝输入,既未校验 lenTotal >= lenUsed,也将 memcpy_s() 目标大小写成 lenUsed 而非实际分配的 lenTotal,导致安全拷贝无法拦截越界写。hll_in()、hll_print()、hll_cardinality() 等 SQL 入口会走同一解包路径。因此,普通数据库连接用户只需构造 lenTotal 小于 lenUsed 的畸形 packed HLL(例如经 ::hll 进入 hll_in()),即可触发服务端堆越界写,存在内存破坏风险。此问题随 packed HLL 解包函数 HllObjectUnpack() 进入代码,v2.1.0 起即存在。受影响版本包括 2.1.0、3.0.x、3.1.x、5.0.x、5.1.0、6.0.x,以及 7.0.0-RC1、7.0.0-RC2、7.0.0-RC3。该问题已在 7.0.0-LTS 版本修复,通过在 HllObjectUnpack() 中补齐 lenUsed <= lenTotal 校验,并将 memcpy_s() 的目标大小改为实际分配的 lenTotal。修复 PR 见 https://gitcode.com/opengauss/openGauss-server/pull/9380 。
Title HLL 反序列化 lenTotal/lenUsed 校验缺失导致堆越界写
Weaknesses CWE-122
References
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H'}


Subscriptions

Opengauss-server Opengauss-server
cve-icon MITRE

Status: PUBLISHED

Assigner: openGauss

Published:

Updated: 2026-10-19T17:42:42.026Z

Reserved: 2026-10-16T03:04:58.958Z

Link: CVE-2026-111441

cve-icon Vulnrichment

Updated: 2026-10-19T17:42:33.715Z

cve-icon NVD

Status : Deferred

Published: 2026-10-19T03:16:58.543

Modified: 2026-10-19T20:56:36.663

Link: CVE-2026-111441

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-10-21T17:01:28Z

Weaknesses
  • CWE-122

    Heap-based Buffer Overflow