CVE-2022-49349

7.8 HIGH

📋 TL;DR

This is a use-after-free vulnerability in the Linux kernel's ext4 filesystem driver that occurs during directory rename operations. Attackers with local access can trigger memory corruption leading to system crashes or potential privilege escalation. It affects Linux systems using ext4 filesystems.

💻 Affected Systems

Products:
  • Linux Kernel
Versions: Kernel versions before the fix (specific versions vary by distribution, but generally before kernel 5.10.x with backports)
Operating Systems: Linux distributions using ext4 filesystem
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems using ext4 filesystem. Requires attacker to have ability to perform directory rename operations.

📦 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 →

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 panic leading to denial of service, or potential privilege escalation allowing attackers to gain root access and execute arbitrary code.

🟠

Likely Case

System crash or kernel panic causing denial of service, potentially requiring physical or remote console access to reboot.

🟢

If Mitigated

System crash with automatic reboot if configured, but no persistent compromise if proper isolation exists.

🌐 Internet-Facing: LOW - Requires local access to trigger, not directly exploitable over network.
🏢 Internal Only: MEDIUM - Local users or compromised services could trigger this, potentially affecting system stability.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Requires local access and ability to trigger specific directory operations. The vulnerability is in filesystem driver code, making exploitation non-trivial but possible.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Kernel versions with commits 0be698ecbe4471fcad80e81ec6a05001421041b3 or later

Vendor Advisory: https://git.kernel.org/stable/c/0be698ecbe4471fcad80e81ec6a05001421041b3

Restart Required: Yes

Instructions:

1. Update Linux kernel to patched version from your distribution's repositories. 2. For custom kernels, apply the ext4 fix commit. 3. Reboot system to load new kernel.

🔧 Temporary Workarounds

Disable ext4 filesystem usage

all

Use alternative filesystems like XFS or Btrfs instead of ext4

# Not practical for existing systems, only for new deployments

Restrict directory operations

all

Limit user permissions for directory rename operations

# Use filesystem ACLs or SELinux/AppArmor policies to restrict rename operations

🧯 If You Can't Patch

  • Implement strict access controls to limit who can perform directory operations
  • Monitor for system crashes and implement automated recovery procedures

🔍 How to Verify

Check if Vulnerable:

Check kernel version and if ext4 is in use: 'uname -r' and 'mount | grep ext4'

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version is patched and check for the specific commit in kernel source: 'grep -r "ext4_rename_dir_prepare" /usr/src/linux'

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages in /var/log/messages or dmesg
  • KASAN use-after-free reports
  • EXT4-fs error messages

Network Indicators:

  • None - this is a local vulnerability

SIEM Query:

Search for: 'KASAN: use-after-free in ext4_rename_dir_prepare' OR 'EXT4-fs error' OR 'kernel panic'

🔗 References

📤 Share & Export