CVE-2023-3397 Overview
CVE-2023-3397 is a race condition in the Linux kernel's Journaled File System (JFS) implementation. The flaw exists between the lmLogClose and txEnd functions when executed in different threads. A local attacker with normal user privileges can trigger the race to crash the system or leak internal kernel information. The vulnerability is classified under [CWE-362] (Concurrent Execution using Shared Resource with Improper Synchronization) and [CWE-416] (Use After Free).
Critical Impact
Local users can crash affected Linux systems or disclose sensitive kernel memory contents by exploiting the JFS log-close race condition.
Affected Products
- Linux Kernel (upstream)
- Distributions shipping JFS support compiled into the kernel
- Systems where JFS filesystems can be mounted or accessed by unprivileged users
Discovery Timeline
- 2023-11-01 - CVE-2023-3397 published to NVD
- 2024-11-21 - Last updated in NVD database
Technical Details for CVE-2023-3397
Vulnerability Analysis
The vulnerability resides in the JFS subsystem of the Linux kernel. JFS maintains a transaction log to ensure filesystem consistency, and the lmLogClose function is responsible for closing this journal log when a filesystem is unmounted or torn down. The txEnd function finalizes transactions and releases associated resources.
When these two functions execute concurrently in separate threads, they operate on shared transaction state without adequate synchronization. The lack of proper locking creates a window where one thread can free or modify structures still being accessed by the other thread. This results in a use-after-free condition tracked under [CWE-416].
Successful triggering of the race produces either a kernel panic (denial of service) or the disclosure of uninitialized kernel memory contents. While integrity is not directly affected, leaked kernel pointers or data can be combined with other flaws to bypass mitigations such as Kernel Address Space Layout Randomization (KASLR).
Root Cause
The root cause is missing or insufficient synchronization between lmLogClose and txEnd when both run on the same JFS log structure. Shared transaction metadata is read and freed without consistent lock ordering, producing a time-of-check to time-of-use pattern characteristic of [CWE-362] race conditions.
Attack Vector
Exploitation requires local access with low privileges. An attacker triggers concurrent JFS operations that drive lmLogClose and txEnd to execute on overlapping state. The attack complexity is high because the attacker must win a narrow timing window. No user interaction is required, and exploitation does not cross a privilege boundary beyond the initial local foothold.
No public proof-of-concept exploit is available, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog. For technical details, refer to the Red Hat CVE-2023-3397 Advisory and the upstream kernel mailing list discussion.
Detection Methods for CVE-2023-3397
Indicators of Compromise
- Unexpected kernel oops or panic messages in dmesg referencing lmLogClose, txEnd, or JFS log functions
- Repeated crashes correlated with JFS mount, unmount, or filesystem teardown operations
- Local user processes performing rapid concurrent JFS operations on the same mount point
Detection Strategies
- Audit running kernel versions across the fleet and flag systems with JFS enabled (CONFIG_JFS_FS=y or module loaded)
- Monitor auditd for mount and umount syscalls targeting JFS filesystems from unprivileged users
- Review kernel crash dumps for stack traces involving jfs_logmgr.c or jfs_txnmgr.c
Monitoring Recommendations
- Centralize kernel logs and alert on segfaults or BUG messages originating in JFS code paths
- Track lsmod output for unexpected loading of the jfs module on systems that should not use it
- Correlate user-level filesystem activity with kernel instability events to identify race exploitation attempts
How to Mitigate CVE-2023-3397
Immediate Actions Required
- Apply the kernel update provided by your Linux distribution vendor as soon as it is available
- Unload the jfs kernel module on systems that do not require JFS support
- Restrict the ability of unprivileged users to mount filesystems, including via removable media and user namespaces
Patch Information
Upstream maintainers addressed the race condition by adding synchronization between lmLogClose and txEnd. Distribution-specific patch availability and affected versions are tracked in the Red Hat Bug Report #2217271 and the Red Hat CVE-2023-3397 Advisory. Apply the kernel package update shipped by your vendor and reboot to load the patched kernel.
Workarounds
- Blacklist the jfs module via /etc/modprobe.d/ to prevent it from loading
- Disable user namespace mounting (kernel.unprivileged_userns_clone=0) where supported to limit local mount surface
- Remove or restrict access to JFS-formatted volumes until patched kernels are deployed
# Configuration example
# Blacklist the JFS module to remove the vulnerable code path
echo "blacklist jfs" | sudo tee /etc/modprobe.d/blacklist-jfs.conf
sudo rmmod jfs 2>/dev/null
# Restrict unprivileged user namespace creation (Debian/Ubuntu)
echo "kernel.unprivileged_userns_clone=0" | sudo tee /etc/sysctl.d/99-userns.conf
sudo sysctl --system
# Verify the running kernel after patch and reboot
uname -r
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

