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

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2024-50200— maple_tree: correct tree corruption on spanning store

Quick assessment

Affected
Linux Linux
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于跨存储时树损坏。

CVSS 7.8 · High EPSS 0.21% · P11

Possible ATT&CK Techniques 1 AI

T1068 · Exploitation for Privilege Escalation

Affected Version Matrix 10

VendorProduct Version RangeStatus
Linux Linux 54a611b605901c7d5d05b6b8f5d04a6ceb0962aa< 7c7874977da9e47ca0f53d8b9a5b17385fed83f2 affected
54a611b605901c7d5d05b6b8f5d04a6ceb0962aa< 677f1df179cb68c12ddf7707ec325eb50e99c7d9 affected
54a611b605901c7d5d05b6b8f5d04a6ceb0962aa< 982dd0d26d1f015ed34866579480d2be5250b0ef affected
54a611b605901c7d5d05b6b8f5d04a6ceb0962aa< bea07fd63192b61209d48cbb81ef474cc3ee4c62 affected
6.1 affected
< 6.1 unaffected
6.1.114≤ 6.1.* unaffected
6.6.58≤ 6.6.* unaffected
… +2 more rows
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2024-50200

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
maple_tree: correct tree corruption on spanning store
Source: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: maple_tree: correct tree corruption on spanning store Patch series "maple_tree: correct tree corruption on spanning store", v3. There has been a nasty yet subtle maple tree corruption bug that appears to have been in existence since the inception of the algorithm. This bug seems far more likely to happen since commit f8d112a4e657 ("mm/mmap: avoid zeroing vma tree in mmap_region()"), which is the point at which reports started to be submitted concerning this bug. We were made definitely aware of the bug thanks to the kind efforts of Bert Karwatzki who helped enormously in my being able to track this down and identify the cause of it. The bug arises when an attempt is made to perform a spanning store across two leaf nodes, where the right leaf node is the rightmost child of the shared parent, AND the store completely consumes the right-mode node. This results in mas_wr_spanning_store() mitakenly duplicating the new and existing entries at the maximum pivot within the range, and thus maple tree corruption. The fix patch corrects this by detecting this scenario and disallowing the mistaken duplicate copy. The fix patch commit message goes into great detail as to how this occurs. This series also includes a test which reliably reproduces the issue, and asserts that the fix works correctly. Bert has kindly tested the fix and confirmed it resolved his issues. Also Mikhail Gavrilov kindly reported what appears to be precisely the same bug, which this fix should also resolve. This patch (of 2): There has been a subtle bug present in the maple tree implementation from its inception. This arises from how stores are performed - when a store occurs, it will overwrite overlapping ranges and adjust the tree as necessary to accommodate this. A range may always ultimately span two leaf nodes. In this instance we walk the two leaf nodes, determine which elements are not overwritten to the left and to the right of the start and end of the ranges respectively and then rebalance the tree to contain these entries and the newly inserted one. This kind of store is dubbed a 'spanning store' and is implemented by mas_wr_spanning_store(). In order to reach this stage, mas_store_gfp() invokes mas_wr_preallocate(), mas_wr_store_type() and mas_wr_walk() in turn to walk the tree and update the object (mas) to traverse to the location where the write should be performed, determining its store type. When a spanning store is required, this function returns false stopping at the parent node which contains the target range, and mas_wr_store_type() marks the mas->store_type as wr_spanning_store to denote this fact. When we go to perform the store in mas_wr_spanning_store(), we first determine the elements AFTER the END of the range we wish to store (that is, to the right of the entry to be inserted) - we do this by walking to the NEXT pivot in the tree (i.e. r_mas.last + 1), starting at the node we have just determined contains the range over which we intend to write. We then turn our attention to the entries to the left of the entry we are inserting, whose state is represented by l_mas, and copy these into a 'big node', which is a special node which contains enough slots to contain two leaf node's worth of data. We then copy the entry we wish to store immediately after this - the copy and the insertion of the new entry is performed by mas_store_b_node(). After this we copy the elements to the right of the end of the range which we are inserting, if we have not exceeded the length of the node (i.e. r_mas.offset <= r_mas.end). Herein lies the bug - under very specific circumstances, this logic can break and corrupt the maple tree. Consider the following tree: Height 0 Root Node / \ pivot = 0xffff / \ pivot = ULONG_MAX / ---truncated---
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
N/A
Source: CVE Program / CVE List V5
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于跨存储时树损坏。
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

Vendor Product Affected Versions CPE Subscribe
Linux Linux 54a611b605901c7d5d05b6b8f5d04a6ceb0962aa ~ 7c7874977da9e47ca0f53d8b9a5b17385fed83f2 -
Linux Linux 6.1 -

II. Public POCs for CVE-2024-50200

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2024-50200

请登录查看更多情报信息。

Patches & Fixes for CVE-2024-50200 (1)

Same Patch Batch · Linux · 2024-11-08 · 38 CVEs total

CVE-2024-50206 9.8 CRITICAL net: ethernet: mtk_eth_soc: fix memory corruption during fq dma init
CVE-2024-50185 8.2 HIGH mptcp: handle consistently DSS corruption
CVE-2024-50174 7.8 HIGH drm/panthor: Fix race when converting group handle to group object
CVE-2024-50211 7.8 HIGH udf: refactor inode_bmap() to handle error
CVE-2024-50208 7.8 HIGH RDMA/bnxt_re: Fix a bug while setting up Level-2 PBL pages
CVE-2024-50207 7.8 HIGH ring-buffer: Fix reader locking when changing the sub buffer order
CVE-2024-50203 7.8 HIGH bpf, arm64: Fix address emission with tag-based KASAN enabled
CVE-2024-50189 7.8 HIGH HID: amd_sfh: Switch to device-managed dmam_alloc_coherent()
CVE-2024-50188 7.8 HIGH net: phy: dp83869: fix memory corruption when enabling fiber
CVE-2024-50187 7.8 HIGH drm/vc4: Stop the active perfmon before being destroyed
CVE-2024-50186 7.8 HIGH net: explicitly clear the sk pointer, when pf->create fails
CVE-2024-50173 7.8 HIGH drm/panthor: Fix access to uninitialized variable in tick_ctx_cleanup()
CVE-2024-50175 7.8 HIGH media: qcom: camss: Remove use_count guard in stop_streaming
CVE-2024-50182 7.1 HIGH secretmem: disable memfd_secret() if arch cannot set direct map
CVE-2024-50195 7.1 HIGH posix-clock: Fix missing timespec64 check in pc_clock_settime()
CVE-2024-50198 iio: light: veml6030: fix IIO device retrieval from embedded device
CVE-2024-50210 posix-clock: posix-clock: Fix unbalanced locking in pc_clock_settime()
CVE-2024-50176 remoteproc: k3-r5: Fix error handling when power-up failed
CVE-2024-50209 RDMA/bnxt_re: Add a check for memory allocation
CVE-2024-50177 drm/amd/display: fix a UBSAN warning in DML2.1

Showing top 20 of 38 CVEs. View all on vendor page &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2024-50200

No comments yet


Leave a comment