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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2024-50140— sched/core: Disable page allocation in task_tick_mm_cid()

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

I. Basic Information for CVE-2024-50140

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
sched/core: Disable page allocation in task_tick_mm_cid()
Source: NVD (National Vulnerability Database)
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: sched/core: Disable page allocation in task_tick_mm_cid() With KASAN and PREEMPT_RT enabled, calling task_work_add() in task_tick_mm_cid() may cause the following splat. [ 63.696416] BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:48 [ 63.696416] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 610, name: modprobe [ 63.696416] preempt_count: 10001, expected: 0 [ 63.696416] RCU nest depth: 1, expected: 1 This problem is caused by the following call trace. sched_tick() [ acquire rq->__lock ] -> task_tick_mm_cid() -> task_work_add() -> __kasan_record_aux_stack() -> kasan_save_stack() -> stack_depot_save_flags() -> alloc_pages_mpol_noprof() -> __alloc_pages_noprof() -> get_page_from_freelist() -> rmqueue() -> rmqueue_pcplist() -> __rmqueue_pcplist() -> rmqueue_bulk() -> rt_spin_lock() The rq lock is a raw_spinlock_t. We can't sleep while holding it. IOW, we can't call alloc_pages() in stack_depot_save_flags(). The task_tick_mm_cid() function with its task_work_add() call was introduced by commit 223baf9d17f2 ("sched: Fix performance regression introduced by mm_cid") in v6.4 kernel. Fortunately, there is a kasan_record_aux_stack_noalloc() variant that calls stack_depot_save_flags() while not allowing it to allocate new pages. To allow task_tick_mm_cid() to use task_work without page allocation, a new TWAF_NO_ALLOC flag is added to enable calling kasan_record_aux_stack_noalloc() instead of kasan_record_aux_stack() if set. The task_tick_mm_cid() function is modified to add this new flag. The possible downside is the missing stack trace in a KASAN report due to new page allocation required when task_work_add_noallloc() is called which should be rare.
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存在安全漏洞,该漏洞源于在task_tick_mm_cid函数中允许页面分配。
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 223baf9d17f25e2608dbdff7232c095c1e612268 ~ 509c29d0d26f68a6f6d0a05cb1a89725237e2b87 -
LinuxLinux 6.4 -

II. Public POCs for CVE-2024-50140

#POC DescriptionSource LinkShenlong Link
AI-Generated POCPremium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2024-50140

登录查看更多情报信息。

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

CVE-2024-50165bpf: Preserve param->string when parsing mount options
CVE-2024-50157RDMA/bnxt_re: Avoid CPU lockups due fifo occupancy check loop
CVE-2024-50158RDMA/bnxt_re: Fix out of bound check
CVE-2024-50159firmware: arm_scmi: Fix the double free in scmi_debugfs_common_setup()
CVE-2024-50160ALSA: hda/cs8409: Fix possible NULL dereference
CVE-2024-50161bpf: Check the remaining info_cnt before repeating btf fields
CVE-2024-50162bpf: devmap: provide rxq after redirect
CVE-2024-50163bpf: Make sure internal and UAPI bpf_redirect flags don't overlap
CVE-2024-50164bpf: Fix overloading of MEM_UNINIT's meaning
CVE-2024-50156drm/msm: Avoid NULL dereference in msm_disp_state_print_regs()
CVE-2024-50166fsl/fman: Fix refcount handling of fman-related devices
CVE-2024-50167be2net: fix potential memory leak in be_xmit()
CVE-2024-50168net/sun3_82586: fix potential memory leak in sun3_82586_send_packet()
CVE-2024-50169vsock: Update rx_bytes on read_skb()
CVE-2024-50170net: bcmasp: fix potential memory leak in bcmasp_xmit()
CVE-2024-50171net: systemport: fix potential memory leak in bcm_sysport_xmit()
CVE-2024-50172RDMA/bnxt_re: Fix a possible memory leak
CVE-2024-50139KVM: arm64: Fix shift-out-of-bounds bug
CVE-2024-50155netdevsim: use cond_resched() in nsim_dev_trap_report_work()
CVE-2024-50154tcp/dccp: Don't use timer_pending() in reqsk_queue_unlink().

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

IV. Related Vulnerabilities

V. Comments for CVE-2024-50140

No comments yet


Leave a comment