HLL 反序列化 lenTotal/lenUsed 校验缺失导致堆越界写

Summary

CVECVE-2026-111441
StatePUBLISHED
AssigneropenGauss
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-10-19 03:16:58 UTC
Updated2026-10-19 20:56:36 UTC
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 。

Risk And Classification

Primary CVSS: v3.1 8.1 HIGH from a1a479f7-907b-4ae8-a999-9148cadc9224

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H

EPSS: 0.004040000 probability, percentile 0.332520000 (date 2026-10-19)

Problem Types: CWE-122 | CWE-122 CWE-122 Heap-based buffer overflow


VersionSourceTypeScoreSeverityVector
3.1a1a479f7-907b-4ae8-a999-9148cadc9224Secondary8.1HIGHCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H
3.1CNACVSS8.1HIGHCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA OpenGauss-server OpenGauss-server unaffected 7.0.0-LTS openEuler Centos
CNA OpenGauss-server OpenGauss-server affected 7.0.0-RC1, 7.0.0-RC2 7.0.0-RC3 openEuler Centos
CNA OpenGauss-server OpenGauss-server affected 2.1.0 openEuler Centos
CNA OpenGauss-server OpenGauss-server affected 3.0.0-3.0.6 openEuler Centos
CNA OpenGauss-server OpenGauss-server affected 3.1.0 openEuler Centos
CNA OpenGauss-server OpenGauss-server affected 5.0.0-5.0.5 openEuler Centos
CNA OpenGauss-server OpenGauss-server affected 6.0.0-6.0.6 openEuler Centos

References

ReferenceSourceLinkTags
gitcode.com/opengauss/openGauss-server/pull/9380 a1a479f7-907b-4ae8-a999-9148cadc9224 gitcode.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report