登录
注册
开源
企业版
高校版
搜索
帮助中心
使用条款
关于我们
开源
企业版
高校版
私有云
模力方舟
登录
注册
就在本周六,成都站 Gitee Talk | 模力方舟 AI 应用开发沙龙抢占最后席位!聚焦 AI 开发全链路,结识技术同频人~
代码拉取完成,页面将自动刷新
捐赠
捐赠前请先登录
取消
前往登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
Watch
不关注
关注所有动态
仅关注版本发行动态
关注但不提醒动态
12
Star
0
Fork
14
src-openEuler
/
checkpolicy
代码
Issues
2
Pull Requests
2
Wiki
统计
流水线
服务
JavaDoc
PHPDoc
质量分析
Jenkins for Gitee
腾讯云托管
腾讯云 Serverless
悬镜安全
阿里云 SAE
Codeblitz
SBOM
我知道了,不再自动展开
更新失败,请稍后重试!
移除标识
内容风险标识
本任务被
标识为内容中包含有代码安全 Bug 、隐私泄露等敏感信息,仓库外成员不可访问
回合上游社区补丁,补丁数量:17
已完成
#IBSZ5E
缺陷
peulerosci
创建于
2025-03-13 09:47
<h3>优先级:</h3>次要 <h3>原因分析:</h3> 【是否新引入rpm包,是否进行了安全编译选项扫描】 否 【定位分析】 合入17个补丁: <table><tbody><tr><td>软件包</td><td>CommitId</td><td>描述</td><td>分析人</td></tr><tr><td>openEuler:checkpolicy</td><td>39b3cc51350a4ba670f9f38493311ec316e4d84d</td><td>checkpolicy: handle unprintable token In case the erroneous token is unprintable, e.g. a control character,print its hex value instead. Include the necessary header for isprint to avoid an implicitfunction declaration: policy_scan.l: In function ‘yyerror’:policy_scan.l:342:13: warning: implicit declaration of function ‘isprint’ [-Wimplicit-function-declaration]342 | if {| ^~~~~~~policy_scan.l:36:1: note: include ‘’ or provide a declaration of ‘isprint’35 | #include y.tab.h+++ |+#include36 | #endif This does not currently break the build cause -Werror is stripped forthe parsing code to avoid breakage on old flex/bison versions that mightnot generate warning free code. The special error value YYerror is only available since bison 3.6. For example the version used by oss-fuzz does notsupport it. Use a special token in case YYerror is not available. Only downside isa duplicate error message, one from the manual yyerror. Free the temporary bounds type in the error branches. Free the ebitmaps inside the rolesets on error. Close the input file and free all memory by the queue and lexer on asyntax or parse error. Inform bison about an invalid character by returning YYerror, so theparser can cleanup internal state and return the failure via yyparse.Currently the error is only observable via the global variablepolicydb_errors, which needs to be checked separately. Free the two identifiers on an invalid typebounds in the error branch,similar to the success branch. The passed expression needs to be transferred into the policy or free'dby the sink functions define_constraint. Free identifiers removed from the queue but not yet owned by the policyon errors. The lower 64 bits of the subnet prefix for an ibpkeycon rule shouldall be 0's. Unfortunately the check uses the s6_addr macro which refersto the 16 entry array of 8-bit values in the union and does not referto the correct bits. Use the s6_addr32 macro instead which refers to the 4 entry array of32-bit values in the union and refers to the lower 64 bits. If declare_symbol returns 1 the id and the datum are already definedand not consumed by the function, so it they must be free'd by thecaller. Example policy : class s sid e class s{i}optional{require{bool K;}bool K true; Example policy generated by fuzzer: class ssid kclass s { i }optional{require{attribute i;}}type m;typealias m alias i; typeai When a user is created in an optional block, a user datum is addedto both the avrule_decl's symtab and the policydb's symtab, butthe semantic MLS information is only added to the avrule_decl'suser datum. This causes an error to occur during policy expansionwhen user_copy_callback is called. If this error did not occurthen the policydb's user datum would be written without any MLSinfo and the policy would fail validation when read later. When creating a user datum, search for a user datum with the samekey in the policydb's symtab. If that datum has no MLS information,then copy the MLS information from the avrule_decl's datum. If itdoes, then compare the default level, low level, and high levelsensitivities and give an error if they do not match. There is notenough information to expand the categories for the high and lowlevels, so merge the semantic categories. If the two category setsare not equal an error will occur during the expansion phase. Avoid calling strdup with a NULL pointer, which can happen with aninvalid policy context, e.g.: class Csid Sclass C { P };user U roles j;sid S s:l:q:q:q 【对外部是否有影响】 否 【是否修改引入】 <table><tbody><tr><td>该问题在当前版本是否修改引入可填写</td><td>写明引入单的DTS号并在此单关联,且立即知会版本经理或测试经理可填写</td></tr><tr><td>否</td><td> </td></tr></tbody></table> **二、缺陷分析结构反馈** 影响性分析说明: 缺陷严重等级:(Critical/High/Moderate/Low) 缺陷根因说明: 受影响版本排查(受影响/不受影响): openEuler-20.03-LTS-SP4 openEuler-22.03-LTS-SP3 openEuler-22.03-LTS-SP4 openEuler-24.03-LTS openEuler-24.03-LTS-SP1 修复是否涉及abi变化(是/否): openEuler-20.03-LTS-SP4 openEuler-22.03-LTS-SP3 openEuler-22.03-LTS-SP4 openEuler-24.03-LTS openEuler-24.03-LTS-SP1
<h3>优先级:</h3>次要 <h3>原因分析:</h3> 【是否新引入rpm包,是否进行了安全编译选项扫描】 否 【定位分析】 合入17个补丁: <table><tbody><tr><td>软件包</td><td>CommitId</td><td>描述</td><td>分析人</td></tr><tr><td>openEuler:checkpolicy</td><td>39b3cc51350a4ba670f9f38493311ec316e4d84d</td><td>checkpolicy: handle unprintable token In case the erroneous token is unprintable, e.g. a control character,print its hex value instead. Include the necessary header for isprint to avoid an implicitfunction declaration: policy_scan.l: In function ‘yyerror’:policy_scan.l:342:13: warning: implicit declaration of function ‘isprint’ [-Wimplicit-function-declaration]342 | if {| ^~~~~~~policy_scan.l:36:1: note: include ‘’ or provide a declaration of ‘isprint’35 | #include y.tab.h+++ |+#include36 | #endif This does not currently break the build cause -Werror is stripped forthe parsing code to avoid breakage on old flex/bison versions that mightnot generate warning free code. The special error value YYerror is only available since bison 3.6. For example the version used by oss-fuzz does notsupport it. Use a special token in case YYerror is not available. Only downside isa duplicate error message, one from the manual yyerror. Free the temporary bounds type in the error branches. Free the ebitmaps inside the rolesets on error. Close the input file and free all memory by the queue and lexer on asyntax or parse error. Inform bison about an invalid character by returning YYerror, so theparser can cleanup internal state and return the failure via yyparse.Currently the error is only observable via the global variablepolicydb_errors, which needs to be checked separately. Free the two identifiers on an invalid typebounds in the error branch,similar to the success branch. The passed expression needs to be transferred into the policy or free'dby the sink functions define_constraint. Free identifiers removed from the queue but not yet owned by the policyon errors. The lower 64 bits of the subnet prefix for an ibpkeycon rule shouldall be 0's. Unfortunately the check uses the s6_addr macro which refersto the 16 entry array of 8-bit values in the union and does not referto the correct bits. Use the s6_addr32 macro instead which refers to the 4 entry array of32-bit values in the union and refers to the lower 64 bits. If declare_symbol returns 1 the id and the datum are already definedand not consumed by the function, so it they must be free'd by thecaller. Example policy : class s sid e class s{i}optional{require{bool K;}bool K true; Example policy generated by fuzzer: class ssid kclass s { i }optional{require{attribute i;}}type m;typealias m alias i; typeai When a user is created in an optional block, a user datum is addedto both the avrule_decl's symtab and the policydb's symtab, butthe semantic MLS information is only added to the avrule_decl'suser datum. This causes an error to occur during policy expansionwhen user_copy_callback is called. If this error did not occurthen the policydb's user datum would be written without any MLSinfo and the policy would fail validation when read later. When creating a user datum, search for a user datum with the samekey in the policydb's symtab. If that datum has no MLS information,then copy the MLS information from the avrule_decl's datum. If itdoes, then compare the default level, low level, and high levelsensitivities and give an error if they do not match. There is notenough information to expand the categories for the high and lowlevels, so merge the semantic categories. If the two category setsare not equal an error will occur during the expansion phase. Avoid calling strdup with a NULL pointer, which can happen with aninvalid policy context, e.g.: class Csid Sclass C { P };user U roles j;sid S s:l:q:q:q 【对外部是否有影响】 否 【是否修改引入】 <table><tbody><tr><td>该问题在当前版本是否修改引入可填写</td><td>写明引入单的DTS号并在此单关联,且立即知会版本经理或测试经理可填写</td></tr><tr><td>否</td><td> </td></tr></tbody></table> **二、缺陷分析结构反馈** 影响性分析说明: 缺陷严重等级:(Critical/High/Moderate/Low) 缺陷根因说明: 受影响版本排查(受影响/不受影响): openEuler-20.03-LTS-SP4 openEuler-22.03-LTS-SP3 openEuler-22.03-LTS-SP4 openEuler-24.03-LTS openEuler-24.03-LTS-SP1 修复是否涉及abi变化(是/否): openEuler-20.03-LTS-SP4 openEuler-22.03-LTS-SP3 openEuler-22.03-LTS-SP4 openEuler-24.03-LTS openEuler-24.03-LTS-SP1
评论 (
4
)
登录
后才可以发表评论
状态
已完成
待办的
已挂起
修复中
已确认
已完成
已验收
已取消
负责人
未设置
luhuaxin
HuaxinLuGitee
负责人
协作者
+负责人
+协作者
标签
sig/sig-security-fac
未设置
项目
未立项任务
未立项任务
里程碑
未关联里程碑
未关联里程碑
Pull Requests
未关联
未关联
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
未关联
分支 (28)
标签 (22)
master
openEuler-25.03
openEuler-24.03-LTS-SP1
openEuler-24.03-LTS-Next
openEuler-24.03-LTS-SP2
openEuler-24.03-LTS
openEuler-22.03-LTS-SP4
openEuler-22.03-LTS-SP1
openEuler-25.09
openEuler-22.03-LTS-SP3
openEuler-20.03-LTS-SP4
openEuler-23.09
openEuler-24.09
openEuler-23.03
openEuler-22.03-LTS-Next
openEuler-22.03-LTS-SP2
openEuler-20.03-LTS-SP3
openEuler-20.03-LTS-SP1
openEuler-22.03-LTS
openEuler-22.09
openEuler-20.03-LTS
openEuler-20.03-LTS-Next
openEuler-20.03-LTS-SP2
openEuler-20.09
openEuler-21.03
openEuler-21.09
openEuler1.0
openEuler1.0-base
openEuler-24.03-LTS-SP2-release
openEuler-25.03-release
openEuler-24.03-LTS-SP1-release
openEuler-22.03-LTS-SP4-release
openEuler-24.09-release
openEuler-24.03-LTS-release
openEuler-22.03-LTS-SP3-release
openEuler-23.09-rc5
openEuler-22.03-LTS-SP1-release
openEuler-22.09-release
openEuler-22.09-rc5
openEuler-22.09-20220829
openEuler-22.03-LTS-20220331
openEuler-22.03-LTS-round5
openEuler-22.03-LTS-round2
openEuler-22.03-LTS-round1
openEuler-20.03-LTS-SP3-release
openEuler-20.03-LTS-SP2-20210624
openEuler-21.03-20210330
openEuler-20.09-20200929
openEuler-20.03-LTS-20200606
openEuler-20.03-LTS-tag
开始日期   -   截止日期
-
置顶选项
不置顶
置顶等级:高
置顶等级:中
置顶等级:低
优先级
不指定
严重
主要
次要
不重要
预计工期
(小时)
参与者(1)
1
https://gitee.com/src-openeuler/checkpolicy.git
git@gitee.com:src-openeuler/checkpolicy.git
src-openeuler
checkpolicy
checkpolicy
点此查找更多帮助
搜索帮助
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册