{"id":"CVE-2024-46850","summary":"drm/amd/display: Avoid race between dcn35_set_drr() and dc_state_destruct()","details":"In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amd/display: Avoid race between dcn35_set_drr() and dc_state_destruct()\n\ndc_state_destruct() nulls the resource context of the DC state. The pipe\ncontext passed to dcn35_set_drr() is a member of this resource context.\n\nIf dc_state_destruct() is called parallel to the IRQ processing (which\ncalls dcn35_set_drr() at some point), we can end up using already nulled\nfunction callback fields of struct stream_resource.\n\nThe logic in dcn35_set_drr() already tries to avoid this, by checking tg\nagainst NULL. But if the nulling happens exactly after the NULL check and\nbefore the next access, then we get a race.\n\nAvoid this by copying tg first to a local variable, and then use this\nvariable for all the operations. This should work, as long as nobody\nfrees the resource pool where the timing generators live.\n\n(cherry picked from commit 0607a50c004798a96e62c089a4c34c220179dcb5)","modified":"2026-04-02T12:19:46.937079Z","published":"2024-09-27T12:42:43.967Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/46xxx/CVE-2024-46850.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/42850927656a540428e58d370b3c1599a617bac7"},{"type":"WEB","url":"https://git.kernel.org/stable/c/e835d5144f5ef78e4f8828c63e2f0d61144f283a"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/46xxx/CVE-2024-46850.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-46850"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"06ad7e16425619a4a77154c2e85bededb3e04a4f"},{"fixed":"42850927656a540428e58d370b3c1599a617bac7"},{"fixed":"e835d5144f5ef78e4f8828c63e2f0d61144f283a"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-46850.json"}}],"schema_version":"1.7.5"}