Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2025-40320

published critical CVSS 3.1 · 9.8

smb: client: fix potential cfid UAF in smb2_query_info_compound

Published
08 Dec 2025, 00:46:47 UTC
Updated
15 Oct 2026, 22:02:44 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Linux — Linux433042a91f9373241307725b52de573933ffedbf to < 939c4e33005e2a56ea8fcedddf0da92df864bd3b · 4f1fffa2376922f3d1d506e49c0fd445b023a28e to < 327f89c21601ebb7889f8c97754b76f08ce95a0c · 4f1fffa2376922f3d1d506e49c0fd445b023a28e to < b556c278d43f4707a9073ca74d55581b4f279806 · 4f1fffa2376922f3d1d506e49c0fd445b023a28e to < 5c76f9961c170552c1d07c830b5e145475151600 · 6.6.32 to < 6.6.117 · Other versions: unaffected Affected Not stated Linux
Linux — Linux6.8 (affected) · 0 to < 6.8 (unaffected · semver) · 6.6.117 through 6.6.* (unaffected · semver) · 6.12.58 through 6.12.* (unaffected · semver) · 6.17.8 through 6.17.* (unaffected · semver) · 6.18 and later (unaffected · original_commit_for_fix) · Other versions: affected Version-specific Not stated Linux
Amazon Linux AL2 Release evaluation Not Affected Not required Amazon Linux assessment
Amazon Linux AL2023 Release evaluation Not Affected Not required Amazon Linux assessment
Amazon Linux AL2023 Release evaluationALAS2023-2026-1495 Fixed Not stated Amazon Linux assessment
AlmaLinux 10 kernel-abi-stablelists Advisory build 6.12.0-211.7.1.el10_2 ALSA-2026:18134
Oracle Linux 10 kernelx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
AlmaLinux 10 kernel-doc Advisory build 6.12.0-211.7.1.el10_2 ALSA-2026:18134
Show 97 more entries
Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Oracle Linux 10 kernel-abi-stablelistsx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-corex86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-cross-headersaarch64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-cross-headersx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-debugx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-debug-corex86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-debug-develx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-debug-devel-matchedx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-debug-modulesx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-debug-modules-corex86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-debug-modules-extrax86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-debug-uki-virtx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-develx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-devel-matchedx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-docx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-headersaarch64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-headersx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-modulesx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-modules-corex86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-modules-extrax86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-modules-extra-matchedx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-toolsaarch64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-toolsx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-tools-libsaarch64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-tools-libsx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-tools-libs-develaarch64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-tools-libs-develx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-uekaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uekx86_64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-coreaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-corex86_64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-debugaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-debugx86_64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-debug-coreaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-debug-corex86_64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-debug-develaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-debug-develx86_64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-debug-modulesaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-debug-modulesx86_64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-debug-modules-coreaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-debug-modules-corex86_64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-debug-modules-deprecatedaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-debug-modules-deprecatedx86_64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-debug-modules-desktopaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-debug-modules-desktopx86_64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-debug-modules-extraaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-debug-modules-extrax86_64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-debug-modules-extra-netfilteraarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-debug-modules-extra-netfilterx86_64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-debug-modules-usbaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-debug-modules-usbx86_64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-debug-modules-wirelessaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-debug-modules-wirelessx86_64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-develaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-develx86_64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-docx86_64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-modulesaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-modulesx86_64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-modules-coreaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-modules-corex86_64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-modules-deprecatedaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-modules-deprecatedx86_64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-modules-desktopaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-modules-desktopx86_64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-modules-extraaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-modules-extrax86_64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-modules-extra-netfilteraarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-modules-extra-netfilterx86_64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-modules-usbaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-modules-usbx86_64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-modules-wirelessaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-modules-wirelessx86_64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-toolsaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek-toolsx86_64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek64kaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek64k-coreaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek64k-develaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek64k-modulesaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek64k-modules-coreaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek64k-modules-deprecatedaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek64k-modules-desktopaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek64k-modules-extraaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek64k-modules-extra-netfilteraarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek64k-modules-usbaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uek64k-modules-wirelessaarch64 Advisory build 0:6.12.0-107.59.3.2.el10uek ELSA-2026-50006
Oracle Linux 10 kernel-uki-virtx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 kernel-uki-virt-addonsx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 libperfaarch64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 libperfx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 perfaarch64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 perfx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 python3-perfaarch64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 python3-perfx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 rtlaaarch64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 rtlax86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 rvaarch64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134
Oracle Linux 10 rvx86_64 Advisory build 0:6.12.0-211.34.1.el10_2 ELSA-2026-18134

Package entries are limited to the first 100 builds and 100 linked advisories.

Description

