This issue requires an assignee. Since you haven't specified one, we've assigned TestManager as the default assignee for this issue.


Welcome To openGauss Community
Hey @Wwwing301 , thanks for your contribution to the community.
Bot Usage Manual
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands. You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
Contact Guide
If you have any questions, please contact the SIG: StorageEngine, AI, CM, CloudNative, SecurityTechnology, SQLEngine ,
and any of the maintainers: @CarrotGo, @chendong76, @chenxiaobin19, @congzhou2603, @dodders, @hwworkholic, @jemappellehc, @libiao2024, @muyulinzhong, @quemingjian, @shenzheng4, @shirley_zhengx, @superlchf, @totaj, @wlff234, @wofanzheng, @ywzq1161327784 ,
and any of the committers: @Igali, @bihua111, @cailei19, @h_ray, @levy53071, @libiao2024, @lihaixiao, @mrzack, @wangfeihuo, @wuyuechuan, @xiong_xjun, @zhangfengzhi123, @zhangxubo, @zhangzq131, @zjh_hw .


B023



验收日期:2026-9-15
验收结论:验收通过
验收版本:7.0.0.B023





测试类型
安全
测试版本
7.0.0LTS
问题描述
OGAI 功能读取
ogai.key.cipher和ogai.key.rand时会传入OGAI_MODE。该模式已经定义在枚举中,但公共密钥文件读取函数没有把它列入支持范围,因此直接报invalid key mode。调用方事先把密钥缓冲区清零,而读取函数没有返回状态。读取失败后,上层无法判断错误,空密钥缓冲区可能继续传给后续加密函数。
操作系统和硬件信息
Ubuntu 22.04.5 LTS,x86_64。
测试环境
企业版单机
被测功能
OGAI API key 加密流程读取本地密钥文件时的模式分派。
预置条件
安装支持 C++17 的
g++,并将附件poc.cc保存到当前目录。操作步骤
预期输出
已定义的
OGAI_MODE应被密钥文件读取函数识别。读取失败时应把错误返回给调用方,并停止后续加密。实际输出
SUBSCRIPTION_MODE对照正常通过;OGAI_MODE被拒绝并输出:日志信息
相关代码:
src/include/cipher.h:80-95src/common/port/cipher.cpp:470-483,799-820,891-900src/gausskernel/cbb/utils/aes/cipherfn.cpp:808-885,897-943src/gausskernel/storage/access/datavec/ogai.cpp:484-520提单组织
社区用户
测试代码