CVE-2022-50519

5.5 MEDIUM

📋 TL;DR

This CVE addresses a kernel panic vulnerability in the Linux kernel's nilfs2 filesystem. When checkpoint metadata on disk is corrupted, the system could panic if booted with panic_on_warn enabled. This affects Linux systems using the nilfs2 filesystem.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Kernel versions with nilfs2 support before the fix commits
Operating Systems: Linux distributions with nilfs2 support
Default Config Vulnerable: ✅ No
Notes: Only affects systems using nilfs2 filesystem. Most Linux distributions don't use nilfs2 by default.

⚠️ Risk & Real-World Impact

🔴

Worst Case

System crashes with kernel panic, causing denial of service and potential data loss or corruption.

🟠

Likely Case

Filesystem errors when accessing corrupted nilfs2 partitions, potentially causing application failures.

🟢

If Mitigated

Filesystem errors are handled gracefully without system crash, though data access may fail.

🌐 Internet-Facing: LOW - Requires local filesystem access to nilfs2 partitions.
🏢 Internal Only: MEDIUM - Local users or processes with filesystem access could trigger this condition.

🎯 Exploit Status

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

Requires ability to corrupt nilfs2 checkpoint metadata on disk, which typically needs local access or filesystem manipulation capabilities.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Kernel versions containing commits 090fcfb6edeb9367a915b2749e2bd1f8b48d8898 or later

Vendor Advisory: https://git.kernel.org/stable/c/090fcfb6edeb9367a915b2749e2bd1f8b48d8898

Restart Required: Yes

Instructions:

1. Update Linux kernel to version containing the fix commits. 2. Reboot system to load new kernel.

🔧 Temporary Workarounds

Disable panic_on_warn

linux

Prevents kernel panic when WARN_ON triggers, though filesystem errors will still occur

echo 0 > /proc/sys/kernel/panic_on_warn

Avoid nilfs2 filesystem

linux

Use alternative filesystems like ext4, xfs, or btrfs instead of nilfs2

🧯 If You Can't Patch

  • Avoid using nilfs2 filesystem for critical systems
  • Implement strict access controls to prevent unauthorized filesystem manipulation

🔍 How to Verify

Check if Vulnerable:

Check if nilfs2 is in use: 'mount | grep nilfs2' and check kernel version against patched versions

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes fix commits: 'uname -r' and check with distribution vendor

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages
  • nilfs2 error messages in dmesg
  • Filesystem corruption warnings

Network Indicators:

  • None - local filesystem issue

SIEM Query:

source="kernel" AND ("panic" OR "nilfs2" OR "checkpoint")

🔗 References

📤 Share & Export