CVE-2025-40138
BaseFortify
Publication date: 2025-11-12
Last updated on: 2025-11-12
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | 6.17.0-rc1 |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-UNKNOWN |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability is a NULL pointer dereference in the Linux kernel's f2fs filesystem code, specifically in the function f2fs_check_quota_consistency(). It occurs because the code compares two quota name pointers (old_qname and new_qname) without verifying if they are valid, leading to a crash (general protection fault) when strcmp() is called on a NULL pointer.
How can this vulnerability impact me? :
This vulnerability can cause a system crash (kernel oops) when mounting or remounting an f2fs filesystem with quota options, potentially leading to denial of service by making the system unstable or unresponsive during these operations.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by reproducing the conditions that trigger the null pointer dereference in the f2fs_check_quota_consistency() function. The following commands can be used to test for the issue on a system with an f2fs filesystem and a block device (e.g., /dev/vdb): mkfs.f2fs -f /dev/vdb mount -t f2fs -o usrquota /dev/vdb /mnt/f2fs quotacheck -uc /mnt/f2fs/ umount /mnt/f2fs mount -t f2fs -o usrjquota=aquota.user,jqfmt=vfsold /dev/vdb /mnt/f2fs mount -t f2fs -o remount,usrjquota=,jqfmt=vfsold /dev/vdb /mnt/f2fs umount /mnt/f2fs If these commands cause a kernel oops or crash related to a null pointer dereference, the vulnerability is present.
What immediate steps should I take to mitigate this vulnerability?
Immediate mitigation involves applying the patch that fixes the null pointer dereference in f2fs_check_quota_consistency() by ensuring that pointers old_qname and new_qname are validated before comparison. Until the patch is applied, avoid mounting f2fs filesystems with quota options that trigger the vulnerable code paths, such as usrquota or usrjquota options. Monitoring for kernel oops related to f2fs quota consistency checks and avoiding quota operations on f2fs filesystems can reduce risk.