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-40205

published high CVSS 3.1 · 7.8

btrfs: avoid potential out-of-bounds in btrfs_encode_fh()

Published
12 Nov 2025, 21:56:35 UTC
Updated
15 Oct 2026, 22:02:40 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Linux — Linuxbe6e8dc0ba84029997075a1ec77b4ddb863cbe15 to < 60de2f55d2aca53e81b4ef2a67d7cc9e1eb677db · be6e8dc0ba84029997075a1ec77b4ddb863cbe15 to < 742b44342204e5dfe3926433823623c1a0c581df · be6e8dc0ba84029997075a1ec77b4ddb863cbe15 to < d3a9a8e1275eb9b87f006b5562a287aea3f6885f · be6e8dc0ba84029997075a1ec77b4ddb863cbe15 to < d91f6626133698362bba08fbc04bd72c466806d3 · be6e8dc0ba84029997075a1ec77b4ddb863cbe15 to < 0276c8582488022f057b4cec21975a5edf079f47 · be6e8dc0ba84029997075a1ec77b4ddb863cbe15 to < 361d67276eb8ec6be8f27f4ad6c6090459438fee · be6e8dc0ba84029997075a1ec77b4ddb863cbe15 to < 43143776b0a7604d873d1a6f3e552a00aa930224 · be6e8dc0ba84029997075a1ec77b4ddb863cbe15 to < dff4f9ff5d7f289e4545cc936362e01ed3252742 · Other versions: unaffected Affected Not stated Linux
Linux — Linux2.6.29 (affected) · 0 to < 2.6.29 (unaffected · semver) · 5.4.301 through 5.4.* (unaffected · semver) · 5.10.246 through 5.10.* (unaffected · semver) · 5.15.195 through 5.15.* (unaffected · semver) · 6.1.157 through 6.1.* (unaffected · semver) · 6.6.113 through 6.6.* (unaffected · semver) · 6.12.54 through 6.12.* (unaffected · semver) · 6.17.4 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 No Fix Planned Not stated Amazon Linux assessment
Amazon Linux AL2 Release evaluationALAS2KERNEL-5.10-2026-112 Fixed Not stated Amazon Linux assessment
Amazon Linux AL2 Release evaluationALAS2KERNEL-5.15-2025-095 Fixed Not stated Amazon Linux assessment
Amazon Linux AL2 Release evaluationALAS2KERNEL-5.4-2025-114 Fixed Not stated Amazon Linux assessment
Debian bullseye linux Advisory build 5.10.247-1 DLA-4404-1
Oracle Linux 7 kernel-uekx86_64 Advisory build 0:5.4.17-2136.350.3.1.el7uek ELSA-2025-28049
Show 100 more entries
Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Amazon Linux AL2023 Release evaluationALAS2023-2025-1297 Fixed Not stated Amazon Linux assessment
Amazon Linux AL2023 Release evaluationALAS2023-2025-1316 Fixed Not stated Amazon Linux assessment
SUSE / openSUSE SLE-12-SP5 cluster-md-kmp-defaultaarch64 Advisory build 4.12.14-122.283.1 SUSE-SU-2025:4515-1
Debian bullseye linux-6.1 Advisory build 6.1.158-1~deb11u1 DLA-4379-1
Oracle Linux 7 kernel-uek-containerx86_64 Advisory build 0:5.4.17-2136.350.3.1.el7uek ELSA-2025-28049
Oracle Linux 7 kernel-uek-container-debugx86_64 Advisory build 0:5.4.17-2136.350.3.1.el7uek ELSA-2025-28049
Oracle Linux 7 kernel-uek-debugx86_64 Advisory build 0:5.4.17-2136.350.3.1.el7uek ELSA-2025-28049
Oracle Linux 7 kernel-uek-debug-develx86_64 Advisory build 0:5.4.17-2136.350.3.1.el7uek ELSA-2025-28049
Oracle Linux 7 kernel-uek-develx86_64 Advisory build 0:5.4.17-2136.350.3.1.el7uek ELSA-2025-28049
Oracle Linux 7 kernel-uek-docx86_64 Advisory build 0:5.4.17-2136.350.3.1.el7uek ELSA-2025-28049
Oracle Linux 7 kernel-uek-toolsx86_64 Advisory build 0:5.4.17-2136.350.3.1.el7uek ELSA-2025-28049
Oracle Linux 8 bpftoolaarch64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 bpftoolx86_64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uekaarch64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uekaarch64 Advisory build 0:5.4.17-2136.350.3.1.el8uek ELSA-2025-28049
Oracle Linux 8 kernel-uekx86_64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uekx86_64 Advisory build 0:5.4.17-2136.350.3.1.el8uek ELSA-2025-28049
Oracle Linux 8 kernel-uek-containeraarch64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-containerx86_64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-containerx86_64 Advisory build 0:5.4.17-2136.350.3.1.el8uek ELSA-2025-28049
Oracle Linux 8 kernel-uek-container-debugaarch64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-container-debugx86_64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-container-debugx86_64 Advisory build 0:5.4.17-2136.350.3.1.el8uek ELSA-2025-28049
Oracle Linux 8 kernel-uek-coreaarch64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-corex86_64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-debugaarch64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-debugaarch64 Advisory build 0:5.4.17-2136.350.3.1.el8uek ELSA-2025-28049
Oracle Linux 8 kernel-uek-debugx86_64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-debugx86_64 Advisory build 0:5.4.17-2136.350.3.1.el8uek ELSA-2025-28049
Oracle Linux 8 kernel-uek-debug-coreaarch64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-debug-corex86_64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-debug-develaarch64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-debug-develaarch64 Advisory build 0:5.4.17-2136.350.3.1.el8uek ELSA-2025-28049
Oracle Linux 8 kernel-uek-debug-develx86_64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-debug-develx86_64 Advisory build 0:5.4.17-2136.350.3.1.el8uek ELSA-2025-28049
Oracle Linux 8 kernel-uek-debug-modulesaarch64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-debug-modulesx86_64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-debug-modules-extraaarch64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-debug-modules-extrax86_64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-develaarch64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-develaarch64 Advisory build 0:5.4.17-2136.350.3.1.el8uek ELSA-2025-28049
Oracle Linux 8 kernel-uek-develx86_64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-develx86_64 Advisory build 0:5.4.17-2136.350.3.1.el8uek ELSA-2025-28049
Oracle Linux 8 kernel-uek-docaarch64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-docaarch64 Advisory build 0:5.4.17-2136.350.3.1.el8uek ELSA-2025-28049
Oracle Linux 8 kernel-uek-docx86_64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-docx86_64 Advisory build 0:5.4.17-2136.350.3.1.el8uek ELSA-2025-28049
Oracle Linux 8 kernel-uek-modulesaarch64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-modulesx86_64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-modules-extraaarch64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 8 kernel-uek-modules-extrax86_64 Advisory build 0:5.15.0-315.196.5.1.el8uek ELSA-2025-28048
Oracle Linux 9 bpftoolaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 bpftoolx86_64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uekaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uekx86_64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-containeraarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-containerx86_64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-container-debugaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-container-debugx86_64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-coreaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-corex86_64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-debugaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-debugx86_64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-debug-coreaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-debug-corex86_64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-debug-develaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-debug-develx86_64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-debug-modulesaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-debug-modulesx86_64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-debug-modules-extraaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-debug-modules-extrax86_64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-develaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-develx86_64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-docaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-docx86_64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-modulesaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-modulesx86_64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-modules-extraaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek-modules-extrax86_64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek64kaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek64k-coreaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek64k-develaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek64k-modulesaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
Oracle Linux 9 kernel-uek64k-modules-extraaarch64 Advisory build 0:5.15.0-315.196.5.1.el9uek ELSA-2025-28048
SUSE / openSUSE SLE-12-SP5 cluster-md-kmp-defaultppc64le Advisory build 4.12.14-122.283.1 SUSE-SU-2025:4515-1
SUSE / openSUSE SLE-12-SP5 cluster-md-kmp-defaults390x Advisory build 4.12.14-122.283.1 SUSE-SU-2025:4515-1
SUSE / openSUSE SLE-12-SP5 cluster-md-kmp-defaultx86_64 Advisory build 4.12.14-122.283.1 SUSE-SU-2025:4515-1
SUSE / openSUSE SLE-12-SP5 dlm-kmp-defaultaarch64 Advisory build 4.12.14-122.283.1 SUSE-SU-2025:4515-1
SUSE / openSUSE SLE-12-SP5 dlm-kmp-defaultppc64le Advisory build 4.12.14-122.283.1 SUSE-SU-2025:4515-1
SUSE / openSUSE SLE-12-SP5 dlm-kmp-defaults390x Advisory build 4.12.14-122.283.1 SUSE-SU-2025:4515-1
SUSE / openSUSE SLE-12-SP5 dlm-kmp-defaultx86_64 Advisory build 4.12.14-122.283.1 SUSE-SU-2025:4515-1
SUSE / openSUSE SLE-12-SP5 gfs2-kmp-defaultaarch64 Advisory build 4.12.14-122.283.1 SUSE-SU-2025:4515-1
SUSE / openSUSE SLE-12-SP5 gfs2-kmp-defaultppc64le Advisory build 4.12.14-122.283.1 SUSE-SU-2025:4515-1
SUSE / openSUSE SLE-12-SP5 gfs2-kmp-defaults390x Advisory build 4.12.14-122.283.1 SUSE-SU-2025:4515-1
SUSE / openSUSE SLE-12-SP5 gfs2-kmp-defaultx86_64 Advisory build 4.12.14-122.283.1 SUSE-SU-2025:4515-1
SUSE / openSUSE SLE-12-SP5 kernel-defaultaarch64 Advisory build 4.12.14-122.283.1 SUSE-SU-2025:4515-1
SUSE / openSUSE SLE-12-SP5 kernel-defaultppc64le Advisory build 4.12.14-122.283.1 SUSE-SU-2025:4515-1
SUSE / openSUSE SLE-12-SP5 kernel-defaults390x Advisory build 4.12.14-122.283.1 SUSE-SU-2025:4515-1
SUSE / openSUSE SLE-12-SP5 kernel-defaultx86_64 Advisory build 4.12.14-122.283.1 SUSE-SU-2025:4515-1
SUSE / openSUSE SLE-12-SP5 kernel-default-baseaarch64 Advisory build 4.12.14-122.283.1 SUSE-SU-2025:4515-1

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

