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

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2024-50182— secretmem: disable memfd_secret() if arch cannot set direct map

CVSS 7.1 · High EPSS 0.23% · P14

Possible ATT&CK Techniques 1AI

T1134 · Access Token Manipulation

Affected Version Matrix 12

VendorProductVersion RangeStatus
LinuxLinux1507f51255c9ff07d75909a84e7c0d7f3c4b2f49< d0ae6ffa1aeb297aef89f49cfb894a83c329ebadaffected
1507f51255c9ff07d75909a84e7c0d7f3c4b2f49< 5ea0b7af38754d2b45ead9257bca47e84662e926affected
1507f51255c9ff07d75909a84e7c0d7f3c4b2f49< 7caf966390e6e4ebf42775df54e7ee1f280ce677affected
1507f51255c9ff07d75909a84e7c0d7f3c4b2f49< 757786abe4547eb3d9d0e8350a63bdb0f9824af2affected
1507f51255c9ff07d75909a84e7c0d7f3c4b2f49< 532b53cebe58f34ce1c0f34d866f5c0e335c53c6affected
5.14affected
< 5.14unaffected
5.15.169≤ 5.15.*unaffected
… +4 more rows
Get alerts for future matching vulnerabilitiesLog in to subscribe

I. Basic Information for CVE-2024-50182

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
secretmem: disable memfd_secret() if arch cannot set direct map
Source: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: secretmem: disable memfd_secret() if arch cannot set direct map Return -ENOSYS from memfd_secret() syscall if !can_set_direct_map(). This is the case for example on some arm64 configurations, where marking 4k PTEs in the direct map not present can only be done if the direct map is set up at 4k granularity in the first place (as ARM's break-before-make semantics do not easily allow breaking apart large/gigantic pages). More precisely, on arm64 systems with !can_set_direct_map(), set_direct_map_invalid_noflush() is a no-op, however it returns success (0) instead of an error. This means that memfd_secret will seemingly "work" (e.g. syscall succeeds, you can mmap the fd and fault in pages), but it does not actually achieve its goal of removing its memory from the direct map. Note that with this patch, memfd_secret() will start erroring on systems where can_set_direct_map() returns false (arm64 with CONFIG_RODATA_FULL_DEFAULT_ENABLED=n, CONFIG_DEBUG_PAGEALLOC=n and CONFIG_KFENCE=n), but that still seems better than the current silent failure. Since CONFIG_RODATA_FULL_DEFAULT_ENABLED defaults to 'y', most arm64 systems actually have a working memfd_secret() and aren't be affected. From going through the iterations of the original memfd_secret patch series, it seems that disabling the syscall in these scenarios was the intended behavior [1] (preferred over having set_direct_map_invalid_noflush return an error as that would result in SIGBUSes at page-fault time), however the check for it got dropped between v16 [2] and v17 [3], when secretmem moved away from CMA allocations. [1]: https://lore.kernel.org/lkml/20201124164930.GK8537@kernel.org/ [2]: https://lore.kernel.org/lkml/20210121122723.3446-11-rppt@kernel.org/#t [3]: https://lore.kernel.org/lkml/20201125092208.12544-10-rppt@kernel.org/
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:N
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存在安全漏洞,该漏洞源于无法直接映射时memfd_secret函数调用问题。
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 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49 ~ d0ae6ffa1aeb297aef89f49cfb894a83c329ebad -
LinuxLinux 5.14 -

II. Public POCs for CVE-2024-50182

#POC DescriptionSource LinkShenlong Link
AI-Generated POCPremium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2024-50182

登录查看更多情报信息。

Patches & Fixes for CVE-2024-50182 (4)

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

CVE-2024-502069.8 CRITICALnet: ethernet: mtk_eth_soc: fix memory corruption during fq dma init
CVE-2024-501858.2 HIGHmptcp: handle consistently DSS corruption
CVE-2024-501747.8 HIGHdrm/panthor: Fix race when converting group handle to group object
CVE-2024-502117.8 HIGHudf: refactor inode_bmap() to handle error
CVE-2024-502087.8 HIGHRDMA/bnxt_re: Fix a bug while setting up Level-2 PBL pages
CVE-2024-502077.8 HIGHring-buffer: Fix reader locking when changing the sub buffer order
CVE-2024-502037.8 HIGHbpf, arm64: Fix address emission with tag-based KASAN enabled
CVE-2024-502007.8 HIGHmaple_tree: correct tree corruption on spanning store
CVE-2024-501897.8 HIGHHID: amd_sfh: Switch to device-managed dmam_alloc_coherent()
CVE-2024-501887.8 HIGHnet: phy: dp83869: fix memory corruption when enabling fiber
CVE-2024-501877.8 HIGHdrm/vc4: Stop the active perfmon before being destroyed
CVE-2024-501737.8 HIGHdrm/panthor: Fix access to uninitialized variable in tick_ctx_cleanup()
CVE-2024-501757.8 HIGHmedia: qcom: camss: Remove use_count guard in stop_streaming
CVE-2024-501867.8 HIGHnet: explicitly clear the sk pointer, when pf->create fails
CVE-2024-501957.1 HIGHposix-clock: Fix missing timespec64 check in pc_clock_settime()
CVE-2024-50199mm/swapfile: skip HugeTLB pages for unuse_vma
CVE-2024-50210posix-clock: posix-clock: Fix unbalanced locking in pc_clock_settime()
CVE-2024-50176remoteproc: k3-r5: Fix error handling when power-up failed
CVE-2024-50209RDMA/bnxt_re: Add a check for memory allocation
CVE-2024-50177drm/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-50182

No comments yet


Leave a comment