CVE-2024-46851

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-46851
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-46851.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2024-46851
Downstream
Related
Published
2024-09-27T12:42:44Z
Modified
2025-10-15T15:11:29.552087Z
Summary
drm/amd/display: Avoid race between dcn10_set_drr() and dc_state_destruct()
Details

In the Linux kernel, the following vulnerability has been resolved:

drm/amd/display: Avoid race between dcn10setdrr() and dcstatedestruct()

dcstatedestruct() nulls the resource context of the DC state. The pipe context passed to dcn10setdrr() is a member of this resource context.

If dcstatedestruct() is called parallel to the IRQ processing (which calls dcn10setdrr() at some point), we can end up using already nulled function callback fields of struct stream_resource.

The logic in dcn10setdrr() already tries to avoid this, by checking tg against NULL. But if the nulling happens exactly after the NULL check and before the next access, then we get a race.

Avoid this by copying tg first to a local variable, and then use this variable for all the operations. This should work, as long as nobody frees the resource pool where the timing generators live.

(cherry picked from commit a3cc326a43bdc48fbdf53443e1027a03e309b643)

References

Affected packages

Git / 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
b6ce047a81f508f5c60756db8dfb5ff486e4dad0
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
06ad7e16425619a4a77154c2e85bededb3e04a4f
Fixed
a7aeb03888b92304e2fc7d4d1c242f54a312561b

Affected versions

v6.*

v6.10
v6.10-rc1
v6.10-rc2
v6.10-rc3
v6.10-rc4
v6.10-rc5
v6.10-rc6
v6.10-rc7
v6.10.1
v6.10.10
v6.10.2
v6.10.3
v6.10.4
v6.10.5
v6.10.6
v6.10.7
v6.10.8
v6.10.9
v6.11-rc1
v6.11-rc2
v6.11-rc3
v6.11-rc4
v6.11-rc5
v6.11-rc6
v6.5
v6.6
v6.6-rc1
v6.6-rc2
v6.6-rc3
v6.6-rc4
v6.6-rc5
v6.6-rc6
v6.6-rc7
v6.7
v6.7-rc1
v6.7-rc2
v6.7-rc3
v6.7-rc4
v6.7-rc5
v6.7-rc6
v6.7-rc7
v6.7-rc8
v6.8
v6.8-rc1
v6.8-rc2
v6.8-rc3
v6.8-rc4
v6.8-rc5
v6.8-rc6
v6.8-rc7
v6.9
v6.9-rc1
v6.9-rc2
v6.9-rc3
v6.9-rc4
v6.9-rc5
v6.9-rc6
v6.9-rc7

Database specific

{
    "vanir_signatures": [
        {
            "deprecated": false,
            "signature_type": "Line",
            "target": {
                "file": "drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c"
            },
            "id": "CVE-2024-46851-1ba4a8b9",
            "digest": {
                "line_hashes": [
                    "110614381246359178727427644290843309463",
                    "141181728867291964555268535913196563150",
                    "233757422850412096999554078669319917713",
                    "280978339729323872789069635378243189544",
                    "200588347555166738767915840031696091456",
                    "264107708094512610399288761832397344323",
                    "68776371380646984770676926206076698432",
                    "209046070643489488797728091929993911501",
                    "49258785646164718067802913776725160510",
                    "142122418989702078658237266681927899774",
                    "78237217154443994928706508405355244246",
                    "73960023689236462289680314456359401825"
                ],
                "threshold": 0.9
            },
            "signature_version": "v1",
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b6ce047a81f508f5c60756db8dfb5ff486e4dad0"
        },
        {
            "deprecated": false,
            "signature_type": "Line",
            "target": {
                "file": "drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c"
            },
            "id": "CVE-2024-46851-4b651394",
            "digest": {
                "line_hashes": [
                    "110614381246359178727427644290843309463",
                    "141181728867291964555268535913196563150",
                    "233757422850412096999554078669319917713",
                    "280978339729323872789069635378243189544",
                    "200588347555166738767915840031696091456",
                    "264107708094512610399288761832397344323",
                    "68776371380646984770676926206076698432",
                    "209046070643489488797728091929993911501",
                    "49258785646164718067802913776725160510",
                    "142122418989702078658237266681927899774",
                    "78237217154443994928706508405355244246",
                    "73960023689236462289680314456359401825"
                ],
                "threshold": 0.9
            },
            "signature_version": "v1",
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a7aeb03888b92304e2fc7d4d1c242f54a312561b"
        },
        {
            "deprecated": false,
            "signature_type": "Function",
            "target": {
                "file": "drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c",
                "function": "dcn10_set_drr"
            },
            "id": "CVE-2024-46851-6fa031cd",
            "digest": {
                "length": 936.0,
                "function_hash": "317395230451086841822390413558304077554"
            },
            "signature_version": "v1",
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a7aeb03888b92304e2fc7d4d1c242f54a312561b"
        },
        {
            "deprecated": false,
            "signature_type": "Function",
            "target": {
                "file": "drivers/gpu/drm/amd/display/dc/hwss/dcn10/dcn10_hwseq.c",
                "function": "dcn10_set_drr"
            },
            "id": "CVE-2024-46851-895f0c74",
            "digest": {
                "length": 936.0,
                "function_hash": "317395230451086841822390413558304077554"
            },
            "signature_version": "v1",
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b6ce047a81f508f5c60756db8dfb5ff486e4dad0"
        }
    ]
}

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.10.11