Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

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

EPSS 0.05% · P16
Get alerts for future matching vulnerabilitiesLog in to subscribe

I. Basic Information for CVE-2024-53071

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
drm/panthor: Be stricter about IO mapping flags
Source: NVD (National Vulnerability Database)
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: drm/panthor: Be stricter about IO mapping flags The current panthor_device_mmap_io() implementation has two issues: 1. For mapping DRM_PANTHOR_USER_FLUSH_ID_MMIO_OFFSET, panthor_device_mmap_io() bails if VM_WRITE is set, but does not clear VM_MAYWRITE. 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 FLUSH_ID seem to be ignored; and when the GPU is not powered, the dummy_latest_flush page provided by the driver is deliberately designed to not do any flushes, so the only thing writing to the dummy_latest_flush could achieve would be to make *more* flushes happen. 2. panthor_device_mmap_io() does not block MAP_PRIVATE mappings (which are mappings without the VM_SHARED flag). MAP_PRIVATE in combination with VM_MAYWRITE indicates that the VMA has copy-on-write semantics, which for VM_PFNMAP are semi-supported but fairly cursed. In particular, in such a mapping, the driver can only install PTEs during mmap() by calling remap_pfn_range() (because remap_pfn_range() wants to **store the physical address of the mapped physical memory into the vm_pgoff 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, vmf_insert_pfn_prot() splats when it hits a BUG() check. Fix it by clearing the VM_MAYWRITE flag (userspace writing to the FLUSH_ID doesn't make sense) and requiring VM_SHARED (copy-on-write semantics for the FLUSH_ID 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.
Source: NVD (National Vulnerability Database)
CVSS Information
N/A
Source: NVD (National Vulnerability Database)
Vulnerability Type
N/A
Source: NVD (National Vulnerability Database)
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于存在IO映射标志问题。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

VendorProductAffected VersionsCPESubscribe
LinuxLinux 5fe909cae118a757a77afb37174b99436a36d2e2 ~ 2604afd65043e8f9d4be036cb1242adf6b5723cf -
LinuxLinux 6.10 -

II. Public POCs for CVE-2024-53071

#POC DescriptionSource LinkShenlong Link
AI-Generated POCPremium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2024-53071

登录查看更多情报信息。

Same Patch Batch · Linux · 2024-11-19 · 88 CVEs total

CVE-2024-53056drm/mediatek: Fix potential NULL dereference in mtk_crtc_destroy()
CVE-2024-53052io_uring/rw: fix missing NOWAIT check for O_DIRECT start write
CVE-2024-53053scsi: ufs: core: Fix another deadlock during RTC update
CVE-2024-53050drm/i915/hdcp: Add encoder check in hdcp2_get_capability
CVE-2024-53049slub/kunit: fix a WARNING due to unwrapped __kmalloc_cache_noprof
CVE-2024-53047mptcp: init: protect sched with rcu_read_lock
CVE-2024-53045ASoC: dapm: fix bounds checker error in dapm_widget_list_create
CVE-2024-53046arm64: dts: imx8ulp: correct the flexspi compatible string
CVE-2024-53044net/sched: sch_api: fix xa_insert() error path in tcf_block_get_ext()
CVE-2024-53048ice: fix crash on probe for DPLL enabled E810 LOM
CVE-2024-53055wifi: iwlwifi: mvm: fix 6 GHz scan construction
CVE-2024-53057net/sched: stop qdisc_tree_reduce_backlog on TC_H_ROOT
CVE-2024-53058net: stmmac: TSO: Fix unbalanced DMA map/unmap for non-paged SKB data
CVE-2024-53059wifi: iwlwifi: mvm: Fix response handling in iwl_mvm_send_recovery_cmd()
CVE-2024-53060drm/amdgpu: prevent NULL pointer dereference if ATIF is not supported
CVE-2024-53061media: s5p-jpeg: prevent buffer overflows
CVE-2024-53062media: mgb4: protect driver against spectre
CVE-2024-53064idpf: fix idpf_vc_core_init error path
CVE-2024-53063media: dvbdev: prevent the risk of out of memory access
CVE-2024-53066nfs: Fix KMSAN warning in decode_getfattr_attrs()

Showing top 20 of 88 CVEs. View all on vendor page → →

IV. Related Vulnerabilities

V. Comments for CVE-2024-53071

No comments yet


Leave a comment