In the Linux kernel, the following vulnerability has been resolved: smb: client: fix potential cfid UAF in smb2_query_info_compound When smb2_query_info_compound() retries, a previously allocated cfid may have been freed in the first attempt. Because cfid wasn't reset on replay, later cleanup could act on a stale pointer, leading to a potential use-after-free. Reinitialize cfid to NULL under the replay label. Example trace (trimmed): refcount_t: underflow; use-after-free. WARNING: CPU: 1 PID: 11224 at ../lib/refcount.c:28 refcount_warn_saturate+0x9c/0x110 [...] RIP: 0010:refcount_warn_saturate+0x9c/0x110 [...] Call Trace: <TASK> smb2_query_info_compound+0x29c/0x5c0 [cifs f90b72658819bd21c94769b6a652029a07a7172f] ? step_into+0x10d/0x690 ? __legitimize_path+0x28/0x60 smb2_queryfs+0x6a/0xf0 [cifs f90b72658819bd21c94769b6a652029a07a7172f] smb311_queryfs+0x12d/0x140 [cifs f90b72658819bd21c94769b6a652029a07a7172f] ? kmem_cache_alloc+0x18a/0x340 ? getname_flags+0x46/0x1e0 cifs_statfs+0x9f/0x2b0 [cifs f90b72658819bd21c94769b6a652029a07a7172f] statfs_by_dentry+0x67/0x90 vfs_statfs+0x16/0xd0 user_statfs+0x54/0xa0 __do_sys_statfs+0x20/0x50 do_syscall_64+0x58/0x80

en · Linux · cna

Vendor advisories explicitly linked to this CVE.

31

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
9.8 / 10
Severity
critical
Provider
Linux · cna
Vector string
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Scenarios
en: AV:N - Both halves of the bug are driven entirely by a remote SMB peer — the server decides when `compound_send_recv()` returns the replayable error (`-EAGAIN`/`-ECONNABORTED`) that reaches `replay_again:`, and it sends the SMB2 lease-break that makes `cached_dir_lease_break()` drop the cfid's last reference and free it. A malicious/compromised file server or an on-path attacker against an SMB session without signing can reach this over the network or WAN. AC:L - The server has deterministic control of every precondition: it triggers the replayable error, times the lease break that frees the cfid, and fails its second CREATE so `open_cached_dir()` returns without resetting `*ret_cfid`, leaving the dangling pointer guaranteed. No memory layout or timing condition outside the attacker's control is required, and the replay backoff plus a full round trip give a generous heap-grooming window. PR:N - The attacker is the remote SMB server or an on-path attacker and holds no privileges or credentials on the victim system. The client-side entry points (`statfs`, `getxattr`, `listxattr`) need only an unprivileged user and in practice fire unprompted from `df`, monitoring agents and container runtimes. UI:N - The CIFS mount is a standing deployment condition (fstab/autofs/automount in enterprise and NAS setups), not a per-attempt victim action; once it exists the server drives the entire sequence itself. It only needs to wait for a routine `statfs()`/xattr operation, which recurs continuously without any user acting. S:U - The use-after-free corrupts kernel heap memory within the same kernel security authority as the vulnerable cifs client code. No VM, IOMMU, or sandbox boundary is crossed. C:H - On replay the stale `cfid->fid.persistent_fid` and `volatile_fid` are read from freed slab memory and transmitted verbatim to the attacker's server in the SMB2 QUERY_INFO request, a repeatable kernel-heap infoleak usable to defeat KASLR. Controlling the reallocated object escalates this to arbitrary kernel memory disclosure. I:H - Reaching `close_cached_dir()` on the dangling pointer runs `list_del(&cfid->entry)` with attacker-supplied `next`/`prev` (classic unlink arbitrary write), `cfid->cfids->num_entries--`, `dput()` on a forged dentry, and `kfree(cfid->path)` plus an arbitrary-free loop over the dirents list. Together these yield arbitrary write and arbitrary free, sufficient for control-flow hijack and privilege escalation. A:H - The reported trace shows `refcount_t: underflow; use-after-free` with a WARNING in `refcount_warn_saturate()` reached from `smb2_query_info_compound()` via `statfs`. Operating on the freed object readily oopses or panics the kernel, and the server can retrigger it at will.

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
Linux Linux 433042a91f9373241307725b52de573933ffedbf to < 939c4e33005e2a56ea8fcedddf0da92df864bd3b (affected · git)4f1fffa2376922f3d1d506e49c0fd445b023a28e to < 327f89c21601ebb7889f8c97754b76f08ce95a0c (affected · git)4f1fffa2376922f3d1d506e49c0fd445b023a28e to < b556c278d43f4707a9073ca74d55581b4f279806 (affected · git)4f1fffa2376922f3d1d506e49c0fd445b023a28e to < 5c76f9961c170552c1d07c830b5e145475151600 (affected · git)6.6.32 to < 6.6.117 (affected · semver)Default: unaffected Linux · cna
Linux Linux 6.8 (affected)0 to < 6.8 (unaffected · semver)6.6.117 through 6.6.* (unaffected · semver)6.12.58 through 6.12.* (unaffected · semver)6.17.8 through 6.17.* (unaffected · semver)6.18 and later (unaffected · original_commit_for_fix)Default: affected Linux · cna

Weaknesses

0

No weakness assertions.

References

4

Provider assertions

2

Linux · cna

smb: client: fix potential cfid UAF in smb2_query_info_compound

CISA-ADP · adp

CISA ADP Vulnrichment

Provenance

Schema
5.2
Searchable
yes
Content hash
ce294677f78a798cb1e7c0a3b2dffe4bc33f6f6b0ff4ea3980ce7ad0613a51d3
Ingested
15 Oct 2026, 23:29:36 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected