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

Goal: 1000 CNY · Raised: 1000 CNY

100.0%

CVE-2024-35971— net: ks8851: Handle softirqs at the end of IRQ thread to fix hang

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

I. Basic Information for CVE-2024-35971

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
net: ks8851: Handle softirqs at the end of IRQ thread to fix hang
Source: NVD (National Vulnerability Database)
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: net: ks8851: Handle softirqs at the end of IRQ thread to fix hang The ks8851_irq() thread may call ks8851_rx_pkts() in case there are any packets in the MAC FIFO, which calls netif_rx(). This netif_rx() implementation is guarded by local_bh_disable() and local_bh_enable(). The local_bh_enable() may call do_softirq() to run softirqs in case any are pending. One of the softirqs is net_rx_action, which ultimately reaches the driver .start_xmit callback. If that happens, the system hangs. The entire call chain is below: ks8851_start_xmit_par from netdev_start_xmit netdev_start_xmit from dev_hard_start_xmit dev_hard_start_xmit from sch_direct_xmit sch_direct_xmit from __dev_queue_xmit __dev_queue_xmit from __neigh_update __neigh_update from neigh_update neigh_update from arp_process.constprop.0 arp_process.constprop.0 from __netif_receive_skb_one_core __netif_receive_skb_one_core from process_backlog process_backlog from __napi_poll.constprop.0 __napi_poll.constprop.0 from net_rx_action net_rx_action from __do_softirq __do_softirq from call_with_stack call_with_stack from do_softirq do_softirq from __local_bh_enable_ip __local_bh_enable_ip from netif_rx netif_rx from ks8851_irq ks8851_irq from irq_thread_fn irq_thread_fn from irq_thread irq_thread from kthread kthread from ret_from_fork The hang happens because ks8851_irq() first locks a spinlock in ks8851_par.c ks8851_lock_par() spin_lock_irqsave(&ksp->lock, ...) and with that spinlock locked, calls netif_rx(). Once the execution reaches ks8851_start_xmit_par(), it calls ks8851_lock_par() again which attempts to claim the already locked spinlock again, and the hang happens. Move the do_softirq() call outside of the spinlock protected section of ks8851_irq() by disabling BHs around the entire spinlock protected section of ks8851_irq() handler. Place local_bh_enable() outside of the spinlock protected section, so that it can trigger do_softirq() without the ks8851_par.c ks8851_lock_par() spinlock being held, and safely call ks8851_start_xmit_par() without attempting to lock the already locked spinlock. Since ks8851_irq() is protected by local_bh_disable()/local_bh_enable() now, replace netif_rx() with __netif_rx() which is not duplicating the local_bh_disable()/local_bh_enable() calls.
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 797047f875b5463719cc70ba213eb691d453c946 ~ 492337a4fbd1421b42df684ee9b34be2a2722540 -
LinuxLinux 5.8 -

II. Public POCs for CVE-2024-35971

#POC DescriptionSource LinkShenlong Link
AI-Generated POCPremium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2024-35971

登录查看更多情报信息。

Same Patch Batch · Linux · 2024-05-20 · 62 CVEs total

CVE-2024-35967Bluetooth: SCO: Fix not validating setsockopt user input
CVE-2024-35954scsi: sg: Avoid sg device teardown race
CVE-2024-35951drm/panfrost: Fix the error path in panfrost_mmu_map_fault_addr()
CVE-2024-35952drm/ast: Fix soft lockup
CVE-2024-35953accel/ivpu: Fix deadlock in context_xa
CVE-2024-35963Bluetooth: hci_sock: Fix not validating setsockopt user input
CVE-2024-35964Bluetooth: ISO: Fix not validating setsockopt user input
CVE-2024-35965Bluetooth: L2CAP: Fix not validating setsockopt user input
CVE-2024-35966Bluetooth: RFCOMM: Fix not validating setsockopt user input
CVE-2024-35968pds_core: Fix pdsc_check_pci_health function to use work thread
CVE-2024-35962netfilter: complete validation of user input
CVE-2024-35969ipv6: fix race condition between ipv6_get_ifaddr and ipv6_del_addr
CVE-2024-35970af_unix: Clear stale u->oob_skb.
CVE-2024-35973geneve: fix header validation in geneve[6]_xmit_skb
CVE-2024-35972bnxt_en: Fix possible memory leak in bnxt_rdma_aux_device_init()
CVE-2024-35974block: fix q->blkg_list corruption during disk rebind
CVE-2024-35975octeontx2-pf: Fix transmit scheduler resource leak
CVE-2024-35976xsk: validate user input for XDP_{UMEM|COMPLETION}_FILL_RING
CVE-2024-35977platform/chrome: cros_ec_uart: properly fix race condition
CVE-2024-35979raid1: fix use-after-free for original bio in raid1_write_request()

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

IV. Related Vulnerabilities

V. Comments for CVE-2024-35971

No comments yet


Leave a comment