Description
In the Linux kernel, the following vulnerability has been resolved:

fscrypt: Avoid dynamic allocation in fscrypt_get_devices()

When a blk_crypto_key starts being used or is evicted, fs/crypto/ calls
fscrypt_get_devices() to get the filesystem's list of block devices,
then iterates over them and calls blk_crypto_config_supported(),
blk_crypto_start_using_key(), or blk_crypto_evict_key() on each one.

Currently, the block device pointers are placed in a dynamically
allocated array. This dynamic allocation is problematic because:

- It can fail, especially at the fscrypt_destroy_inline_crypt_key() call
site when it's invoked for inode eviction under direct reclaim.

- fscrypt_destroy_inline_crypt_key() doesn't handle the failure. It
just zeroizes and frees the blk_crypto_key without calling
blk_crypto_evict_key(). That causes a use-after-free.

For now, let's fix this in the straightforward and easily-backportable
way by switching to an on-stack array. Currently the fscrypt
multi-device functionality is used only by f2fs, which has a hardcoded
limit of 8 block devices. An on-stack array works fine for that.

(Of course, this solution won't scale up to large number of block
devices. For that we'd need a different solution, like moving the block
device iteration into the filesystem. Or in the case of btrfs, which
will only support blk-crypto-fallback, we should make it just call
blk-crypto-fallback directly, so the block devices won't be needed.)
Published: 2026-08-10
Score: 7.8 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The Linux kernel’s fscrypt subsystem has a flaw. When a block‑crypt key begins use or is evicted, the routine fscrypt_get_devices() builds a list of block device pointers in a dynamically allocated array. If the allocation fails, the code continues and later the inline key is destroyed without calling blk_crypto_evict_key(). The missing eviction leads to a dangling pointer that can be freed or referenced, resulting in a use‑after‑free that corrupts kernel memory. This weakness is characterized by CWE‑825.

Affected Systems

Any Linux kernel image that has not yet incorporated the commit that replaces the heap allocation with an on‑stack array is affected. The multi‑device feature is currently exercised only by the f2fs filesystem, which has a hard‑coded limit of eight block devices. Therefore platforms running a pre‑patch kernel with f2fs mounted are the primary exposure. Other filesystems do not use this path today, but the mechanism could be leveraged by future kernels that enable additional block‑crypto‑device support.

Risk and Exploitability

The CVSS score of 7.8 indicates high severity. However, the EPSS score of <1% suggests that exploitation is unlikely in the wild, and the vulnerability is not listed in the CISA KEV catalog. Exploitation requires local kernel access that can trigger the key‑eviction path. Based on the description, it is inferred that a locally privileged user who can force inline key destruction could trigger the use‑after‑free, potentially leading to kernel memory corruption, a crash, or, in a worst‑case scenario, privilege escalation.

Generated by OpenCVE AI on August 14, 2026 at 03:22 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update the kernel to a version that includes the fscrypt_get_devices patch that eliminates the dynamic allocation.
  • Reboot the system to load the updated kernel.
  • If f2fs is not needed, unmount it or convert the filesystem to a different type, and monitor kernel logs for any evidence of memory corruption or panics.

Generated by OpenCVE AI on August 14, 2026 at 03:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DLA Debian DLA DLA-4745-1 linux-6.12 security update
History

Wed, 19 Aug 2026 16:45:00 +0000


Fri, 14 Aug 2026 02:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Thu, 13 Aug 2026 22:45:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 7.0, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H'}

cvssV3_1

{'score': 7.8, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}


Wed, 12 Aug 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-825
References
Metrics threat_severity

None

cvssV3_1

{'score': 7.0, 'vector': 'CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H'}

threat_severity

Important


Mon, 10 Aug 2026 14:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-416

Mon, 10 Aug 2026 12:30:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: fscrypt: Avoid dynamic allocation in fscrypt_get_devices() When a blk_crypto_key starts being used or is evicted, fs/crypto/ calls fscrypt_get_devices() to get the filesystem's list of block devices, then iterates over them and calls blk_crypto_config_supported(), blk_crypto_start_using_key(), or blk_crypto_evict_key() on each one. Currently, the block device pointers are placed in a dynamically allocated array. This dynamic allocation is problematic because: - It can fail, especially at the fscrypt_destroy_inline_crypt_key() call site when it's invoked for inode eviction under direct reclaim. - fscrypt_destroy_inline_crypt_key() doesn't handle the failure. It just zeroizes and frees the blk_crypto_key without calling blk_crypto_evict_key(). That causes a use-after-free. For now, let's fix this in the straightforward and easily-backportable way by switching to an on-stack array. Currently the fscrypt multi-device functionality is used only by f2fs, which has a hardcoded limit of 8 block devices. An on-stack array works fine for that. (Of course, this solution won't scale up to large number of block devices. For that we'd need a different solution, like moving the block device iteration into the filesystem. Or in the case of btrfs, which will only support blk-crypto-fallback, we should make it just call blk-crypto-fallback directly, so the block devices won't be needed.)
Title fscrypt: Avoid dynamic allocation in fscrypt_get_devices()
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-08-19T16:30:11.166Z

Reserved: 2026-07-30T09:28:09.371Z

Link: CVE-2026-68147

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-10T13:20:00.597

Modified: 2026-08-19T17:20:31.923

Link: CVE-2026-68147

cve-icon Redhat

Severity : Important

Publid Date: 2026-08-10T00:00:00Z

Links: CVE-2026-68147 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-14T03:30:03Z

Weaknesses
  • CWE-825

    Expired Pointer Dereference