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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2024-56702— bpf: Mark raw_tp arguments with PTR_MAYBE_NULL

EPSS 0.02% · P4

Affected Version Matrix 8

VendorProductVersion RangeStatus
LinuxLinux3f00c52393445ed49aadc1a567aa502c6333b1a1< c9b91d2d54175f781ad2c361cb2ac2c0e29b14b6affected
3f00c52393445ed49aadc1a567aa502c6333b1a1< 3634d4a310820567fc634bf8f1ee2b91378773e8affected
3f00c52393445ed49aadc1a567aa502c6333b1a1< cb4158ce8ec8a5bb528cc1693356a5eb8058094daffected
6.2affected
< 6.2unaffected
6.11.11≤ 6.11.*unaffected
6.12.2≤ 6.12.*unaffected
6.13≤ *unaffected
Get alerts for future matching vulnerabilitiesLog in to subscribe

I. Basic Information for CVE-2024-56702

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: Mark raw_tp arguments with PTR_MAYBE_NULL
Source: NVD (National Vulnerability Database)
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: bpf: Mark raw_tp arguments with PTR_MAYBE_NULL Arguments to a raw tracepoint are tagged as trusted, which carries the semantics that the pointer will be non-NULL. However, in certain cases, a raw tracepoint argument may end up being NULL. More context about this issue is available in [0]. Thus, there is a discrepancy between the reality, that raw_tp arguments can actually be NULL, and the verifier's knowledge, that they are never NULL, causing explicit NULL checks to be deleted, and accesses to such pointers potentially crashing the kernel. To fix this, mark raw_tp arguments as PTR_MAYBE_NULL, and then special case the dereference and pointer arithmetic to permit it, and allow passing them into helpers/kfuncs; these exceptions are made for raw_tp programs only. Ensure that we don't do this when ref_obj_id > 0, as in that case this is an acquired object and doesn't need such adjustment. The reason we do mask_raw_tp_trusted_reg logic is because other will recheck in places whether the register is a trusted_reg, and then consider our register as untrusted when detecting the presence of the PTR_MAYBE_NULL flag. To allow safe dereference, we enable PROBE_MEM marking when we see loads into trusted pointers with PTR_MAYBE_NULL. While trusted raw_tp arguments can also be passed into helpers or kfuncs where such broken assumption may cause issues, a future patch set will tackle their case separately, as PTR_TO_BTF_ID (without PTR_TRUSTED) can already be passed into helpers and causes similar problems. Thus, they are left alone for now. It is possible that these checks also permit passing non-raw_tp args that are trusted PTR_TO_BTF_ID with null marking. In such a case, allowing dereference when pointer is NULL expands allowed behavior, so won't regress existing programs, and the case of passing these into helpers is the same as above and will be dealt with later. Also update the failure case in tp_btf_nullable selftest to capture the new behavior, as the verifier will no longer cause an error when directly dereference a raw tracepoint argument marked as __nullable. [0]: https://lore.kernel.org/bpf/ZrCZS6nisraEqehw@jlelli-thinkpadt14gen4.remote.csb
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存在安全漏洞,该漏洞源于bpf子系统中对raw tracepoint参数的错误处理,导致内核崩溃。
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 3f00c52393445ed49aadc1a567aa502c6333b1a1 ~ c9b91d2d54175f781ad2c361cb2ac2c0e29b14b6 -
LinuxLinux 6.2 -

II. Public POCs for CVE-2024-56702

#POC DescriptionSource LinkShenlong Link
AI-Generated POCPremium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2024-56702

登录查看更多情报信息。

Same Patch Batch · Linux · 2024-12-28 · 32 CVEs total

CVE-2024-56693brd: defer automatic disk creation until module initialization succeeds
CVE-2024-56708EDAC/igen6: Avoid segmentation fault on module unload
CVE-2024-56707octeontx2-pf: handle otx2_mbox_get_rsp errors in otx2_dmac_flt.c
CVE-2024-56705media: atomisp: Add check for rgby_data memory allocation failure
CVE-2024-56706s390/cpum_sf: Fix and protect memory allocation of SDBs with mutex
CVE-2024-567049p/xen: fix release of IRQ
CVE-2024-56703ipv6: Fix soft lockups in fib6_select_path under high next hop churn
CVE-2024-56701powerpc/pseries: Fix dtl_access_lock to be a rw_semaphore
CVE-2024-56700media: wl128x: Fix atomicity violation in fmc_send_cmd()
CVE-2024-56699s390/pci: Fix potential double remove of hotplug slot
CVE-2024-56698usb: dwc3: gadget: Fix looping of queued SG entries
CVE-2024-56697drm/amdgpu: Fix the memory allocation issue in amdgpu_discovery_get_nps_info()
CVE-2024-56696ALSA: core: Fix possible NULL dereference caused by kunit_kzalloc()
CVE-2024-56694bpf: fix recursive lock when verdict program return SK_PASS
CVE-2024-56695drm/amdkfd: Use dynamic allocation for CU occupancy array in 'kfd_get_cu_occupancy()'
CVE-2024-56692f2fs: fix to do sanity check on node blkaddr in truncate_node()
CVE-2024-56676thermal: testing: Initialize some variables annoteded with _free()
CVE-2024-56691mfd: intel_soc_pmic_bxtwc: Use IRQ domain for USB Type-C device
CVE-2024-56689PCI: endpoint: epf-mhi: Avoid NULL dereference if DT lacks 'mmio'
CVE-2024-56690crypto: pcrypt - Call crypto layer directly when padata_do_parallel() return -EBUSY

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

IV. Related Vulnerabilities

V. Comments for CVE-2024-56702

No comments yet


Leave a comment