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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2024-26737— bpf: Fix racing between bpf_timer_cancel_and_free and bpf_timer_cancel

EPSS 0.01% · P1
Get alerts for future matching vulnerabilitiesLog in to subscribe

I. Basic Information for CVE-2024-26737

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 racing between bpf_timer_cancel_and_free and bpf_timer_cancel
Source: NVD (National Vulnerability Database)
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: bpf: Fix racing between bpf_timer_cancel_and_free and bpf_timer_cancel The following race is possible between bpf_timer_cancel_and_free and bpf_timer_cancel. It will lead a UAF on the timer->timer. bpf_timer_cancel(); spin_lock(); t = timer->time; spin_unlock(); bpf_timer_cancel_and_free(); spin_lock(); t = timer->timer; timer->timer = NULL; spin_unlock(); hrtimer_cancel(&t->timer); kfree(t); /* UAF on t */ hrtimer_cancel(&t->timer); In bpf_timer_cancel_and_free, this patch frees the timer->timer after a rcu grace period. This requires a rcu_head addition to the "struct bpf_hrtimer". Another kfree(t) happens in bpf_timer_init, this does not need a kfree_rcu because it is still under the spin_lock and timer->timer has not been visible by others yet. In bpf_timer_cancel, rcu_read_lock() is added because this helper can be used in a non rcu critical section context (e.g. from a sleepable bpf prog). Other timer->timer usages in helpers.c have been audited, bpf_timer_cancel() is the only place where timer->timer is used outside of the spin_lock. Another solution considered is to mark a t->flag in bpf_timer_cancel and clear it after hrtimer_cancel() is done. In bpf_timer_cancel_and_free, it busy waits for the flag to be cleared before kfree(t). This patch goes with a straight forward solution and frees timer->timer after a rcu grace period.
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存在安全漏洞,该漏洞源于存在竞争条件。
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 b00628b1c7d595ae5b544e059c27b1f5828314b4 ~ 5268bb02107b9eedfdcd51db75b407d10043368c -
LinuxLinux 5.15 -

II. Public POCs for CVE-2024-26737

#POC DescriptionSource LinkShenlong Link
AI-Generated POCPremium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2024-26737

登录查看更多情报信息。

Same Patch Batch · Linux · 2024-04-03 · 94 CVEs total

CVE-2024-26744RDMA/srpt: Support specifying the srpt_service_guid parameter
CVE-2024-26741dccp/tcp: Unhash sk from ehash for tb2 alloc failure after check_estalblished().
CVE-2024-26739net/sched: act_mirred: don't override retval if we already lost the skb
CVE-2024-26734devlink: fix possible use-after-free and memory leaks in devlink_init()
CVE-2024-26733arp: Prevent overflow in arp_req_get().
CVE-2024-26732net: implement lockless setsockopt(SO_PEEK_OFF)
CVE-2024-26731bpf, sockmap: Fix NULL pointer dereference in sk_psock_verdict_data_ready()
CVE-2024-26730hwmon: (nct6775) Fix access to temperature configuration registers
CVE-2024-26735ipv6: sr: fix possible use-after-free and null-ptr-deref
CVE-2024-26743RDMA/qedr: Fix qedr_create_user_qp error flow
CVE-2024-26742scsi: smartpqi: Fix disable_managed_interrupts
CVE-2024-26747usb: roles: fix NULL pointer issue when put module's reference
CVE-2024-26748usb: cdns3: fix memory double free when handle zero packet
CVE-2024-26749usb: cdns3: fixed memory use after free at cdns3_gadget_ep_disable()
CVE-2024-26751ARM: ep93xx: Add terminator to gpiod_lookup_table
CVE-2024-26752l2tp: pass correct message length to ip6_append_data
CVE-2024-26753crypto: virtio/akcipher - Fix stack overflow on memcpy
CVE-2024-26754gtp: fix use-after-free and null-ptr-deref in gtp_genl_dump_pdp()
CVE-2024-26755md: Don't suspend the array for interrupted reshape
CVE-2024-26756md: Don't register sync_thread for reshape directly

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

IV. Related Vulnerabilities

V. Comments for CVE-2024-26737

No comments yet


Leave a comment