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

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2024-57889— pinctrl: mcp23s08: Fix sleeping in atomic context due to regmap locking

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存在安全漏洞,该漏洞源于regmap锁定导致原子环境中休眠。

AI Predicted 4.3 Difficulty: Hard EPSS 0.17% · P6

Affected Version Matrix 16

VendorProduct Version RangeStatus
Linux Linux 8f38910ba4f662222157ce07a0d5becc4328c46a< 788d9e9a41b81893d6bb8faa05f045c975278318 affected
8f38910ba4f662222157ce07a0d5becc4328c46a< c55d186376a87b468c9ee30f2195e0f3857f61a0 affected
8f38910ba4f662222157ce07a0d5becc4328c46a< 9372e160d8211a7e17f2abff8370794f182df785 affected
8f38910ba4f662222157ce07a0d5becc4328c46a< 0310cbad163a908d09d99c26827859365cd71fcb affected
8f38910ba4f662222157ce07a0d5becc4328c46a< 8c6fd5803b988a5e78c9b9e42c70a936d7cfc6ec affected
8f38910ba4f662222157ce07a0d5becc4328c46a< 830f838589522404cd7c2f0f540602f25034af61 affected
8f38910ba4f662222157ce07a0d5becc4328c46a< a37eecb705f33726f1fb7cd2a67e514a15dfe693 affected
4.13 affected
… +8 more rows
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2024-57889

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
pinctrl: mcp23s08: Fix sleeping in atomic context due to regmap locking
Source: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: pinctrl: mcp23s08: Fix sleeping in atomic context due to regmap locking If a device uses MCP23xxx IO expander to receive IRQs, the following bug can happen: BUG: sleeping function called from invalid context at kernel/locking/mutex.c:283 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, ... preempt_count: 1, expected: 0 ... Call Trace: ... __might_resched+0x104/0x10e __might_sleep+0x3e/0x62 mutex_lock+0x20/0x4c regmap_lock_mutex+0x10/0x18 regmap_update_bits_base+0x2c/0x66 mcp23s08_irq_set_type+0x1ae/0x1d6 __irq_set_trigger+0x56/0x172 __setup_irq+0x1e6/0x646 request_threaded_irq+0xb6/0x160 ... We observed the problem while experimenting with a touchscreen driver which used MCP23017 IO expander (I2C). The regmap in the pinctrl-mcp23s08 driver uses a mutex for protection from concurrent accesses, which is the default for regmaps without .fast_io, .disable_locking, etc. mcp23s08_irq_set_type() calls regmap_update_bits_base(), and the latter locks the mutex. However, __setup_irq() locks desc->lock spinlock before calling these functions. As a result, the system tries to lock the mutex whole holding the spinlock. It seems, the internal regmap locks are not needed in this driver at all. mcp->lock seems to protect the regmap from concurrent accesses already, except, probably, in mcp_pinconf_get/set. mcp23s08_irq_set_type() and mcp23s08_irq_mask/unmask() are called under chip_bus_lock(), which calls mcp23s08_irq_bus_lock(). The latter takes mcp->lock and enables regmap caching, so that the potentially slow I2C accesses are deferred until chip_bus_unlock(). The accesses to the regmap from mcp23s08_probe_one() do not need additional locking. In all remaining places where the regmap is accessed, except mcp_pinconf_get/set(), the driver already takes mcp->lock. This patch adds locking in mcp_pinconf_get/set() and disables internal locking in the regmap config. Among other things, it fixes the sleeping in atomic context described above.
Source: CVE Program / CVE List V5
CVSS Information
N/A
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存在安全漏洞,该漏洞源于regmap锁定导致原子环境中休眠。
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 8f38910ba4f662222157ce07a0d5becc4328c46a ~ 788d9e9a41b81893d6bb8faa05f045c975278318 -
Linux Linux 4.13 -

II. Public POCs for CVE-2024-57889

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

登录查看更多情报信息。

Patches & Fixes for CVE-2024-57889 (7)

Same Patch Batch · Linux · 2025-01-15 · 32 CVEs total

CVE-2024-57882 9.8 CRITICAL mptcp: fix TCP options overflow.
CVE-2024-36476 9.8 CRITICAL RDMA/rtrs: Ensure 'ib_sge list' is accessible
CVE-2024-57802 9.4 CRITICAL netrom: check buffer length before accessing it
CVE-2025-21629 8.2 HIGH net: reenable NETIF_F_IPV6_CSUM offload for BIG TCP packets
CVE-2024-57883 7.8 HIGH mm: hugetlb: independent PMD page table shared count
CVE-2024-57857 7.8 HIGH RDMA/siw: Remove direct link to net_device
CVE-2024-57801 7.8 HIGH net/mlx5e: Skip restore TC rules for vport rep without loaded flag
CVE-2024-57795 7.8 HIGH RDMA/rxe: Remove the direct link to net_device
CVE-2024-39282 7.8 HIGH net: wwan: t7xx: Fix FSM command timeout issue
CVE-2024-57896 7.8 HIGH btrfs: flush delalloc workers queue before stopping cleaner kthread during unmount
CVE-2024-57893 7.8 HIGH ALSA: seq: oss: Fix races at processing SysEx messages
CVE-2024-57887 7.8 HIGH drm: adv7511: Fix use-after-free in adv7533_attach_dsi()
CVE-2024-57899 7.6 HIGH wifi: mac80211: fix mbss changed flags corruption on 32 bit systems
CVE-2024-57902 7.3 HIGH af_packet: fix vlan_get_tci() vs MSG_PEEK
CVE-2024-57901 7.3 HIGH af_packet: fix vlan_get_protocol_dgram() vs MSG_PEEK
CVE-2024-57895 7.1 HIGH ksmbd: set ATTR_CTIME flags when setting mtime
CVE-2024-57884 mm: vmscan: account for free pages to prevent infinite Loop in throttle_direct_reclaim()
CVE-2024-57844 drm/xe: Fix fault on fd close after unbind
CVE-2024-57841 net: fix memory leak in tcp_conn_request()
CVE-2024-57885 mm/kmemleak: fix sleeping function called from invalid context at print message

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

IV. Related Vulnerabilities

V. Comments for CVE-2024-57889

No comments yet


Leave a comment