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

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2024-50164— bpf: Fix overloading of MEM_UNINIT's meaning

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存在安全漏洞,该漏洞源于在处理MEM_UNINIT标志时,允许BPF程序写入只读映射。

CVSS 7.8 · High EPSS 0.21% · P11

Possible ATT&CK Techniques 1 AI

T1068 · Exploitation for Privilege Escalation

Affected Version Matrix 19

VendorProduct Version RangeStatus
Linux Linux 97e6d7dab1ca4648821c790a2b7913d6d5d549db< 43f4df339a4d375bedcad29a61ae6f0ee7a048f8 affected
97e6d7dab1ca4648821c790a2b7913d6d5d549db< 48068ccaea957469f1adf78dfd2c1c9a7e18f0fe affected
97e6d7dab1ca4648821c790a2b7913d6d5d549db< 54bc31682660810af1bed7ca7a19f182df8d3df8 affected
97e6d7dab1ca4648821c790a2b7913d6d5d549db< 8ea607330a39184f51737c6ae706db7fdca7628e affected
6099a6c8a749a5c8d5f8b4c4342022a92072a02b affected
bfe25df63048edd4ceaf78a2fc755d5e2befc978 affected
717c39718dbc4f7ebcbb7b625fb11851cd9007fe affected
5d0bba8232bf22ce13747cbfc8f696318ff01a50 affected
… +11 more rows
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2024-50164

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
bpf: Fix overloading of MEM_UNINIT's meaning
Source: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: bpf: Fix overloading of MEM_UNINIT's meaning Lonial reported an issue in the BPF verifier where check_mem_size_reg() has the following code: if (!tnum_is_const(reg->var_off)) /* For unprivileged variable accesses, disable raw * mode so that the program is required to * initialize all the memory that the helper could * just partially fill up. */ meta = NULL; This means that writes are not checked when the register containing the size of the passed buffer has not a fixed size. Through this bug, a BPF program can write to a map which is marked as read-only, for example, .rodata global maps. The problem is that MEM_UNINIT's initial meaning that "the passed buffer to the BPF helper does not need to be initialized" which was added back in commit 435faee1aae9 ("bpf, verifier: add ARG_PTR_TO_RAW_STACK type") got overloaded over time with "the passed buffer is being written to". The problem however is that checks such as the above which were added later via 06c1c049721a ("bpf: allow helpers access to variable memory") set meta to NULL in order force the user to always initialize the passed buffer to the helper. Due to the current double meaning of MEM_UNINIT, this bypasses verifier write checks to the memory (not boundary checks though) and only assumes the latter memory is read instead. Fix this by reverting MEM_UNINIT back to its original meaning, and having MEM_WRITE as an annotation to BPF helpers in order to then trigger the BPF verifier checks for writing to memory. Some notes: check_arg_pair_ok() ensures that for ARG_CONST_SIZE{,_OR_ZERO} we can access fn->arg_type[arg - 1] since it must contain a preceding ARG_PTR_TO_MEM. For check_mem_reg() the meta argument can be removed altogether since we do check both BPF_READ and BPF_WRITE. Same for the equivalent check_kfunc_mem_size_reg().
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存在安全漏洞,该漏洞源于在处理MEM_UNINIT标志时,允许BPF程序写入只读映射。
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 97e6d7dab1ca4648821c790a2b7913d6d5d549db ~ 43f4df339a4d375bedcad29a61ae6f0ee7a048f8 -
Linux Linux 5.19 -

II. Public POCs for CVE-2024-50164

# 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-50164

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

Patches & Fixes for CVE-2024-50164 (2)

Same Patch Batch · Linux · 2024-11-07 · 34 CVEs total

CVE-2024-50162 9.8 CRITICAL bpf: devmap: provide rxq after redirect
CVE-2024-50154 9.8 CRITICAL tcp/dccp: Don't use timer_pending() in reqsk_queue_unlink().
CVE-2024-50152 9.8 CRITICAL smb: client: fix possible double free in smb2_set_ea()
CVE-2024-50139 7.9 HIGH KVM: arm64: Fix shift-out-of-bounds bug
CVE-2024-50150 7.8 HIGH usb: typec: altmode should keep reference to parent
CVE-2024-50161 7.8 HIGH bpf: Check the remaining info_cnt before repeating btf fields
CVE-2024-50158 7.8 HIGH RDMA/bnxt_re: Fix out of bound check
CVE-2024-50165 7.8 HIGH bpf: Preserve param->string when parsing mount options
CVE-2024-50151 7.8 HIGH smb: client: fix OOBs when building SMB2_IOCTL request
CVE-2024-50149 7.8 HIGH drm/xe: Don't free job in TDR
CVE-2024-50143 7.8 HIGH udf: fix uninit-value use in udf_get_fileshortad
CVE-2024-50141 7.8 HIGH ACPI: PRM: Find EFI_MEMORY_RUNTIME block for PRM handler and context
CVE-2024-50145 7.5 HIGH octeon_ep: Add SKB allocation failures handling in __octep_oq_process_rx()
CVE-2024-50170 7.5 HIGH net: bcmasp: fix potential memory leak in bcmasp_xmit()
CVE-2024-50159 7.0 HIGH firmware: arm_scmi: Fix the double free in scmi_debugfs_common_setup()
CVE-2024-50167 be2net: fix potential memory leak in be_xmit()
CVE-2024-50155 netdevsim: use cond_resched() in nsim_dev_trap_report_work()
CVE-2024-50168 net/sun3_82586: fix potential memory leak in sun3_82586_send_packet()
CVE-2024-50169 vsock: Update rx_bytes on read_skb()
CVE-2024-50166 fsl/fman: Fix refcount handling of fman-related devices

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

IV. Related Vulnerabilities

V. Comments for CVE-2024-50164

No comments yet


Leave a comment