396 Star 1.4K Fork 1.3K

GVPopenEuler / kernel

 / 详情

【OLK-5.10】执行fs_fusiontest测试套test_fs_fusion174用例,触发KASAN: stack-out-of-bounds Read in unwind_next_frame

已完成
任务
创建于  
2023-02-07 20:37

【严重程度】 一般
【特性】 stacktrace
【重现类型】 有条件概率重现
【定位分析】

bugzilla:http://hulk.huawei.com/bugzilla/show_bug.cgi?id=187818


使能CONFIG_PARAVIRT时,native_{save,restore}_fl 的代码

callq *0x0

会在运行时被替换成为调用xen/vsmp的实现或者

pushf; pop %flags // native_save_fl

push %flags; popf // native_restore_fl

对于后者,由于pushf; popf在pop处的栈状态与callq不同,在此处进行推栈时,会使用callq的orc导致推栈失败。


vmcore代码

vmlinux代码

运行时与编译时代的二进制指令不同


触发场景:

arch_local_save_flags();

arch_local_irq_restore(flags);

这两处的指令会被替换为 push xx; pop xx;

当中断发生在pop指令时,在中断内部执行推栈操作即触发问题



【影响评估及测试建议】

影响性分析:

1 错误栈地址上没有代码段ip地址,推栈失败直接退出

2 错误栈地址上有代码段ip地址,按错误的栈信息继续推栈直到推栈失败退出

3 错误推栈路径上有按照pt_regs orc推栈的代码段ip地址,按照pt_regs读取下一个sp,推栈方向错误报

WARNING: stack going in the wrong direction? at xxx



【对外部影响描述】 无

评论 (1)

hulk-robot 创建了任务

Hi zhixiuzhou, 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: Kernel, and any of the maintainers: @YangYingliang , @成坚 (CHENG Jian) , @jiaoff , @zhengzengkai , @刘勇强 , @wangxiongfeng , @朱科潜 , @WangShaoBo , @lujialin , @wuxu_buque , @Xu Kuohai , @冷嘲啊 , @Lingmingqiang , @yuzenghui , @juntian , @OSSIM , @陈结松 , @whoisxxx , @koulihong , @刘恺 , @hanjun-guo , @woqidaideshi , @Chiqijun , @Kefeng , @ThunderTown , @AlexGuo , @kylin-mayukun , @Zheng Zucheng , @柳歆 , @Jackie Liu , @zhujianwei001 , @郑振鹏 , @SuperSix173 , @colyli , @Zhang Yi , @htforge , @Qiuuuuu , @Yuehaibing , @xiehaocheng , @guzitao , @CTC-Xibo.Wang , @zhanghongchen , @chen wei , @Jason Zeng , @苟浩 , @DuanqiangWen , @georgeguo , @毛泓博 , @AllenShi , @zhangjialin , @Xie XiuQi

登录 后才可以发表评论

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

搜索帮助