Description

In the Linux kernel, the following vulnerability has been resolved: btrfs: avoid potential out-of-bounds in btrfs_encode_fh() The function btrfs_encode_fh() does not properly account for the three cases it handles. Before writing to the file handle (fh), the function only returns to the user BTRFS_FID_SIZE_NON_CONNECTABLE (5 dwords, 20 bytes) or BTRFS_FID_SIZE_CONNECTABLE (8 dwords, 32 bytes). However, when a parent exists and the root ID of the parent and the inode are different, the function writes BTRFS_FID_SIZE_CONNECTABLE_ROOT (10 dwords, 40 bytes). If *max_len is not large enough, this write goes out of bounds because BTRFS_FID_SIZE_CONNECTABLE_ROOT is greater than BTRFS_FID_SIZE_CONNECTABLE originally returned. This results in an 8-byte out-of-bounds write at fid->parent_root_objectid = parent_root_id. A previous attempt to fix this issue was made but was lost. https://lore.kernel.org/all/[email protected]/ Although this issue does not seem to be easily triggerable, it is a potential memory corruption bug that should be fixed. This patch resolves the issue by ensuring the function returns the appropriate size for all three cases and validates that *max_len is large enough before writing any data.

en · Linux · cna

Vendor advisories explicitly linked to this CVE.

