Bug 2320528 (CVE-2024-49876) - CVE-2024-49876 kernel: drm/xe: fix UAF around queue destruction
Summary: CVE-2024-49876 kernel: drm/xe: fix UAF around queue destruction
Keywords:
Status: NEW
Alias: CVE-2024-49876
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On: 2321068
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-10-21 19:08 UTC by OSIDB Bzimport
Modified: 2024-10-22 19:24 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2024-10-21 19:08:31 UTC
In the Linux kernel, the following vulnerability has been resolved:

drm/xe: fix UAF around queue destruction

We currently do stuff like queuing the final destruction step on a
random system wq, which will outlive the driver instance. With bad
timing we can teardown the driver with one or more work workqueue still
being alive leading to various UAF splats. Add a fini step to ensure
user queues are properly torn down. At this point GuC should already be
nuked so queue itself should no longer be referenced from hw pov.

v2 (Matt B)
 - Looks much safer to use a waitqueue and then just wait for the
   xa_array to become empty before triggering the drain.

(cherry picked from commit 861108666cc0e999cffeab6aff17b662e68774e3)


Note You need to log in before you can comment on or make changes to this bug.