{"id":"CVE-2026-111441","kind":"vulnerability","aliases":["CVE-2026-111441"],"related":[],"title":"openGauss: crafted packed HLL input overflows server heap in HllObjectUnpack","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 。","summary":"openGauss's HllObjectUnpack() in hll.cpp checks only that the input covers the used length, then allocates by the total length and copies by the used length without checking that total is at least used. A database user who sends a malformed packed HLL, for example via ::hll into hll_in(), can trigger a heap out-of-bounds write on the server.","severity":"high","cvss":8.1,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["database","hll","opengauss","runtime","self-hosted"],"not_affected_if":["7.0.0-lts","patched-version"],"how_to_check":"- Check the openGauss-server version in use; the description lists affected versions 2.1.0, 3.0.x, 3.1.x, 5.0.x, 5.1.0, 6.0.x and 7.0.0-RC1 through RC3.\n- Confirm whether the installed build includes the fix from PR https://gitcode.com/opengauss/openGauss-server/pull/9380 (fixed in 7.0.0-LTS).","fix":"- Upgrade openGauss-server to 7.0.0-LTS or a build that includes PR 9380.\n- Until patched, restrict which database users can run hll functions or cast input to ::hll.","status":"open","published_at":"2026-10-19T03:16:58+00:00","first_seen_at":"2026-10-23T21:57:17+00:00","triaged_at":"2026-10-25T03:06:37+00:00","updated_at":"2026-10-25T03:06:37+00:00","category":"runtime","confidence":0.7,"triage":{"at":"2026-10-25T03:06:37Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade openGauss-server to 7.0.0-LTS or a build that includes PR 9380.\n- Until patched, restrict which database users can run hll functions or cast input to ::hll.","reach":"network","title":"openGauss: crafted packed HLL input overflows server heap in HllObjectUnpack","impact":"high","summary":"openGauss's HllObjectUnpack() in hll.cpp checks only that the input covers the used length, then allocates by the total length and copies by the used length without checking that total is at least used. A database user who sends a malformed packed HLL, for example via ::hll into hll_in(), can trigger a heap out-of-bounds write on the server.","category":"runtime","nicknames":[],"who_cares":["openGauss","self-hosted","database","hll"],"confidence":0.7,"needs_auth":"yes","worst_case":"A database user can corrupt server heap memory, risking code execution.","analyst_note":"Confirm whether the hll extension is installed by default and whether the fix PR 9380 is in the release notes for each affected branch.","how_to_check":"- Check the openGauss-server version in use; the description lists affected versions 2.1.0, 3.0.x, 3.1.x, 5.0.x, 5.1.0, 6.0.x and 7.0.0-RC1 through RC3.\n- Confirm whether the installed build includes the fix from PR https://gitcode.com/opengauss/openGauss-server/pull/9380 (fixed in 7.0.0-LTS).","needs_analyst":true,"not_affected_if":["patched-version","7.0.0-LTS"],"who_is_affected":"Any openGauss-server deployment on the affected versions that has the hll extension in use is exposed, since hll_in(), hll_print() and hll_cardinality() all reach the vulnerable unpack path. Any connected database user can trigger it, so multi-tenant or user-facing databases carry the most risk. Deployments already on 7.0.0-LTS or a build with the fix can skip it.","user_interaction":"no","needs_special_setup":"unknown","severity_if_unknown":"high"},"cost_usd":0.00075,"input_tokens":3882,"output_tokens":724,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-111441':13A,16A '-2026':12A,15A '/opengauss/opengauss-server/pull/9380':199C '2.1.0':162C '3.0':163C '3.1':165C '5.0':167C '5.1.0':169C '6.0':170C '7.0.0':173C,175C,177C,180C 'alloc':39B 'bound':81B 'cardin':134C 'check':29B,51B 'copi':45B 'cover':34B 'craft':2A 'cve':11A,14A 'databas':17B,59B 'exampl':68B 'gitcode.com':198C 'gitcode.com/opengauss/opengauss-server/pull/9380':197C 'head':106C 'heap':8A,77B 'hll':4A,18B,66B,70B,72B,98C,105C,129C,131C,133C,145C,147C,149C,155C 'hll.cpp':28B 'hllobjectunpack':10A,26B,94C,157C,184C 'host':23B 'input':5A,33B 'least':56B 'length':37B,43B,49B 'lentot':102C,110C,119C,127C,140C,187C,193C 'lenus':100C,108C,113C,120C,125C,142C,186C 'lts':181C 'malform':64B 'memcpi':115C,122C,190C 'opengauss':1A,19B,24B,88C 'opengauss-serv':87C 'out-of-bound':78B 'overflow':6A 'pack':3A,65B,97C,144C,154C 'pr':195C 'print':132C 'rc1':174C 'rc2':176C 'rc3':178C 'runtim':20B 'self':22B 'self-host':21B 'send':62B 'server':7A,85B,89C 'size':107C 'sql':136C 'src/gausskernel/cbb/utils/hll/hll.cpp':91C 'total':42B,53B 'trigger':75B 'use':36B,48B,57B 'user':60B 'v2.1.0':159C 'via':69B 'without':50B 'write':82B 'x':164C,166C,168C,171C '与':101C '中':92C '中补齐':185C '也将':121C '仅检查输入长度足以覆盖':104C '以及':172C '例如经':146C '修复':194C '入口会走同一解包路径':137C '内置函数':93C '分配缓冲区':111C '即可触发服务端堆越界写':151C '受影响版本包括':161C '后':103C '因此':138C '在':86C '存在内存破坏风险':152C '存在长度校验缺陷':95C '导致安全拷贝无法拦截越界写':128C '小于':141C '并将':189C '拷贝输入':117C '按':112C '既未校验':118C '普通数据库连接用户只需构造':139C '校验':188C '此问题随':153C '版本修复':182C '的':90C '的畸形':143C '的目标大小改为实际分配的':192C '目标大小写成':124C '等':135C '而非实际分配的':126C '见':196C '解包函数':156C '解析':99C '该函数从用户提供的':96C '该问题已在':179C '调用':114C '起即存在':160C '进入':148C '进入代码':158C '通过在':183C '随后按':109C","nicknames":[],"mitigations":[],"who_affected":"Any openGauss-server deployment on the affected versions that has the hll extension in use is exposed, since hll_in(), hll_print() and hll_cardinality() all reach the vulnerable unpack path. Any connected database user can trigger it, so multi-tenant or user-facing databases carry the most risk. Deployments already on 7.0.0-LTS or a build with the fix can skip it.","tier":"B","verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-19T03:16:58+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H","cvss_by":"a1a479f7-907b-4ae8-a999-9148cadc9224","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-111441","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-111441","severity":null,"published_at":"2026-10-19T03:16:58+00:00","modified_at":"2026-10-19T20:56:36+00:00","first_seen_at":"2026-10-23T21:57:17+00:00","fetched_at":"2026-10-23T22:28:56+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}