Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2025-40138— f2fs: fix to avoid NULL pointer dereference in f2fs_check_quota_consistency()

Quick assessment

Affected
Linux Linux
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于未检查配额一致性,可能导致空指针取消引用。

AI Predicted 5.5 Difficulty: Easy EPSS 0.20% · P9

Possible ATT&CK Techniques 1 AI

T1498 · Network Denial of Service

Affected Version Matrix 6

VendorProduct Version RangeStatus
Linux Linux d185351325237da688de006a2c579e82ea97bdfe< 3f3458852bbfe79c60f2412b8b04677b96688b6e affected
d185351325237da688de006a2c579e82ea97bdfe< 930a9a6ee8e7ffa20af4bffbfc2bbd21d83bf81c affected
6.17 affected
< 6.17 unaffected
6.17.3≤ 6.17.* unaffected
6.18≤ * unaffected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2025-40138

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
f2fs: fix to avoid NULL pointer dereference in f2fs_check_quota_consistency()
Source: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: f2fs: fix to avoid NULL pointer dereference in f2fs_check_quota_consistency() syzbot reported a f2fs bug as below: Oops: gen[ 107.736417][ T5848] Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN PTI KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] CPU: 1 UID: 0 PID: 5848 Comm: syz-executor263 Tainted: G W 6.17.0-rc1-syzkaller-00014-g0e39a731820a #0 PREEMPT_{RT,(full)} RIP: 0010:strcmp+0x3c/0xc0 lib/string.c:284 Call Trace: <TASK> f2fs_check_quota_consistency fs/f2fs/super.c:1188 [inline] f2fs_check_opt_consistency+0x1378/0x2c10 fs/f2fs/super.c:1436 __f2fs_remount fs/f2fs/super.c:2653 [inline] f2fs_reconfigure+0x482/0x1770 fs/f2fs/super.c:5297 reconfigure_super+0x224/0x890 fs/super.c:1077 do_remount fs/namespace.c:3314 [inline] path_mount+0xd18/0xfe0 fs/namespace.c:4112 do_mount fs/namespace.c:4133 [inline] __do_sys_mount fs/namespace.c:4344 [inline] __se_sys_mount+0x317/0x410 fs/namespace.c:4321 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The direct reason is f2fs_check_quota_consistency() may suffer null-ptr-deref issue in strcmp(). The bug can be reproduced w/ below scripts: 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 So, before old_qname and new_qname comparison, we need to check whether they are all valid pointers, fix it.
Source: CVE Program / CVE List V5
CVSS Information
N/A
Source: CVE Program / CVE List V5
Vulnerability Type
N/A
Source: CVE Program / CVE List V5
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel存在安全漏洞,该漏洞源于未检查配额一致性,可能导致空指针取消引用。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
Linux Linux d185351325237da688de006a2c579e82ea97bdfe ~ 3f3458852bbfe79c60f2412b8b04677b96688b6e -
Linux Linux 6.17 -

II. Public POCs for CVE-2025-40138

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2025-40138

请登录查看更多情报信息。

Same Patch Batch · Linux · 2025-11-12 · 96 CVEs total

CVE-2025-40176 9.8 CRITICAL tls: wait for pending async decryptions if tls_strp_msg_hold fails
CVE-2025-40140 8.8 HIGH net: usb: Remove disruptive netif_wake_queue in rtl8150_set_multicast
CVE-2025-40133 8.1 HIGH mptcp: Use __sk_dst_get() and dst_dev_rcu() in mptcp_active_enable().
CVE-2025-40186 8.1 HIGH tcp: Don't call reqsk_fastopen_remove() in tcp_conn_request().
CVE-2025-40158 8.1 HIGH ipv6: use RCU in ip6_output()
CVE-2025-40204 8.1 HIGH sctp: Fix MAC comparison to be constant-time
CVE-2025-40135 8.1 HIGH ipv6: use RCU in ip6_xmit()
CVE-2025-40168 8.1 HIGH smc: Use __sk_dst_get() and dst_dev_rcu() in smc_clc_prfx_match().
CVE-2025-40141 8.0 HIGH Bluetooth: ISO: Fix possible UAF on iso_conn_free
CVE-2025-40166 7.8 HIGH drm/xe/guc: Check GuC running state before deregistering exec queue
CVE-2025-40159 7.8 HIGH xsk: Harden userspace-supplied xdp_desc validation
CVE-2025-40173 7.8 HIGH net/ip6_tunnel: Prevent perpetual tunnel growth
CVE-2025-40167 7.8 HIGH ext4: detect invalid INLINE_DATA + EXTENTS flag combination
CVE-2025-40170 7.8 HIGH net: use dst_dev_rcu() in sk_setup_caps()
CVE-2025-40149 7.8 HIGH tls: Use __sk_dst_get() and dst_dev_rcu() in get_netdev_for_sock().
CVE-2025-40172 7.8 HIGH accel/qaic: Treat remaining == 0 as error in find_and_map_user_pages()
CVE-2025-40174 7.8 HIGH x86/mm: Fix SMP ordering in switch_mm_irqs_off()
CVE-2025-40139 7.8 HIGH smc: Use __sk_dst_get() and dst_dev_rcu() in in smc_clc_prfx_set().
CVE-2025-40190 7.8 HIGH ext4: guard against EA inode refcount underflow in xattr update
CVE-2025-40151 7.8 HIGH LoongArch: BPF: No support of struct argument in trampoline programs

Showing top 20 of 96 CVEs. View all on vendor page &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2025-40138

No comments yet


Leave a comment