CVE-2021-3612: Input Validation
An out-of-bounds memory write flaw was found in the Linux kernel's joystick devices subsystem in versions before 5.9-rc1, in the way the user calls ioctl JSIOCSBTNMAP. This flaw allows a local user to crash the system or possibly escalate their privileges on the system. The highest threat from this vulnerability is to confidentiality, integrity, as well as system availability.
Other sources
An out-of-bounds memory write flaw was found in the Linux kernel’s joystick devices subsystem, in the way the user calls ioctl JSIOCSBTNMAP. This flaw allows a local user to crash the system or possibly escalate their privileges on the system. The highest threat from this vulnerability is to confidentiality, integrity, as well as system availability.
If using ioctl JSIOCSBTNMAP (ex. for device /dev/input/js0) with incorrect input data (ex. buffer filled with values 0xff), then Linux kernel module crash (panic) happens with memory writing out of bounds. Bug exists in kernels after patch 182d679b2298 (ref. https://lore.kernel.org/linux-input/20210219083215.GS2087@kadam/ , so starting from upstream v5.12-rc1 ). Before this patch (before v5.12-rc1 ), bug existed too, but there was only possibility of reading out of stack that was less dangerous.
— Red Hat
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/kernel-rtto a version that resolves this vulnerability.Fixed in 0:4.18.0-372.9.1.rt7.166.el8 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 0:4.18.0-372.9.1.el8 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1Fixed in 6.12.27-1 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 5.9 - Compensating control
Prevent the Linux kernel module "joydev" from being loaded (blacklist the "joydev" module) to mitigate the ioctl JSIOCSBTNMAP out-of-bounds write vulnerability.
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is the severity of CVE-2021-3612?
CVE-2021-3612 has a high severity rating due to its potential to crash the system or escalate privileges for local users.
How do I fix CVE-2021-3612?
To fix CVE-2021-3612, upgrade to kernel version 5.9 or later, or apply the provided security patches for your affected Linux distribution.
Which Linux kernel versions are affected by CVE-2021-3612?
CVE-2021-3612 affects Linux kernel versions prior to 5.9-rc1.
Can CVE-2021-3612 be exploited remotely?
No, CVE-2021-3612 can only be exploited by a local user with access to the system.
What types of systems are vulnerable to CVE-2021-3612?
Systems running affected versions of the Linux kernel, including various distributions like Red Hat Enterprise Linux and Debian, are vulnerable to CVE-2021-3612.