CVE-2024-53071: drm/panthor: Be stricter about IO mapping flags

Published Nov 19, 2024
·
Updated

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

drm/panthor: Be stricter about IO mapping flags

The current panthordevicemmapio() implementation has two issues:

1. For mapping DRMPANTHORUSERFLUSHIDMMIOOFFSET, panthordevicemmapio() bails if VMWRITE is set, but does not clear VMMAYWRITE. That means userspace can use mprotect() to make the mapping writable later on. This is a classic Linux driver gotcha. I don't think this actually has any impact in practice: When the GPU is powered, writes to the FLUSHID seem to be ignored; and when the GPU is not powered, the dummylatestflush page provided by the driver is deliberately designed to not do any flushes, so the only thing writing to the dummylatestflush could achieve would be to make more flushes happen.

2. panthordevicemmapio() does not block MAPPRIVATE mappings (which are mappings without the VMSHARED flag). MAPPRIVATE in combination with VMMAYWRITE indicates that the VMA has copy-on-write semantics, which for VMPFNMAP are semi-supported but fairly cursed. In particular, in such a mapping, the driver can only install PTEs during mmap() by calling remappfnrange() (because remappfnrange() wants to store the physical address of the mapped physical memory into the vmpgoff of the VMA); installing PTEs later on with a fault handler (as panthor does) is not supported in private mappings, and so if you try to fault in such a mapping, vmfinsertpfnprot() splats when it hits a BUG() check.

Fix it by clearing the VMMAYWRITE flag (userspace writing to the FLUSHID doesn't make sense) and requiring VMSHARED (copy-on-write semantics for the FLUSHID don't make sense).

Reproducers for both scenarios are in the notes of my patch on the mailing list; I tested that these bugs exist on a Rock 5B machine.

Note that I only compile-tested the patch, I haven't tested it; I don't have a working kernel build setup for the test machine yet. Please test it before applying it.

Other sources

This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.

Launchpad

Affected Software

8 affected componentsFixes available
Linux Linux kernel>=6.10<6.11.8
Linux Linux kernel=6.12-rc1
Linux Linux kernel=6.12-rc2
Linux Linux kernel=6.12-rc3
Linux Linux kernel=6.12-rc4
Linux Linux kernel=6.12-rc5
Linux Linux kernel=6.12-rc6
debian/linux
5.10.223-15.10.234-16.1.129-16.1.135-16.12.25-1

Event History

Nov 19, 2024
CVE Published
via MITRE·05:22 PM
Data Sourced
via MITRE·05:22 PM
Description
Data Sourced
via NVD·06:15 PM
RemedyDescriptionSeverityAffected Software
Feb 20, 2025
Data Sourced
via Launchpad·12:51 AM
Description
Mar 28, 2025
Data Sourced
via Ubuntu·01:00 AM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2024-53071?

CVE-2024-53071 has not been assigned a specific severity score yet, but it is important to address it due to potential impacts on system stability.

2

How do I fix CVE-2024-53071?

To fix CVE-2024-53071, you should update to a patched version of the Linux kernel as provided in the release notes.

3

Which versions of the Linux kernel are affected by CVE-2024-53071?

CVE-2024-53071 affects Linux kernel versions from 6.10 to 6.11.8 and also includes several 6.12 release candidates.

4

What does CVE-2024-53071 impact?

CVE-2024-53071 impacts the DRM driver within the Linux kernel, specifically related to the io mapping flags in the panthor device.

5

Is CVE-2024-53071 a local or remote vulnerability?

CVE-2024-53071 is categorized as a local vulnerability, requiring local access to the affected system to exploit.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203