8 Star 0 Fork 14

src-openEuler / libkcapi

 / 详情

【23.09 round1】【x86/arm】libkcapi-1.4.0-5.oe2309安全编译选项Strip不满足

已验收
缺陷
创建于  
2023-08-28 14:52

软件信息:
1) OS版本及分支:openEuler 23.09 round1
2) 内核信息:Linux openEuler 6.4.0-1.0.2.6.oe2309

【问题复现步骤】
1、PIE:查看编译日志中是否包含FPIE编译选项
2、STRIP:(1):rpm2cpio **.rpm|cpio -id (2)file $file
3、RPATH:(1):rpm2cpio **.rpm|cpio -id (2)readelf -d $file

【预期结果】
1、包含FPIE安全编译选项
2、不包含not stripped
3、不包含rpath/runpath

【实际结果】
libkcapi-1.4.0-5.oe2309安全编译选项Strip不满足

【不满足文件列表】
Strip不满足:
usr/bin/sha384hmac
usr/bin/sha256hmac
usr/bin/sha224hmac
usr/bin/sm3hmac
usr/bin/sha512hmac

评论 (5)

manyong 创建了缺陷
manyong 添加协作者朱春意
展开全部操作日志

Hi manyong041, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: Base-service, and any of the maintainers: @Monday , @zhujianwei001 , @hexiaowen , @谢志鹏 , @卢华歆 , @陈棋德

openeuler-ci-bot 添加了
 
sig/Base-service
标签

单包编译时会执行/usr/bin/find-debuginfo脚本,该脚本中调用eu-elfcompress(elfutils提供)命令对二进制ELF文件进行sections信息处理,最新版本eu-elfcompress处理逻辑发生变化,在处理原二进制ELF文件时会创建新文件,最终处理后文件变成了新ELF文件,此新文件与原ELF文件Inode不再相同。
libkcapi提供的以下命令实际是同一个二进制文件的hard link文件,它们的Inode和links都是相同的,在执行eu-strip命令消除符号时,只需处理一个文件,其它文件均会同时消除符号表。
usr/bin/sha384hmac
usr/bin/sha256hmac
usr/bin/sha224hmac
usr/bin/sm3hmac
usr/bin/sha512hmac
usr/bin/sha1hmac
但是,当前eu-elfcompress逻辑变更导致文件Inode发生变化,强制消除了与其它硬链接文件的关系,从而对一个文件进行eu-strip操作时识别不到其它硬链接文件,导致残留了其它硬链接文件的符号表。

已确认,eu-elfcompress命令有问题,需要elfutils软件回合社区补丁。
elfutils上游社区补丁如下:
https://sourceware.org/git/?p=elfutils.git;a=commit;h=6cad4e56a930034765f8e79ba2eaa2ff1cd8394f

rc2回归验证通过

manyong 任务状态已完成 修改为已验收

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(5)
5329419 openeuler ci bot 1632792936
1
https://gitee.com/src-openeuler/libkcapi.git
git@gitee.com:src-openeuler/libkcapi.git
src-openeuler
libkcapi
libkcapi

搜索帮助