Skip to main content

CVE-2021-47449: Vulnerability in Linux Linux

High
VulnerabilityCVE-2021-47449cvecve-2021-47449
Published: Wed May 22 2024 (05/22/2024, 06:19:40 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: ice: fix locking for Tx timestamp tracking flush Commit 4dd0d5c33c3e ("ice: add lock around Tx timestamp tracker flush") added a lock around the Tx timestamp tracker flow which is used to cleanup any left over SKBs and prepare for device removal. This lock is problematic because it is being held around a call to ice_clear_phy_tstamp. The clear function takes a mutex to send a PHY write command to firmware. This could lead to a deadlock if the mutex actually sleeps, and causes the following warning on a kernel with preemption debugging enabled: [ 715.419426] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:573 [ 715.427900] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 3100, name: rmmod [ 715.435652] INFO: lockdep is turned off. [ 715.439591] Preemption disabled at: [ 715.439594] [<0000000000000000>] 0x0 [ 715.446678] CPU: 52 PID: 3100 Comm: rmmod Tainted: G W OE 5.15.0-rc4+ #42 bdd7ec3018e725f159ca0d372ce8c2c0e784891c [ 715.458058] Hardware name: Intel Corporation S2600STQ/S2600STQ, BIOS SE5C620.86B.02.01.0010.010620200716 01/06/2020 [ 715.468483] Call Trace: [ 715.470940] dump_stack_lvl+0x6a/0x9a [ 715.474613] ___might_sleep.cold+0x224/0x26a [ 715.478895] __mutex_lock+0xb3/0x1440 [ 715.482569] ? stack_depot_save+0x378/0x500 [ 715.486763] ? ice_sq_send_cmd+0x78/0x14c0 [ice 9a7e1ec00971c89ecd3fe0d4dc7da2b3786a421d] [ 715.494979] ? kfree+0xc1/0x520 [ 715.498128] ? mutex_lock_io_nested+0x12a0/0x12a0 [ 715.502837] ? kasan_set_free_info+0x20/0x30 [ 715.507110] ? __kasan_slab_free+0x10b/0x140 [ 715.511385] ? slab_free_freelist_hook+0xc7/0x220 [ 715.516092] ? kfree+0xc1/0x520 [ 715.519235] ? ice_deinit_lag+0x16c/0x220 [ice 9a7e1ec00971c89ecd3fe0d4dc7da2b3786a421d] [ 715.527359] ? ice_remove+0x1cf/0x6a0 [ice 9a7e1ec00971c89ecd3fe0d4dc7da2b3786a421d] [ 715.535133] ? pci_device_remove+0xab/0x1d0 [ 715.539318] ? __device_release_driver+0x35b/0x690 [ 715.544110] ? driver_detach+0x214/0x2f0 [ 715.548035] ? bus_remove_driver+0x11d/0x2f0 [ 715.552309] ? pci_unregister_driver+0x26/0x250 [ 715.556840] ? ice_module_exit+0xc/0x2f [ice 9a7e1ec00971c89ecd3fe0d4dc7da2b3786a421d] [ 715.564799] ? __do_sys_delete_module.constprop.0+0x2d8/0x4e0 [ 715.570554] ? do_syscall_64+0x3b/0x90 [ 715.574303] ? entry_SYSCALL_64_after_hwframe+0x44/0xae [ 715.579529] ? start_flush_work+0x542/0x8f0 [ 715.583719] ? ice_sq_send_cmd+0x78/0x14c0 [ice 9a7e1ec00971c89ecd3fe0d4dc7da2b3786a421d] [ 715.591923] ice_sq_send_cmd+0x78/0x14c0 [ice 9a7e1ec00971c89ecd3fe0d4dc7da2b3786a421d] [ 715.599960] ? wait_for_completion_io+0x250/0x250 [ 715.604662] ? lock_acquire+0x196/0x200 [ 715.608504] ? do_raw_spin_trylock+0xa5/0x160 [ 715.612864] ice_sbq_rw_reg+0x1e6/0x2f0 [ice 9a7e1ec00971c89ecd3fe0d4dc7da2b3786a421d] [ 715.620813] ? ice_reset+0x130/0x130 [ice 9a7e1ec00971c89ecd3fe0d4dc7da2b3786a421d] [ 715.628497] ? __debug_check_no_obj_freed+0x1e8/0x3c0 [ 715.633550] ? trace_hardirqs_on+0x1c/0x130 [ 715.637748] ice_write_phy_reg_e810+0x70/0xf0 [ice 9a7e1ec00971c89ecd3fe0d4dc7da2b3786a421d] [ 715.646220] ? do_raw_spin_trylock+0xa5/0x160 [ 715.650581] ? ice_ptp_release+0x910/0x910 [ice 9a7e1ec00971c89ecd3fe0d4dc7da2b3786a421d] [ 715.658797] ? ice_ptp_release+0x255/0x910 [ice 9a7e1ec00971c89ecd3fe0d4dc7da2b3786a421d] [ 715.667013] ice_clear_phy_tstamp+0x2c/0x110 [ice 9a7e1ec00971c89ecd3fe0d4dc7da2b3786a421d] [ 715.675403] ice_ptp_release+0x408/0x910 [ice 9a7e1ec00971c89ecd3fe0d4dc7da2b3786a421d] [ 715.683440] ice_remove+0x560/0x6a0 [ice 9a7e1ec00971c89ecd3fe0d4dc7da2b3786a421d] [ 715.691037] ? _raw_spin_unlock_irqrestore+0x46/0x73 [ 715.696005] pci_device_remove+0xab/0x1d0 [ 715.700018] __device_release_driver+0x35b/0x690 [ 715.704637] driver_detach+0x214/0x2f0 [ 715.708389] bus_remove_driver+0x11d/0x2f0 [ 715.712489] pci_unregister_driver+0x26/0x250 [ 71 ---truncated---

AI-Powered Analysis

AILast updated: 07/03/2025, 05:12:29 UTC

Technical Analysis

CVE-2021-47449 is a high-severity vulnerability affecting the Linux kernel, specifically within the Intel Ethernet Controller driver known as 'ice'. The vulnerability arises from improper locking mechanisms implemented around the Tx timestamp tracker flush operation. The patch commit 4dd0d5c33c3e introduced a lock around this flush operation to handle cleanup of leftover SKBs (socket buffers) and prepare for device removal. However, this lock is held while calling ice_clear_phy_tstamp, which itself takes a mutex to send a PHY write command to the firmware. Since this mutex can sleep, holding the outer lock during this call can lead to a deadlock scenario. This is particularly problematic on kernels with preemption debugging enabled, where it triggers warnings about sleeping functions being called from invalid contexts. The deadlock can cause system instability or kernel hangs during device removal or driver unload operations. The vulnerability is classified under CWE-129 (Improper Validation of Array Index) but the core issue is a locking deadlock rather than a direct memory corruption. The CVSS v3.1 score is 7.1 (High), with vector AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H, indicating local attack vector, low attack complexity, requires low privileges, no user interaction, unchanged scope, no confidentiality impact, but high integrity and availability impact. No known exploits are reported in the wild yet. The affected Linux kernel versions include commits 46720ac66c21bf85e08823664b7b314b85e43f26 and 4dd0d5c33c3ebf24a07cae6141648aeb7ba56072. The vulnerability impacts systems using the Intel 'ice' Ethernet driver, common in servers and high-performance networking hardware. The issue can cause kernel deadlocks and crashes during device removal or driver unload, potentially leading to denial of service or system instability.

Potential Impact

For European organizations, the impact of CVE-2021-47449 can be significant, especially for enterprises and data centers relying on Linux servers equipped with Intel Ethernet controllers using the 'ice' driver. The deadlock can cause kernel panics or hangs during routine device management operations, leading to unplanned downtime and service disruption. This is critical for sectors with high availability requirements such as finance, telecommunications, cloud service providers, and critical infrastructure operators. The integrity impact means that system processes related to network device management can be disrupted, potentially affecting network reliability and data flow. Although there is no direct confidentiality impact, the availability and integrity issues can indirectly affect business operations and compliance with regulations like GDPR if service interruptions lead to data processing delays or failures. Since the attack vector is local with low privileges required, insider threats or compromised low-privilege accounts could exploit this vulnerability to cause denial of service. The lack of user interaction requirement means automated or scripted attacks within the local environment are feasible. European organizations with extensive Linux infrastructure and Intel networking hardware should prioritize patching to maintain operational stability and avoid costly downtime.

Mitigation Recommendations

1. Apply the official Linux kernel patches that fix the locking issue in the 'ice' driver as soon as they are available and tested in your environment. 2. For environments where immediate patching is not feasible, consider disabling or unloading the affected 'ice' driver temporarily if it does not impact critical operations. 3. Monitor kernel logs for warnings related to mutex locking and preemption debugging messages that indicate potential deadlock conditions. 4. Implement strict access controls and monitoring on systems with local user access to prevent exploitation by low-privilege users. 5. Use kernel live patching solutions where possible to apply fixes without requiring full system reboots, minimizing downtime. 6. Conduct thorough testing of device removal and driver unload operations post-patching to ensure stability. 7. Maintain up-to-date inventory of hardware using Intel 'ice' Ethernet controllers to prioritize patch deployment. 8. Collaborate with hardware vendors and Linux distribution maintainers to receive timely updates and advisories. 9. Educate system administrators about the symptoms of this deadlock to enable rapid detection and response.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-05-21T14:58:30.832Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d9833c4522896dcbe9189

Added to database: 5/21/2025, 9:09:07 AM

Last enriched: 7/3/2025, 5:12:29 AM

Last updated: 8/11/2025, 4:15:46 AM

Views: 11

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats