软件信息:
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
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 , @谢志鹏 , @卢华歆 , @陈棋德
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
单包编译时会执行/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
elfutils提交pr: https://gitee.com/src-openeuler/elfutils/pulls/101
rc2回归验证通过
登录 后才可以发表评论