Skip to main content

CVE-2021-47561: Vulnerability in Linux Linux

High
VulnerabilityCVE-2021-47561cvecve-2021-47561
Published: Fri May 24 2024 (05/24/2024, 15:12:50 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: i2c: virtio: disable timeout handling If a timeout is hit, it can result is incorrect data on the I2C bus and/or memory corruptions in the guest since the device can still be operating on the buffers it was given while the guest has freed them. Here is, for example, the start of a slub_debug splat which was triggered on the next transfer after one transfer was forced to timeout by setting a breakpoint in the backend (rust-vmm/vhost-device): BUG kmalloc-1k (Not tainted): Poison overwritten First byte 0x1 instead of 0x6b Allocated in virtio_i2c_xfer+0x65/0x35c age=350 cpu=0 pid=29 __kmalloc+0xc2/0x1c9 virtio_i2c_xfer+0x65/0x35c __i2c_transfer+0x429/0x57d i2c_transfer+0x115/0x134 i2cdev_ioctl_rdwr+0x16a/0x1de i2cdev_ioctl+0x247/0x2ed vfs_ioctl+0x21/0x30 sys_ioctl+0xb18/0xb41 Freed in virtio_i2c_xfer+0x32e/0x35c age=244 cpu=0 pid=29 kfree+0x1bd/0x1cc virtio_i2c_xfer+0x32e/0x35c __i2c_transfer+0x429/0x57d i2c_transfer+0x115/0x134 i2cdev_ioctl_rdwr+0x16a/0x1de i2cdev_ioctl+0x247/0x2ed vfs_ioctl+0x21/0x30 sys_ioctl+0xb18/0xb41 There is no simple fix for this (the driver would have to always create bounce buffers and hold on to them until the device eventually returns the buffers), so just disable the timeout support for now.

AI-Powered Analysis

AILast updated: 06/30/2025, 14:41:22 UTC

Technical Analysis

CVE-2021-47561 is a vulnerability identified in the Linux kernel's I2C virtio driver, which is responsible for handling I2C bus communication in virtualized environments using the virtio framework. The vulnerability arises from improper timeout handling during I2C transfers. Specifically, if a timeout occurs, the driver may continue to operate on buffers that the guest operating system has already freed, leading to potential memory corruption and incorrect data being transmitted on the I2C bus. This condition was demonstrated by a kernel memory allocator debug error (slub_debug splat) indicating that poisoned memory was overwritten, a clear sign of use-after-free or buffer corruption. The root cause is that the driver does not maintain bounce buffers to hold data until the device completes its operations, which complicates a straightforward fix. As a temporary mitigation, the Linux kernel maintainers have disabled timeout handling in the virtio I2C driver to prevent triggering this unsafe state. This vulnerability affects Linux kernel versions identified by the commit hashes provided and is relevant to virtualized environments where the virtio I2C device is used. No known exploits are currently reported in the wild, and no CVSS score has been assigned yet.

Potential Impact

For European organizations, the impact of CVE-2021-47561 primarily concerns systems running Linux in virtualized environments that utilize the virtio I2C driver, such as cloud infrastructure, data centers, and embedded systems using virtualization. The vulnerability could lead to memory corruption within guest virtual machines, potentially causing system instability, crashes, or data corruption. This undermines the integrity and availability of affected systems. While direct remote exploitation is unlikely without guest access, attackers with the ability to execute code within a guest VM could exploit this flaw to escalate privileges or cause denial of service. Organizations relying on Linux-based virtualization for critical infrastructure, industrial control systems, or IoT devices may face operational disruptions. The lack of a simple fix and the disabling of timeout handling may also affect device performance or reliability, which could impact sensitive applications. However, since no exploits are known in the wild, the immediate risk is moderate but warrants proactive mitigation to prevent future exploitation.

Mitigation Recommendations

European organizations should take the following specific actions: 1) Ensure all Linux systems running virtualized environments are updated to the latest kernel versions that include the fix disabling timeout handling in the virtio I2C driver. 2) Audit virtualized workloads to identify any use of the virtio I2C device and assess exposure. 3) For environments where I2C communication is critical, consider isolating or restricting access to virtual machines that use this driver to trusted users only. 4) Monitor system logs and kernel messages for signs of memory corruption or crashes related to I2C transfers. 5) Engage with Linux distribution vendors for backported patches if using long-term support kernels. 6) Evaluate the impact of disabled timeout handling on device performance and plan for future updates when a more robust fix is available. 7) Implement strict guest VM security controls to prevent unauthorized code execution that could trigger this vulnerability. These steps go beyond generic patching by focusing on environment-specific risk reduction and operational monitoring.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-05-24T15:11:00.727Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9833c4522896dcbe946f

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

Last enriched: 6/30/2025, 2:41:22 PM

Last updated: 8/15/2025, 6:52:41 AM

Views: 14

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