CVE-2021-47636
📋 TL;DR
This is an out-of-bounds read vulnerability in the UBIFS filesystem implementation in the Linux kernel. An attacker could potentially read kernel memory contents, leading to information disclosure or system crashes. Systems using UBIFS (Unsorted Block Image File System) on Linux are affected.
💻 Affected Systems
- Linux kernel with UBIFS support
📦 What is this software?
Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →Linux Kernel by Linux
The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...
Learn more about Linux Kernel →⚠️ Risk & Real-World Impact
Worst Case
Kernel memory disclosure leading to privilege escalation or system compromise through information leakage about kernel structures and memory layout.
Likely Case
System instability, crashes, or denial of service due to reading invalid memory addresses.
If Mitigated
Limited impact if KASAN or similar memory sanitizers detect and prevent the out-of-bounds access.
🎯 Exploit Status
Requires local access and UBIFS usage. The vulnerability is in write path but causes read out-of-bounds.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Fixed in kernel commits: 07a209fadee7b53b46858538e1177597273862e4, 3b7fb89135a20587d57f8877c02e25003e9edbdf, 4f2262a334641e05f645364d5ade1f565c85f20b, 5343575aa11c5d7044107d59d43f84aec01312b0, a7054aaf1909cf40489c0ec1b728fdcf79c751a6
Vendor Advisory: https://git.kernel.org/stable/c/07a209fadee7b53b46858538e1177597273862e4
Restart Required: Yes
Instructions:
1. Update Linux kernel to version containing the fix commits. 2. Check your distribution's security advisories for specific patched versions. 3. Reboot system after kernel update.
🔧 Temporary Workarounds
Disable UBIFS
LinuxIf not using UBIFS filesystem, disable it in kernel configuration
echo 'blacklist ubifs' >> /etc/modprobe.d/blacklist.conf
update-initramfs -u
🧯 If You Can't Patch
- Enable KASAN (Kernel Address Sanitizer) to detect and prevent out-of-bounds accesses
- Restrict access to systems using UBIFS to trusted users only
🔍 How to Verify
Check if Vulnerable:
Check if UBIFS is in use: 'cat /proc/filesystems | grep ubifs' and check kernel version against patched versions
Check Version:
uname -r
Verify Fix Applied:
Verify kernel version includes the fix commits: 'uname -r' and check with distribution vendor
📡 Detection & Monitoring
Log Indicators:
- Kernel panic logs
- KASAN error reports mentioning ubifs_wbuf_write_nolock or ecc_sw_hamming_calculate
- System crash dumps
Network Indicators:
- None - local vulnerability
SIEM Query:
Search for: 'kernel: BUG: KASAN: slab-out-of-bounds' OR 'kernel: ubifs' in system logs
🔗 References
- https://git.kernel.org/stable/c/07a209fadee7b53b46858538e1177597273862e4
- https://git.kernel.org/stable/c/3b7fb89135a20587d57f8877c02e25003e9edbdf
- https://git.kernel.org/stable/c/4f2262a334641e05f645364d5ade1f565c85f20b
- https://git.kernel.org/stable/c/5343575aa11c5d7044107d59d43f84aec01312b0
- https://git.kernel.org/stable/c/a7054aaf1909cf40489c0ec1b728fdcf79c751a6
- https://git.kernel.org/stable/c/b80ccbec0e4804436c382d7dd60e943c386ed83a
- https://git.kernel.org/stable/c/e09fa5318d51f522e1af4fbaf8f74999355980c8