CVE-2025-21807

5.5 MEDIUM

📋 TL;DR

A race condition vulnerability in the Linux kernel's block layer sysfs store methods could lead to ABBA deadlock scenarios when modifying device queue limits. This affects Linux systems where users or processes can write to sysfs queue attributes while device drivers are revalidating limits. The vulnerability requires local access to trigger.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Specific affected versions not explicitly stated in CVE, but patch references stable kernel commits.
Operating Systems: Linux distributions using vulnerable kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Requires local access to write to sysfs queue attributes. SCSI sd driver mentioned as example.

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

⚠️ Risk & Real-World Impact

🔴

Worst Case

System deadlock requiring hard reboot, causing denial of service and potential data loss or corruption.

🟠

Likely Case

Local denial of service through system hang or kernel panic when specific sysfs operations coincide with device limit revalidation.

🟢

If Mitigated

Minimal impact with proper access controls preventing unauthorized sysfs writes.

🌐 Internet-Facing: LOW - Requires local access to sysfs interface.
🏢 Internal Only: MEDIUM - Local users or processes with sysfs write access could cause system instability.

🎯 Exploit Status

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

Exploitation requires precise timing between sysfs write operations and driver revalidation activities.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Kernel versions containing commits 8985da5481562e96b95e94ed8e5cc9b6565eb82b and c99f66e4084a62a2cc401c4704a84328aeddc9ec

Vendor Advisory: https://git.kernel.org/stable/c/8985da5481562e96b95e94ed8e5cc9b6565eb82b

Restart Required: Yes

Instructions:

1. Update Linux kernel to patched version. 2. Check distribution-specific security advisories. 3. Reboot system after kernel update.

🔧 Temporary Workarounds

Restrict sysfs access

linux

Limit write access to sysfs block device attributes to prevent triggering the race condition.

chmod 444 /sys/block/*/queue/*
chown root:root /sys/block/*/queue/*

🧯 If You Can't Patch

  • Implement strict access controls on sysfs block device directories
  • Monitor for system hangs or kernel panics related to block device operations

🔍 How to Verify

Check if Vulnerable:

Check kernel version and verify if it contains the vulnerable code pattern in block/sysfs.c

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes the fix commits or check for updated kernel packages from your distribution.

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages
  • System hang events
  • Block device timeout errors in dmesg

Network Indicators:

  • None - local vulnerability only

SIEM Query:

Search for: 'kernel panic' OR 'system hang' OR 'deadlock' in system logs with context of block device operations

🔗 References

📤 Share & Export