Linux kernel, Data-race and Null-pointer Dereference, CVE-2025-38337 (medium)

Listen to this Post

The vulnerability exists within the `jbd2_journal_dirty_metadata()` function in the Linux kernel’s filesystem journaling layer. This function is critical for ensuring metadata consistency in the ext4 filesystem. A NULL pointer dereference occurs when the code attempts to access `handle->h_transaction` without verifying the handle’s state. If `handle` is aborted, `h_transaction` can be NULL, leading to a kernel oops or panic. Concurrently, a data-race condition exists on the `jh->b_modified` flag due to missing access synchronization annotations. This race was identified by the Kernel Concurrency Sanitizer (KCSAN), reporting concurrent reads and writes by different tasks. The unsynchronized access to `jh->b_modified` can corrupt journal state information. This corruption may lead to filesystem inconsistencies or crashes when journal entries are processed. The null-pointer dereference provides a direct path for a denial-of-service attack. The data-race, while more subtle, can destabilize the journaling mechanism over time. Both issues stem from insufficient validation and missing memory barrier protections in a core kernel function.
Platform: Linux kernel
Version: multiple versions
Vulnerability: data-race null-ptr-deref
Severity: medium
date: 07/10/2025

Prediction: Patch date: 2025-07-10

What Undercode Say:

Analytics:

`uname -r`

`lsmod | grep jbd2`

`grep -n “jbd2_journal_dirty_metadata” /usr/src/linux-source-/fs/jbd2/transaction.c`

`cat /proc/sys/kernel/tainted`

`dmesg | grep “KCSAN”`

// Code snippet from fs/jbd2/transaction.c around line 1556

`if (is_handle_aborted(handle))`

` return -EROFS;`

`read_seqlock_excl(&journal->j_state_lock);`

`jh->b_modified = 1;`

how Exploit:

Trigger handle abort.

Concurrent metadata operations.

Kernel pointer dereference.

Protection from this CVE

Update kernel version.

Apply security patches.

Disable vulnerable features.

Impact:

Kernel panic.

Filesystem corruption.

Privilege escalation.

🎯Let’s Practice Exploiting & Learn Patching For Free:

Sources:

Reported By: nvd.nist.gov
Extra Source Hub:
Undercode

🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]

💬 Whatsapp | 💬 Telegram

📢 Follow DailyCVE & Stay Tuned:

𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin Featured Image

Scroll to Top