CVE-2022-1011: Use After Free
A flaw in the Linux Kernel found. If unprivileged users can mount FUSE filesystems, then can trigger use after free (UAF) that reads of write() buffers, allowing theft of (partial) /etc/shadow hashes or any other data from filesystem.
FUSE allows the userspace filesystem to specify on FUSEOPEN whether the file should use the normal kernel pagecache for handling read()/write() or just send FUSEREAD/FUSEWRITE requests directly to the userspace filesystem (using the flag FOPENDIRECTIO in fuseopenout::openflags).
In FOPENDIRECTIO mode, fusefilewriteiter() calls fusedirectwriteiter(), which normally calls fusedirectio(), which then imports the write buffer with fusegetuserpages(), which uses iovitergetpages() to grab references to userspace pages instead of actually copying memory.
On the filesystem device side, these pages can then either be read to userspace (via fusedevread()), or splice()d over into a pipe using fusedevspliceread() as pipe buffers with &nostealpipebufops.
This is wrong because after fusedevdoread() unlocks the FUSE request, the userspace filesystem can mark the request as completed, causing write() to return. At that point, the write buffer may be reused for other purposes, and the userspace filesystem should no longer have access to it.
Other sources
A use-after-free flaw was found in the Linux kernel’s FUSE filesystem in the way a user triggers write(). This flaw allows a local user to gain unauthorized access to data from the FUSE filesystem, resulting in privilege escalation.
Affected Software
Remediation
Information
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is the severity of CVE-2022-1011?
CVE-2022-1011 is considered a medium severity vulnerability due to its potential to allow unauthorized access to sensitive files.
How do I fix CVE-2022-1011?
To remediate CVE-2022-1011, upgrade to the fixed versions of the Linux kernel as specified in the patches provided by your distribution.
What systems are affected by CVE-2022-1011?
CVE-2022-1011 affects specific versions of the Linux kernel including Red Hat kernel versions 4.18.0-372.9.1 and 5.16, among others.
What type of vulnerability is CVE-2022-1011?
CVE-2022-1011 is a use after free (UAF) vulnerability that can lead to information disclosure.
Who is impacted by CVE-2022-1011?
Unprivileged users who can mount FUSE filesystems on affected systems are at risk from CVE-2022-1011.