软件信息:
1) OS版本及分支:openEuler 23.03 round1
2) 内核信息:Linux openEuler 6.1.8-3.0.0.10.oe23.03
3) 发现问题的组件版本信息:
repo:OS,everything,EPOL
【问题复现步骤】
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
【实际结果】
k3s不存在安全的编译选项PIE、
Hi ryuo, 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: sig-K8sDistro, and any of the maintainers: @calvinyu , @pixiake , @yangzhao_kl , @wangyueliang , @duyiwei , @wanglmb , @王记棒棒猪
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
该issue同 #I6566R:【22.03_LTS_SP1_RC2】【x86/arm】k3s不存在安全的编译选项PIE
定位结论:非问题
原因:k3s使用了-static 编译选项,使用了这个编译选项的二进制,有如下两个特性:
1.加载阶段不会使用ld 进行动态链接
2.PIE PIC位置无关特性,除能。
上述两点结论可以参见Linux man page手册:
https://man7.org/linux/man-pages/man8/ld-linux.8.html
https://man7.org/linux/man-pages/man1/gcc.1.html
相关论述引用如下:
Linux binaries require dynamic linking (linking at run time)
unless the -static option was given to ld(1) during compilation.
If type is exec the code generation is configured to produce
static binary. In this case -fpic and -fpie are both
disabled.
登录 后才可以发表评论