CVE-2021-4083: Race Condition
A read-after-free memory flaw was found in the Linux kernel's garbage collection for Unix domain socket file handlers in the way users call close() and fget() simultaneously and can potentially trigger a race condition. This flaw allows a local user to crash the system or escalate their privileges on the system.
Other sources
Another possible race with Unix domain socket garbage collection that can lead to read memory after free. Older more or less similar issue is the CVE-2021-0920 with the fix commit cbcf01128d0a ("afunix: fix garbage collect vs MSGPEEK"). This race happens if the file handler in the process of being closed, the close() could happen before fget(), and then garbage collector can get confused by seeing this situation of having seen a file not having any remaining external references and then seeing it being attached to an fd.
Reference and upstream patch: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=054aa8d439b9
— Red Hat
Affected Software
Remediation
Information
Patch Available
Patch Available
Event History
Parent advisories
This vulnerability appears in the following advisories.
- RHSA-2022:1199
- RHSA-2022:1185
- RHSA-2022:1198
- RHSA-2022:2189
- RHSA-2022:1104
- RHSA-2022:1107
- RHSA-2022:1103
- RHSA-2022:1324
- RHSA-2022:1373
- RHSA-2022:1975
- RHSA-2022:1988
- RHSA-2022:0823
- RHSA-2022:0851
- RHSA-2022:0958
- RHSA-2022:0821
- RHSA-2022:0820
- RHSA-2022:0925
- RHSA-2022:1413
- RHSA-2022:1418
- RHSA-2022:1455
- RHSA-2022:1263
- RHSA-2022:4896
Frequently Asked Questions
What is the severity of CVE-2021-4083?
CVE-2021-4083 has been rated as a medium severity vulnerability, which may allow local users to escalate their privileges or crash the system.
How does CVE-2021-4083 occur?
CVE-2021-4083 occurs due to a read-after-free memory flaw in the Linux kernel's garbage collection for Unix domain socket file handlers.
How do I fix CVE-2021-4083?
To fix CVE-2021-4083, update your kernel to a version that is patched and not vulnerable, such as those listed in the affected software section.
Which software versions are affected by CVE-2021-4083?
CVE-2021-4083 affects multiple versions of the Linux kernel, including various kernel-rt and kernel packages in Red Hat distributions.
Is there a workaround for CVE-2021-4083 if I cannot update immediately?
Currently, there are no known workarounds for CVE-2021-4083 other than applying the security patch as soon as possible.