59

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
7.8 / 10
Severity
high
Provider
Linux · cna
Vector string
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Scenarios
en: AV:L - The primary trigger is the local `name_to_handle_at(AT_HANDLE_CONNECTABLE)` syscall on a mounted btrfs filesystem, where the caller fully controls the destination buffer size. The nfsd path can also reach the encoder remotely, but only with the non-default `subtree_check` export option, so local is the representative vector. AC:L - An unprivileged attacker deterministically controls every element they can influence — the btrfs mount, the target inode, the `AT_HANDLE_CONNECTABLE` flag, and the undersized `handle_bytes` value (8-9 dwords) that makes the 40-byte write overflow — with no race or memory-layout grooming required. PR:L - `name_to_handle_at()` requires no capability (unlike `open_by_handle_at()`, which needs CAP_DAC_READ_SEARCH), so any local unprivileged user with read access to a btrfs mount can invoke the vulnerable encoder. Creating btrfs subvolumes is likewise permitted to unprivileged users with write access to the parent directory. UI:N - The attacker triggers the overflow entirely through their own syscall on an already-mounted filesystem; no victim action, no crafted image mount, and no administrator involvement is needed. S:U - The out-of-bounds write corrupts kernel heap memory within the same kernel security authority, with no crossing of a VM, IOMMU, or sandbox boundary. C:H - An 8-byte heap out-of-bounds write is a memory-corruption primitive that can be leveraged to overwrite adjacent kernel objects (e.g. length or pointer fields) and thereby obtain arbitrary kernel-memory disclosure. I:H - This is a direct out-of-bounds write of a 64-bit value (`parent_root_objectid`) past the end of a kernel allocation, and per CVSS kernel guidance an OOB write is rated High for integrity due to its potential for control-flow hijacking. A:H - Corrupting adjacent kernel heap metadata or object state leads to oops, BUG, or panic, and the write is detectable/fatal under KASAN or hardened allocators, causing a full denial of service.

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
Linux Linux be6e8dc0ba84029997075a1ec77b4ddb863cbe15 to < 60de2f55d2aca53e81b4ef2a67d7cc9e1eb677db (affected · git)be6e8dc0ba84029997075a1ec77b4ddb863cbe15 to < 742b44342204e5dfe3926433823623c1a0c581df (affected · git)be6e8dc0ba84029997075a1ec77b4ddb863cbe15 to < d3a9a8e1275eb9b87f006b5562a287aea3f6885f (affected · git)be6e8dc0ba84029997075a1ec77b4ddb863cbe15 to < d91f6626133698362bba08fbc04bd72c466806d3 (affected · git)be6e8dc0ba84029997075a1ec77b4ddb863cbe15 to < 0276c8582488022f057b4cec21975a5edf079f47 (affected · git)be6e8dc0ba84029997075a1ec77b4ddb863cbe15 to < 361d67276eb8ec6be8f27f4ad6c6090459438fee (affected · git)be6e8dc0ba84029997075a1ec77b4ddb863cbe15 to < 43143776b0a7604d873d1a6f3e552a00aa930224 (affected · git)be6e8dc0ba84029997075a1ec77b4ddb863cbe15 to < dff4f9ff5d7f289e4545cc936362e01ed3252742 (affected · git)Default: unaffected Linux · cna
Linux Linux 2.6.29 (affected)0 to < 2.6.29 (unaffected · semver)5.4.301 through 5.4.* (unaffected · semver)5.10.246 through 5.10.* (unaffected · semver)5.15.195 through 5.15.* (unaffected · semver)6.1.157 through 6.1.* (unaffected · semver)6.6.113 through 6.6.* (unaffected · semver)6.12.54 through 6.12.* (unaffected · semver)6.17.4 through 6.17.* (unaffected · semver)6.18 and later (unaffected · original_commit_for_fix)Default: affected Linux · cna

Weaknesses

0

No weakness assertions.

References

8

Provider assertions

2

Linux · cna

btrfs: avoid potential out-of-bounds in btrfs_encode_fh()

CISA-ADP · adp

CISA ADP Vulnrichment

Provenance

Schema
5.2
Searchable
yes
Content hash
564ebe6405d879ab96cf51821a773ec4d7cbc57919945e7c3b1e5039a16df1f0
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