已关闭
kpartx命令指定的-p参数过长时,kpartx进程coredump #76
kouwq创建于  7月23日关闭于  8月6日
kouwq成员
7月23日 创建

【缺陷描述】:请补充详细的缺陷问题现象描述

kpartx命令指定的-p参数过长时,会导致kpartx进程coredump

【缺陷所属的os版本】

openEuler-24.03-LTS
openEuler-22.03-LTS
openEuler-20.03-LTS

【内核版本】

kernel-6.6.0-28.0.0.34

【缺陷所属软件及版本号】

multipath-tools所有版本

【问题复现步骤】

image.png

【实际结果】

kpartx命令指定的-p参数过长时,会导致kpartx进程coredump

【期望结果】

报错退出打印提示信息

【缺陷详情及分析指导参考链接】

原因是kpartx.c的ADD/UPDATE分区处理循环中局部变量part_uuid声明时未初始化为NULL,当-p 参数过长导致format_partname函数构造分区名称失败时,dm_find_part提前返回但未设置输出参数*part_uuid,调用者未区分"未找到分区"和"名称构造失败"两种返回0的场景,直接使用未初始化的part_uuid指针调用check_uuid → strchr
上游社区补丁修复了该问题:
https://github.com/openSUSE/multipath-tools/commit/f474bdf9d016e580baea54f1c3d7282b6623ffdd
https://github.com/openSUSE/multipath-tools/commit/030710318a9d991724cdb908c8519702cd9cbc35
https://github.com/openSUSE/multipath-tools/commit/eedf032d0c5ca3b4adc5c75863270d82f6b41e15

likedislike
openeuler-ci-botopeneuler-ci-bot成员
7月23日 将 foolstrong 设为负责人
openeuler-ci-botopeneuler-ci-bot成员
7月23日 修改了issue 的描述
openeuler-ci-botopeneuler-ci-bot成员
7月23日 添加了label:sig/Storage
openeuler-ci-bot
openeuler-ci-bot成员
7月23日 评论:

Welcome To openEuler Community

Hey @kouwq , thanks for your contribution to the community.

Bot Usage Manual

I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands.

Contact Guide

If you have any questions, please contact the SIG: Storage ,
and any of the maintainers: @VICTORY2017, @dragon1147e3, @kouwq, @liuzhiqiang26, @louhongxiang, @mszjaas, @swf504 ,
and any of the committers: @foolstrong, @kouwq .

likedislike
openeuler-ci-bot
openeuler-ci-bot成员
7月23日 评论:

以下的要求不是强制性的, 未按模板评论时对issue无任何影响
issue处理注意事项:
1. 当前issue受影响的分支提交pr时, 须在pr描述中填写当前issue编号进行关联, 否则无法关闭当前issue;
2. 模板内容需要填写完整, 无论是受影响或者不受影响都需要填写完整内容,未引入的分支不需要填写, 否则无法关闭当前issue;
3. 以下为模板中需要填写完整的内容, 请复制到评论区回复, 注: 内容的标题名称(影响性分析说明, 缺陷严重等级, 受影响版本排查(受影响/不受影响), 修复是否涉及abi变化(是/否))不能省略,省略后defect-manager将无法正常解析填写内容.
评论区可能使用到的指令说明:

指令 指令说明 使用权限
/check-issue 触发defect-manager校验 不限
/reason xxx /reason +挂起或取消条件 不限

影响性分析说明:

缺陷严重等级:(Critical/High/Moderate/Low)

缺陷根因说明:

受影响版本排查(受影响/不受影响):

  1. openEuler-20.03-LTS-SP4:
  2. openEuler-22.03-LTS-SP3:
  3. openEuler-22.03-LTS-SP4:
  4. openEuler-24.03-LTS:
  5. openEuler-24.03-LTS-SP1:
  6. openEuler-24.03-LTS-SP2:

abi变化(是/否):

  1. openEuler-20.03-LTS-SP4:
  2. openEuler-22.03-LTS-SP3:
  3. openEuler-22.03-LTS-SP4:
  4. openEuler-24.03-LTS:
  5. openEuler-24.03-LTS-SP1:
  6. openEuler-24.03-LTS-SP2:

缺陷issue处理具体操作请参考:
https://atomgit.com/openeuler/cve-manager/blob/master/cve-vulner-manager/doc/md/defect-manager-manual.md
pr关联issue具体操作请参考:
https://docs.atomgit.com/docs/help/home/org_project/pullrequests/pr-related-issue

likedislike
openeuler-ci-botopeneuler-ci-bot成员
7月23日 添加了label:DEFECT/UNFIXED
此处折叠了6条事件消息 查看更多
openeuler-ci-botopeneuler-ci-bot成员
7月23日 关联了pull request:[sync] PR-323: 修复kpartx -p coredump问题
openeuler-ci-bot
openeuler-ci-bot成员
7月23日 评论:

Notice

@kouwq , this issue is linked to an open PR. Please merge the PR before closing this issue.

likedislike
foolstrong成员
8月6日 评论:

issue已解决
/close

likedislike
openeuler-ci-botopeneuler-ci-bot成员
8月6日 issue状态由 待办的 改变为 已完成
openeuler-ci-botopeneuler-ci-bot成员
8月6日 关闭了 issue
openeuler-ci-botopeneuler-ci-bot成员
8月6日 删除了label:DEFECT/UNFIXED
openeuler-ci-bot
openeuler-ci-bot成员
8月6日 评论:

@foolstrong 未对受影响版本排查/abi变化进行分析

likedislike
openeuler-ci-bot
openeuler-ci-bot成员
8月6日 评论:

@foolstrong 未对受影响版本排查/abi变化进行分析

likedislike