Sign in
Sign up
Explore
Enterprise
Education
Search
Help
Terms of use
About Us
Explore
Enterprise
Education
Gitee Premium
Gitee AI
AI teammates
Sign in
Sign up
Fetch the repository succeeded.
description of repo status
Open Source
>
Other
>
Operation System
&&
Donate
Please sign in before you donate.
Cancel
Sign in
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
Watch
Unwatch
Watching
Releases Only
Ignoring
128
Star
73
Fork
329
src-openEuler
/
kernel
Closed
Code
Issues
1197
Pull Requests
35
Wiki
Insights
Pipelines
Service
JavaDoc
PHPDoc
Quality Analysis
Jenkins for Gitee
Tencent CloudBase
Tencent Cloud Serverless
悬镜安全
Aliyun SAE
Codeblitz
SBOM
DevLens
Don’t show this again
Update failed. Please try again later!
Remove this flag
Content Risk Flag
This task is identified by
as the content contains sensitive information such as code security bugs, privacy leaks, etc., so it is only accessible to contributors of this repository.
CVE-2024-40927
Declined
#IACV8P
CVE和安全问题
openeuler-ci-bot
owner
Opened this issue
2024-07-15 08:18
一、漏洞信息 漏洞编号:[CVE-2024-40927](https://nvd.nist.gov/vuln/detail/CVE-2024-40927) 漏洞归属组件:[kernel](https://gitee.com/src-openeuler/kernel) 漏洞归属的版本:4.19.140,4.19.194,4.19.90,5.10.0,6.1.0,6.1.19,6.1.5,6.1.6,6.1.8,6.4.0,6.6.0 CVSS V2.0分值: BaseScore:0.0 None Vector:CVSS:2.0/ 漏洞简述: In the Linux kernel, the following vulnerability has been resolved:xhci: Handle TD clearing for multiple streams caseWhen multiple streams are in use, multiple TDs might be in flight whenan endpoint is stopped. We need to issue a Set TR Dequeue Pointer foreach, to ensure everything is reset properly and the caches cleared.Change the logic so that any N>1 TDs found active for different streamsare deferred until after the first one is processed, callingxhci_invalidate_cancelled_tds() again from xhci_handle_cmd_set_deq() toqueue another command until we are done with all of them. Also changethe error/ should never happen paths to ensure we at least clear anyaffected TDs, even if we can t issue a command to clear the hardwarecache, and complain loudly with an xhci_warn() if this ever happens.This problem case dates back to commit e9df17eb1408 ( USB: xhci: Correctassumptions about number of rings per endpoint. ) early on in the XHCIdriver s life, when stream support was first added.It was then identified but not fixed nor made into a warning in commit674f8438c121 ( xhci: split handling halted endpoints into two steps ),which added a FIXME comment for the problem case (without materiallychanging the behavior as far as I can tell, though the new logic madethe problem more obvious).Then later, in commit 94f339147fc3 ( xhci: Fix failure to give back somecached cancelled URBs. ), it was acknowledged again.[Mathias: commit 94f339147fc3 ( xhci: Fix failure to give back some cachedcancelled URBs. ) was a targeted regression fix to the previously mentionedpatch. Users reported issues with usb stuck after unmounting/disconnectingUAS devices. This rolled back the TD clearing of multiple streams to itsoriginal state.]Apparently the commit author was aware of the problem (yet still choseto submit it): It was still mentioned as a FIXME, an xhci_dbg() wasadded to log the problem condition, and the remaining issue was mentionedin the commit description. The choice of making the log type xhci_dbg()for what is, at this point, a completely unhandled and known brokencondition is puzzling and unfortunate, as it guarantees that no actualusers would see the log in production, thereby making it nighundebuggable (indeed, even if you turn on DEBUG, the message doesn treally hint at there being a problem at all).It took me *months* of random xHC crashes to finally find a reliablerepro and be able to do a deep dive debug session, which could all havebeen avoided had this unhandled, broken condition been actually reportedwith a warning, as it should have been as a bug intentionally left inunfixed (never mind that it shouldn t have been left in at all).> Another fix to solve clearing the caches of all stream rings with> cancelled TDs is needed, but not as urgent.3 years after that statement and 14 years after the original bug wasintroduced, I think it s finally time to fix it. And maybe next timelet s not leave bugs unfixed (that are actually worse than the originalbug), and let s actually get people to review kernel commits please.Fixes xHC crashes and IOMMU faults with UAS devices when handlingerrors/faults. Easiest repro is to use `hdparm` to mark an early sector(e.g. 1024) on a disk as bad, then `cat /dev/sdX > /dev/null` in a loop.At least in the case of JMicron controllers, the read errors end uphaving to cancel two TDs (for two queued requests to different streams)and the one that didn t get cleared properly ends up faulting the xHCentirely when it tries to access DMA pages that have since been unmapped,referred to by the stale TDs. This normally happens quickly (after twoor three loops). After this fix, I left the `cat` in a loop runningovernight and experienced no xHC failures, with all read errorsrecovered properly. Repro d and tested on an Apple M1 Mac Mini(dwc3 host).On systems without an IOMMU, this bug would instead silently corruptfreed memory, making this a---truncated--- 漏洞公开时间:2024-07-12 21:15:15 漏洞创建时间:2024-07-24 04:10:51 漏洞详情参考链接: https://nvd.nist.gov/vuln/detail/CVE-2024-40927 <details> <summary>更多参考(点击展开)</summary> | 参考来源 | 参考链接 | 来源链接 | | ------- | -------- | -------- | | 416baaa9-dc9f-4396-8d5f-8c081fb06d67 | https://git.kernel.org/stable/c/26460c1afa311524f588e288a4941432f0de6228 | | | 416baaa9-dc9f-4396-8d5f-8c081fb06d67 | https://git.kernel.org/stable/c/5ceac4402f5d975e5a01c806438eb4e554771577 | | | 416baaa9-dc9f-4396-8d5f-8c081fb06d67 | https://git.kernel.org/stable/c/61593dc413c3655e4328a351555235bc3089486a | | | 416baaa9-dc9f-4396-8d5f-8c081fb06d67 | https://git.kernel.org/stable/c/633f72cb6124ecda97b641fbc119340bd88d51a9 | | | 416baaa9-dc9f-4396-8d5f-8c081fb06d67 | https://git.kernel.org/stable/c/949be4ec5835e0ccb3e2a8ab0e46179cb5512518 | | | suse_bugzilla | http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2024-40927 | https://bugzilla.suse.com/show_bug.cgi?id=1227816 | | suse_bugzilla | https://www.cve.org/CVERecord?id=CVE-2024-40927 | https://bugzilla.suse.com/show_bug.cgi?id=1227816 | | suse_bugzilla | https://git.kernel.org/stable/c/26460c1afa311524f588e288a4941432f0de6228 | https://bugzilla.suse.com/show_bug.cgi?id=1227816 | | suse_bugzilla | https://git.kernel.org/stable/c/5ceac4402f5d975e5a01c806438eb4e554771577 | https://bugzilla.suse.com/show_bug.cgi?id=1227816 | | suse_bugzilla | https://git.kernel.org/stable/c/61593dc413c3655e4328a351555235bc3089486a | https://bugzilla.suse.com/show_bug.cgi?id=1227816 | | suse_bugzilla | https://git.kernel.org/stable/c/633f72cb6124ecda97b641fbc119340bd88d51a9 | https://bugzilla.suse.com/show_bug.cgi?id=1227816 | | suse_bugzilla | https://git.kernel.org/stable/c/949be4ec5835e0ccb3e2a8ab0e46179cb5512518 | https://bugzilla.suse.com/show_bug.cgi?id=1227816 | | suse_bugzilla | https://git.kernel.org/pub/scm/linux/security/vulns.git/plain/cve/published/2024/CVE-2024-40927.mbox | https://bugzilla.suse.com/show_bug.cgi?id=1227816 | | redhat_bugzilla | https://access.redhat.com/errata/RHSA-2024:5102 | https://bugzilla.redhat.com/show_bug.cgi?id=2297511 | | redhat_bugzilla | https://access.redhat.com/errata/RHSA-2024:5101 | https://bugzilla.redhat.com/show_bug.cgi?id=2297511 | | redhat_bugzilla | https://access.redhat.com/errata/RHSA-2024:6567 | https://bugzilla.redhat.com/show_bug.cgi?id=2297511 | | debian | | https://security-tracker.debian.org/tracker/CVE-2024-40927 | | anolis | | https://anas.openanolis.cn/cves/detail/CVE-2024-40927 | </details> 漏洞分析指导链接: https://gitee.com/openeuler/cve-manager/blob/master/cve-vulner-manager/doc/md/manual.md 漏洞数据来源: openBrain开源漏洞感知系统 漏洞补丁信息: <details> <summary>详情(点击展开)</summary> 无 </details> 二、漏洞分析结构反馈 影响性分析说明: Reserved. openEuler评分: 3.9 Vector:CVSS:2.0/ 受影响版本排查(受影响/不受影响): 1.openEuler-20.03-LTS-SP4(4.19.90):受影响 2.openEuler-22.03-LTS-SP1(5.10.0):受影响 3.openEuler-22.03-LTS-SP3(5.10.0):受影响 4.openEuler-24.03-LTS(6.6.0):受影响 5.openEuler-22.03-LTS-SP4(5.10.0):不受影响 6.master(6.6.0):不受影响 7.openEuler-24.03-LTS-Next(6.6.0):不受影响 修复是否涉及abi变化(是/否): 1.openEuler-20.03-LTS-SP4(4.19.90):否 2.openEuler-22.03-LTS-SP1(5.10.0):否 3.openEuler-22.03-LTS-SP3(5.10.0):否 4.master(6.6.0):否 5.openEuler-24.03-LTS(6.6.0):否 6.openEuler-24.03-LTS-Next(6.6.0):否 7.openEuler-22.03-LTS-SP4(5.10.0):否 原因说明: 1.master(6.6.0): 2.openEuler-20.03-LTS-SP4(4.19.90): 3.openEuler-22.03-LTS-SP1(5.10.0): 4.openEuler-22.03-LTS-SP3(5.10.0): 5.openEuler-22.03-LTS-SP4(5.10.0): 6.openEuler-24.03-LTS(6.6.0): 7.openEuler-24.03-LTS-Next(6.6.0): 8.openEuler-24.03-LTS-SP1(6.6.0):
一、漏洞信息 漏洞编号:[CVE-2024-40927](https://nvd.nist.gov/vuln/detail/CVE-2024-40927) 漏洞归属组件:[kernel](https://gitee.com/src-openeuler/kernel) 漏洞归属的版本:4.19.140,4.19.194,4.19.90,5.10.0,6.1.0,6.1.19,6.1.5,6.1.6,6.1.8,6.4.0,6.6.0 CVSS V2.0分值: BaseScore:0.0 None Vector:CVSS:2.0/ 漏洞简述: In the Linux kernel, the following vulnerability has been resolved:xhci: Handle TD clearing for multiple streams caseWhen multiple streams are in use, multiple TDs might be in flight whenan endpoint is stopped. We need to issue a Set TR Dequeue Pointer foreach, to ensure everything is reset properly and the caches cleared.Change the logic so that any N>1 TDs found active for different streamsare deferred until after the first one is processed, callingxhci_invalidate_cancelled_tds() again from xhci_handle_cmd_set_deq() toqueue another command until we are done with all of them. Also changethe error/ should never happen paths to ensure we at least clear anyaffected TDs, even if we can t issue a command to clear the hardwarecache, and complain loudly with an xhci_warn() if this ever happens.This problem case dates back to commit e9df17eb1408 ( USB: xhci: Correctassumptions about number of rings per endpoint. ) early on in the XHCIdriver s life, when stream support was first added.It was then identified but not fixed nor made into a warning in commit674f8438c121 ( xhci: split handling halted endpoints into two steps ),which added a FIXME comment for the problem case (without materiallychanging the behavior as far as I can tell, though the new logic madethe problem more obvious).Then later, in commit 94f339147fc3 ( xhci: Fix failure to give back somecached cancelled URBs. ), it was acknowledged again.[Mathias: commit 94f339147fc3 ( xhci: Fix failure to give back some cachedcancelled URBs. ) was a targeted regression fix to the previously mentionedpatch. Users reported issues with usb stuck after unmounting/disconnectingUAS devices. This rolled back the TD clearing of multiple streams to itsoriginal state.]Apparently the commit author was aware of the problem (yet still choseto submit it): It was still mentioned as a FIXME, an xhci_dbg() wasadded to log the problem condition, and the remaining issue was mentionedin the commit description. The choice of making the log type xhci_dbg()for what is, at this point, a completely unhandled and known brokencondition is puzzling and unfortunate, as it guarantees that no actualusers would see the log in production, thereby making it nighundebuggable (indeed, even if you turn on DEBUG, the message doesn treally hint at there being a problem at all).It took me *months* of random xHC crashes to finally find a reliablerepro and be able to do a deep dive debug session, which could all havebeen avoided had this unhandled, broken condition been actually reportedwith a warning, as it should have been as a bug intentionally left inunfixed (never mind that it shouldn t have been left in at all).> Another fix to solve clearing the caches of all stream rings with> cancelled TDs is needed, but not as urgent.3 years after that statement and 14 years after the original bug wasintroduced, I think it s finally time to fix it. And maybe next timelet s not leave bugs unfixed (that are actually worse than the originalbug), and let s actually get people to review kernel commits please.Fixes xHC crashes and IOMMU faults with UAS devices when handlingerrors/faults. Easiest repro is to use `hdparm` to mark an early sector(e.g. 1024) on a disk as bad, then `cat /dev/sdX > /dev/null` in a loop.At least in the case of JMicron controllers, the read errors end uphaving to cancel two TDs (for two queued requests to different streams)and the one that didn t get cleared properly ends up faulting the xHCentirely when it tries to access DMA pages that have since been unmapped,referred to by the stale TDs. This normally happens quickly (after twoor three loops). After this fix, I left the `cat` in a loop runningovernight and experienced no xHC failures, with all read errorsrecovered properly. Repro d and tested on an Apple M1 Mac Mini(dwc3 host).On systems without an IOMMU, this bug would instead silently corruptfreed memory, making this a---truncated--- 漏洞公开时间:2024-07-12 21:15:15 漏洞创建时间:2024-07-24 04:10:51 漏洞详情参考链接: https://nvd.nist.gov/vuln/detail/CVE-2024-40927 <details> <summary>更多参考(点击展开)</summary> | 参考来源 | 参考链接 | 来源链接 | | ------- | -------- | -------- | | 416baaa9-dc9f-4396-8d5f-8c081fb06d67 | https://git.kernel.org/stable/c/26460c1afa311524f588e288a4941432f0de6228 | | | 416baaa9-dc9f-4396-8d5f-8c081fb06d67 | https://git.kernel.org/stable/c/5ceac4402f5d975e5a01c806438eb4e554771577 | | | 416baaa9-dc9f-4396-8d5f-8c081fb06d67 | https://git.kernel.org/stable/c/61593dc413c3655e4328a351555235bc3089486a | | | 416baaa9-dc9f-4396-8d5f-8c081fb06d67 | https://git.kernel.org/stable/c/633f72cb6124ecda97b641fbc119340bd88d51a9 | | | 416baaa9-dc9f-4396-8d5f-8c081fb06d67 | https://git.kernel.org/stable/c/949be4ec5835e0ccb3e2a8ab0e46179cb5512518 | | | suse_bugzilla | http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2024-40927 | https://bugzilla.suse.com/show_bug.cgi?id=1227816 | | suse_bugzilla | https://www.cve.org/CVERecord?id=CVE-2024-40927 | https://bugzilla.suse.com/show_bug.cgi?id=1227816 | | suse_bugzilla | https://git.kernel.org/stable/c/26460c1afa311524f588e288a4941432f0de6228 | https://bugzilla.suse.com/show_bug.cgi?id=1227816 | | suse_bugzilla | https://git.kernel.org/stable/c/5ceac4402f5d975e5a01c806438eb4e554771577 | https://bugzilla.suse.com/show_bug.cgi?id=1227816 | | suse_bugzilla | https://git.kernel.org/stable/c/61593dc413c3655e4328a351555235bc3089486a | https://bugzilla.suse.com/show_bug.cgi?id=1227816 | | suse_bugzilla | https://git.kernel.org/stable/c/633f72cb6124ecda97b641fbc119340bd88d51a9 | https://bugzilla.suse.com/show_bug.cgi?id=1227816 | | suse_bugzilla | https://git.kernel.org/stable/c/949be4ec5835e0ccb3e2a8ab0e46179cb5512518 | https://bugzilla.suse.com/show_bug.cgi?id=1227816 | | suse_bugzilla | https://git.kernel.org/pub/scm/linux/security/vulns.git/plain/cve/published/2024/CVE-2024-40927.mbox | https://bugzilla.suse.com/show_bug.cgi?id=1227816 | | redhat_bugzilla | https://access.redhat.com/errata/RHSA-2024:5102 | https://bugzilla.redhat.com/show_bug.cgi?id=2297511 | | redhat_bugzilla | https://access.redhat.com/errata/RHSA-2024:5101 | https://bugzilla.redhat.com/show_bug.cgi?id=2297511 | | redhat_bugzilla | https://access.redhat.com/errata/RHSA-2024:6567 | https://bugzilla.redhat.com/show_bug.cgi?id=2297511 | | debian | | https://security-tracker.debian.org/tracker/CVE-2024-40927 | | anolis | | https://anas.openanolis.cn/cves/detail/CVE-2024-40927 | </details> 漏洞分析指导链接: https://gitee.com/openeuler/cve-manager/blob/master/cve-vulner-manager/doc/md/manual.md 漏洞数据来源: openBrain开源漏洞感知系统 漏洞补丁信息: <details> <summary>详情(点击展开)</summary> 无 </details> 二、漏洞分析结构反馈 影响性分析说明: Reserved. openEuler评分: 3.9 Vector:CVSS:2.0/ 受影响版本排查(受影响/不受影响): 1.openEuler-20.03-LTS-SP4(4.19.90):受影响 2.openEuler-22.03-LTS-SP1(5.10.0):受影响 3.openEuler-22.03-LTS-SP3(5.10.0):受影响 4.openEuler-24.03-LTS(6.6.0):受影响 5.openEuler-22.03-LTS-SP4(5.10.0):不受影响 6.master(6.6.0):不受影响 7.openEuler-24.03-LTS-Next(6.6.0):不受影响 修复是否涉及abi变化(是/否): 1.openEuler-20.03-LTS-SP4(4.19.90):否 2.openEuler-22.03-LTS-SP1(5.10.0):否 3.openEuler-22.03-LTS-SP3(5.10.0):否 4.master(6.6.0):否 5.openEuler-24.03-LTS(6.6.0):否 6.openEuler-24.03-LTS-Next(6.6.0):否 7.openEuler-22.03-LTS-SP4(5.10.0):否 原因说明: 1.master(6.6.0): 2.openEuler-20.03-LTS-SP4(4.19.90): 3.openEuler-22.03-LTS-SP1(5.10.0): 4.openEuler-22.03-LTS-SP3(5.10.0): 5.openEuler-22.03-LTS-SP4(5.10.0): 6.openEuler-24.03-LTS(6.6.0): 7.openEuler-24.03-LTS-Next(6.6.0): 8.openEuler-24.03-LTS-SP1(6.6.0):
Comments (
17
)
Sign in
to comment
Status
Declined
Backlog
已挂起
Doing
Done
Declined
Assignees
Not set
Labels
CVE/UNFIXED
sig/Kernel
Not set
Projects
Unprojected
Unprojected
Pull Requests
None yet
None yet
Successfully merging a pull request will close this issue.
Branches
No related branch
Branches (
-
)
Tags (
-
)
Planed to start   -   Planed to end
-
Top level
Not Top
Top Level: High
Top Level: Medium
Top Level: Low
Priority
Not specified
Serious
Main
Secondary
Unimportant
Duration
(hours)
参与者(2)
1
https://gitee.com/src-openeuler/kernel.git
git@gitee.com:src-openeuler/kernel.git
src-openeuler
kernel
kernel
Going to Help Center
Search
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
Comment
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register