428 Star 1.5K Fork 1.6K

GVPopenEuler/kernel

 / 详情

CIFS: Fix retry mid list corruption on reconnects

已完成
缺陷
创建于  
2022-08-27 15:05

【标题描述】能够简要描述问题:说明什么场景下,做了什么操作,出现什么问题(尽量使用正向表达方式)
【环境信息】
硬件信息:
1) 裸机场景提供出问题的硬件信息;
2) 虚机场景提供虚机XML文件或者配置信息
软件信息:
1) OS版本及分支
2) 内核信息
3) 发现问题的组件版本信息
如果有特殊组网,请提供网络拓扑图
【问题复现步骤】
具体操作步骤
出现概率(是否必现,概率性错误)
【预期结果】
描述预期结果,可以通过对比新老版本获取
【实际结果】
描述出问题的结果
【附件信息】
比如系统message日志/组件日志、dump信息、图片等

评论 (2)

陈孝松 创建了缺陷 3年前

Hi chenxiaosonggitee, 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 , @gatieme , @jiaoff , @zhengzengkai , @LiuYongQiang0816 , @wangxiongfeng , @kevinzhu1 , @jentlestea , @lujialin2 , @wuxu_buque , @xukuohai , @lengchao , @alvin-ling , @yuzenghui , @yuehaibing , @juntianlinux , @chenguangli , @gasonchen , @whoisxxx , @koulihong , @kailiu42 , @hanjun-guo , @woqidaideshi , @chiqijun , @wkfxxx , @thundertown , @guohaocs2c , @kylin-mayukun , @oskernel0719 , @liuxinux , @newbeats , @zhujianwei001 , @zhenpengzheng , @SuperSix173 , @colyli , @zhangyi089 , @htforge , @qiuuuuu , @xiexiuqi , @openeuler-sync-bot

openeuler-ci-bot 添加了
 
sig/Kernel
标签
3年前

从 pending_mid_q 链表中移到 dispose_list 链表前,先增加 mid_entry 的引用计数(注意同时还持有锁 GlobalMid_Lock),避免在操作链表的过程中 struct mid_q_entry 被释放。 另外从 pending_mid_q 链表移除后,mid_entry->mid_flags 设上标记 MID_DELETED。 从 pending_mid_q 链表删除前,判断 MID_DELETED,然后调用 DeleteMidQEntry 释放。

补丁合入前 DeleteMidQEntry 释放 mid_entry 时没有 GlobalMid_Lock 保护,可能引起 UAF,补丁合入后的 DeleteMidQEntry 流程:

DeleteMidQEntry
  cifs_mid_q_entry_release
    spin_lock(&GlobalMid_Lock)
    kref_put
      _cifs_mid_q_entry_release
        // 释放 mid_entry
    spin_unlock(&GlobalMid_Lock)
Qiuuuuu 通过合并 Pull Request !721: release 4.19.90-2208.6.0任务状态待办的 修改为已完成 3年前

登录 后才可以发表评论

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

搜索帮助