7 Star 0 Fork 3

src-openEuler / k3s

 / 详情

【23.03_RC1】【x86/arm】k3s不存在安全的编译选项PIE、

已验收
缺陷
创建于  
2023-03-01 11:48

软件信息:
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、

评论 (2)

wangxiaoya 创建了缺陷

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 , @王记棒棒猪

openeuler-ci-bot 添加了
 
sig/sig-K8sDistro
标签
wangxiaoya 计划开始日期设置为2023-03-01
wangxiaoya 计划截止日期设置为2023-03-08
wangxiaoya 优先级设置为主要

该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.
wk333 任务状态待办的 修改为已完成
wangxiaoya 修改了标题
wangxiaoya 修改了描述
wangxiaoya 优先级主要 修改为次要
张以正 任务状态已完成 修改为已验收

登录 后才可以发表评论

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

搜索帮助