{"schema":"threatline.record/2","record":{"id":"CVE-2026-111441","aliases":[],"summary":"HLL 反序列化 lenTotal/lenUsed 校验缺失导致堆越界写","details":"在 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 。","categories":["Unclassified"],"product":"openGauss-server","vendor":"openGauss-server","ecosystem":null,"affected_ranges":[{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-111441","source_modified_at":"2026-10-19T17:42:42.026Z","fetched_at":"2026-10-23T18:45:31.882637Z","product":"openGauss-server","vendor":"openGauss-server","versions":[{"status":"unaffected","version":"7.0.0-LTS"}],"defaultStatus":"unaffected"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-111441","source_modified_at":"2026-10-19T17:42:42.026Z","fetched_at":"2026-10-23T18:45:31.882637Z","product":"openGauss-server","vendor":"openGauss-server","versions":[{"status":"affected","version":"7.0.0-RC1, 7.0.0-RC2 7.0.0-RC3"},{"status":"affected","version":"2.1.0"},{"status":"affected","version":"3.0.0-3.0.6"},{"status":"affected","version":"3.1.0"},{"status":"affected","version":"5.0.0-5.0.5"},{"status":"affected","version":"6.0.0-6.0.6"}],"defaultStatus":"unaffected"}],"fixed_versions":[],"cvss":8.1,"severity":"High","kev":{"listed":false},"epss":{"probability":0.00404,"percentile":0.33575,"score_date":"2026-10-23"},"published_at":"2026-10-19T02:31:01.069Z","modified_at":"2026-10-19T17:42:42.026Z","provenance":[{"source":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-111441","fetched_at":"2026-10-23T18:45:31.882637Z","source_modified_at":"2026-10-19T17:42:42.026Z"},{"source":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-111441","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-23"}],"sources":["CVE List","EPSS"],"references":[{"source":"CVE List","url":"https://gitcode.com/opengauss/openGauss-server/pull/9380"}],"locations":[],"motoko_assessment":{"status":"requires_architecture_review","automatic_remediation":false},"cve_state":"PUBLISHED","cvss_source":"CVE List","ssvc":{"exploitation":"none","automatable":"no","technical_impact":"partial","assessed_at":"2026-10-19T17:42:18.566832Z"},"classification":{"method":"product-first software-layer rules","rules_version":"2.1","matched_on":null,"confidence":"unknown","reviewed":false},"change_timestamp":"2026-10-19T17:42:42.026Z","content_hash":"142163f190ff2761c9a8e866f0b1150e0a9a807e756be83b0b0aa084b97caaeb"}}
