登录
注册
开源
企业版
高校版
搜索
帮助中心
使用条款
关于我们
开源
企业版
高校版
私有云
模力方舟
登录
注册
9月17日,Gitee Xtreme 极智AI重磅发布,来Gitee直播间一起探索AI时代的软件研发新模式
代码拉取完成,页面将自动刷新
捐赠
捐赠前请先登录
取消
前往登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
Watch
不关注
关注所有动态
仅关注版本发行动态
关注但不提醒动态
124
Star
0
Fork
36
src-openEuler
/
shadow
代码
Issues
2
Pull Requests
2
Wiki
统计
流水线
服务
JavaDoc
PHPDoc
质量分析
Jenkins for Gitee
腾讯云托管
腾讯云 Serverless
悬镜安全
阿里云 SAE
Codeblitz
SBOM
我知道了,不再自动展开
更新失败,请稍后重试!
移除标识
内容风险标识
本任务被
标识为内容中包含有代码安全 Bug 、隐私泄露等敏感信息,仓库外成员不可访问
同步社区补丁
已完成
#IACWI8
缺陷
peulerosci
创建于
2024-07-15 09:55
<h3></h3><p>回合如下8个社区补丁</p><p></p><p></p><p></p><p></p><p></p><table ><tr><td colSpan="1" rowSpan="1">CommitId</td><td colSpan="1" rowSpan="1">描述</td></tr><tr><td colSpan="1" rowSpan="1">4c16416ebc5f0958d58a1ea1e7890eafd9f8bb75</td><td colSpan="1" rowSpan="1">port: fix OVERRUN ```shadow-4.15.0/lib/port.c:154:2: alias: Assigning: port.pt_names = ttys. port.pt_names now points to element 0 of ttys .173| *cp = '\0';174| cp++;175|-> port.pt_names[j + 1] = NULL;176|177| /*```<br/>Resolves: https://issues.redhat.com/browse/RHEL-35383<br/>Signed-off-by: Iker PedrosaReviewed-by: Alejandro Colomar</td></tr><tr><td colSpan="1" rowSpan="1">71a3238b7996285fc3c8dec841244ba95d663fa5</td><td colSpan="1" rowSpan="1">src/usermod.c: update_gshadow_fileReport:> shadow-4.15.0/src/usermod.c:864:3: alloc_fn: Storage is returned from allocation function __sgr_dup.> shadow-4.15.0/src/usermod.c:864:3: var_assign: Assigning: nsgrp = storage returned from __sgr_dup;> 963| }> 964|-> }> 965| #endif /* SHADOWGRP */> 966|<br/>Link: https://issues.redhat.com/browse/RHEL-35383Reported-by: Iker PedrosaSigned-off-by: Alejandro Colomar</td></tr><tr><td colSpan="1" rowSpan="1">1ee066ae1e5b39ac42120ad0f6f8af0f102db952</td><td colSpan="1" rowSpan="1">src/useradd.c: set_defaults: Fix FILE* leakReport:> shadow-4.15.0/src/useradd.c:575:2: alloc_fn: Storage is returned from allocation function fdopen.> shadow-4.15.0/src/useradd.c:575:2: var_assign: Assigning: ofp = storage returned from fdopen.> shadow-4.15.0/src/useradd.c:734:2: leaked_storage: Variable ofp going out of scope leaks the storage it points to.> 732| }> 733|> 734|-> return ret;> 735| }> 736|<br/><br/>Resources should be freed in the inverse order of the allocation.This refactor prepares for the following commits, which fix some leaks.<br/>Reviewed-by: Iker PedrosaSigned-off-by: Alejandro Colomar</td></tr><tr><td colSpan="1" rowSpan="1">701fe4cf1aeac9e66fa949369c91d135dbf375d2</td><td colSpan="1" rowSpan="1">src/useradd.c: set_defaults if it failedSee asprintf:<br/>RETURN VALUEWhen successful, these functions return the number of bytesprinted, just like sprintf. If memory allocation wasn’t possi‐ble, or some other error occurs, these functions will return -1,and the contents of strp are undefined.<br/>Reviewed-by: Iker PedrosaSigned-off-by: Alejandro Colomar</td></tr><tr><td colSpan="1" rowSpan="1">e7d1508e076bbf4053faacc0370c6fe43d9c8f04</td><td colSpan="1" rowSpan="1">src/useradd.c: Add fmkstemp to fix file-descriptor leakThis function creates a temporary file, and returns a FILE pointer toit. This avoids dealing with both a file descriptor and a FILE pointer,and correctly deallocating the resources on error.<br/>The code before this patch was leaking the file descriptor if fdopenfailed.<br/>Reviewed-by: Iker PedrosaSigned-off-by: Alejandro Colomar</td></tr><tr><td colSpan="1" rowSpan="1">61964aa06b9e6e0643a6519f64290f18ac04867f</td><td colSpan="1" rowSpan="1">src/usermod.c: update_group_fileReport:> shadow-4.15.0/src/usermod.c:734:3: alloc_fn: Storage is returned from allocation function __gr_dup.> shadow-4.15.0/src/usermod.c:734:3: var_assign: Assigning: ngrp = storage returned from __gr_dup;> 814| }> 815|-> }> 816|> 817| #ifdef SHADOWGRP<br/>Link: https://issues.redhat.com/browse/RHEL-35383Reported-by: Iker PedrosaSigned-off-by: Alejandro Colomar</td></tr><tr><td colSpan="1" rowSpan="1">10429edc14673fbb8c78b25f1872c34e88e5f07f</td><td colSpan="1" rowSpan="1">src/groupmod.c: delete gr_free_members to avoid double freeGroupmod -U may cause crashes because of double free. If without -a, the first free of to avoid double free.Although this may seem reckless, the second free in two different positions will definitely be triggered, and the following two test cases can be used to illustrate the situation :<br/>[root@localhost src]# ./useradd u1[root@localhost src]# ./useradd u2[root@localhost src]# ./useradd u3[root@localhost src]# ./groupadd -U u1,u2,u3 g1[root@localhost src]# ./groupmod -n g2 -U u1,u2 g1Segmentation fault<br/>This case would free .gr_mem again.<br/>[root@localhost src]# ./useradd u1[root@localhost src]# ./useradd u2[root@localhost src]# ./useradd u3[root@localhost src]# ./groupadd -U u1,u2,u3 g1[root@localhost src]# ./groupmod -U u1,u2 g1Segmentation fault<br/>The other case would free .gr_mem again.<br/>So the first free is unnecessary, maybe we can drop it.<br/>Fixes: 342c934a3590 Closes:Link:Link:Link:Cc: Serge E. HallynReviewed-by: Alejandro ColomarSigned-off-by: lixinyun</td></tr></table><p></p><p></p>
<h3></h3><p>回合如下8个社区补丁</p><p></p><p></p><p></p><p></p><p></p><table ><tr><td colSpan="1" rowSpan="1">CommitId</td><td colSpan="1" rowSpan="1">描述</td></tr><tr><td colSpan="1" rowSpan="1">4c16416ebc5f0958d58a1ea1e7890eafd9f8bb75</td><td colSpan="1" rowSpan="1">port: fix OVERRUN ```shadow-4.15.0/lib/port.c:154:2: alias: Assigning: port.pt_names = ttys. port.pt_names now points to element 0 of ttys .173| *cp = '\0';174| cp++;175|-> port.pt_names[j + 1] = NULL;176|177| /*```<br/>Resolves: https://issues.redhat.com/browse/RHEL-35383<br/>Signed-off-by: Iker PedrosaReviewed-by: Alejandro Colomar</td></tr><tr><td colSpan="1" rowSpan="1">71a3238b7996285fc3c8dec841244ba95d663fa5</td><td colSpan="1" rowSpan="1">src/usermod.c: update_gshadow_fileReport:> shadow-4.15.0/src/usermod.c:864:3: alloc_fn: Storage is returned from allocation function __sgr_dup.> shadow-4.15.0/src/usermod.c:864:3: var_assign: Assigning: nsgrp = storage returned from __sgr_dup;> 963| }> 964|-> }> 965| #endif /* SHADOWGRP */> 966|<br/>Link: https://issues.redhat.com/browse/RHEL-35383Reported-by: Iker PedrosaSigned-off-by: Alejandro Colomar</td></tr><tr><td colSpan="1" rowSpan="1">1ee066ae1e5b39ac42120ad0f6f8af0f102db952</td><td colSpan="1" rowSpan="1">src/useradd.c: set_defaults: Fix FILE* leakReport:> shadow-4.15.0/src/useradd.c:575:2: alloc_fn: Storage is returned from allocation function fdopen.> shadow-4.15.0/src/useradd.c:575:2: var_assign: Assigning: ofp = storage returned from fdopen.> shadow-4.15.0/src/useradd.c:734:2: leaked_storage: Variable ofp going out of scope leaks the storage it points to.> 732| }> 733|> 734|-> return ret;> 735| }> 736|<br/><br/>Resources should be freed in the inverse order of the allocation.This refactor prepares for the following commits, which fix some leaks.<br/>Reviewed-by: Iker PedrosaSigned-off-by: Alejandro Colomar</td></tr><tr><td colSpan="1" rowSpan="1">701fe4cf1aeac9e66fa949369c91d135dbf375d2</td><td colSpan="1" rowSpan="1">src/useradd.c: set_defaults if it failedSee asprintf:<br/>RETURN VALUEWhen successful, these functions return the number of bytesprinted, just like sprintf. If memory allocation wasn’t possi‐ble, or some other error occurs, these functions will return -1,and the contents of strp are undefined.<br/>Reviewed-by: Iker PedrosaSigned-off-by: Alejandro Colomar</td></tr><tr><td colSpan="1" rowSpan="1">e7d1508e076bbf4053faacc0370c6fe43d9c8f04</td><td colSpan="1" rowSpan="1">src/useradd.c: Add fmkstemp to fix file-descriptor leakThis function creates a temporary file, and returns a FILE pointer toit. This avoids dealing with both a file descriptor and a FILE pointer,and correctly deallocating the resources on error.<br/>The code before this patch was leaking the file descriptor if fdopenfailed.<br/>Reviewed-by: Iker PedrosaSigned-off-by: Alejandro Colomar</td></tr><tr><td colSpan="1" rowSpan="1">61964aa06b9e6e0643a6519f64290f18ac04867f</td><td colSpan="1" rowSpan="1">src/usermod.c: update_group_fileReport:> shadow-4.15.0/src/usermod.c:734:3: alloc_fn: Storage is returned from allocation function __gr_dup.> shadow-4.15.0/src/usermod.c:734:3: var_assign: Assigning: ngrp = storage returned from __gr_dup;> 814| }> 815|-> }> 816|> 817| #ifdef SHADOWGRP<br/>Link: https://issues.redhat.com/browse/RHEL-35383Reported-by: Iker PedrosaSigned-off-by: Alejandro Colomar</td></tr><tr><td colSpan="1" rowSpan="1">10429edc14673fbb8c78b25f1872c34e88e5f07f</td><td colSpan="1" rowSpan="1">src/groupmod.c: delete gr_free_members to avoid double freeGroupmod -U may cause crashes because of double free. If without -a, the first free of to avoid double free.Although this may seem reckless, the second free in two different positions will definitely be triggered, and the following two test cases can be used to illustrate the situation :<br/>[root@localhost src]# ./useradd u1[root@localhost src]# ./useradd u2[root@localhost src]# ./useradd u3[root@localhost src]# ./groupadd -U u1,u2,u3 g1[root@localhost src]# ./groupmod -n g2 -U u1,u2 g1Segmentation fault<br/>This case would free .gr_mem again.<br/>[root@localhost src]# ./useradd u1[root@localhost src]# ./useradd u2[root@localhost src]# ./useradd u3[root@localhost src]# ./groupadd -U u1,u2,u3 g1[root@localhost src]# ./groupmod -U u1,u2 g1Segmentation fault<br/>The other case would free .gr_mem again.<br/>So the first free is unnecessary, maybe we can drop it.<br/>Fixes: 342c934a3590 Closes:Link:Link:Link:Cc: Serge E. HallynReviewed-by: Alejandro ColomarSigned-off-by: lixinyun</td></tr></table><p></p><p></p>
评论 (
4
)
登录
后才可以发表评论
状态
已完成
待办的
已挂起
修复中
已确认
已完成
已验收
已取消
负责人
未设置
zhengxiaoxiao
zhengxiaoxiaoGitee
负责人
协作者
+负责人
+协作者
标签
sig/Base-service
未设置
项目
未立项任务
未立项任务
里程碑
未关联里程碑
未关联里程碑
Pull Requests
未关联
未关联
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
未关联
分支 (28)
标签 (27)
master
openEuler-25.09
openEuler-24.03-LTS-SP2
openEuler-24.03-LTS-SP1
openEuler-24.03-LTS
openEuler-24.03-LTS-Next
openEuler-22.03-LTS-SP4
openEuler-22.03-LTS-SP3
openEuler-22.03-LTS-SP1
openEuler-25.03
openEuler-20.03-LTS-SP4
openEuler-24.09
openEuler-22.03-LTS-SP2
openEuler-22.03-LTS-Next
openEuler-22.03-LTS
openEuler-20.03-LTS-SP1
openEuler-20.03-LTS-SP3
openEuler-23.09
openEuler-23.03
openEuler-22.09
openEuler-20.03-LTS-Next
openEuler-20.03-LTS-SP2
openEuler-21.09
openEuler-21.03
openEuler-20.03-LTS
openEuler-20.09
openEuler1.0-base
openEuler1.0
openEuler-24.03-LTS-SP2-release
openEuler-22.03-LTS-SP3-update-20250606
openEuler-22.03-LTS-SP4-update-20250606
openEuler-24.03-LTS-update-20250606
openEuler-24.03-LTS-SP1-update-20250606
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-round3
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/shadow.git
git@gitee.com:src-openeuler/shadow.git
src-openeuler
shadow
shadow
点此查找更多帮助
搜索帮助
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册