CVE-2026-68147
fscrypt: Avoid dynamic allocation in fscrypt_get_devices()
Check your servers for CVE-2026-68147
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-68147 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.)
Severity (CVSS)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- local: the attacker needs local access, or a user has to open a prepared file
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.14%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 3.17% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 22e9947a4b2ba255888541bd0111cf00b9b16586, before bab016bb80d74a9d1f7d4121a7fc1cb529b470e0 affected from 22e9947a4b2ba255888541bd0111cf00b9b16586, before 4462ac3d90e897dda52ce4b6af2d526ddae835a8 affected from 22e9947a4b2ba255888541bd0111cf00b9b16586, before 97a688563be71ec6fefc071aff69a66c69dbe244 affected from 22e9947a4b2ba255888541bd0111cf00b9b16586, before 81ea8e8221853950c47dac7164f27c63a96f8f86 affected from 22e9947a4b2ba255888541bd0111cf00b9b16586, before bc2d630296e0e049210ec05ff08459a6893ae749 affected from 22e9947a4b2ba255888541bd0111cf00b9b16586, before 6fe4e4b8259e1330945b5f3c9476e08473b8e0e8
Other versions: unaffected
|
| Linux |
affected 6.1 unaffected before 6.1 unaffected from 6.1.183 up to and including 6.1.* unaffected from 6.6.148 up to and including 6.6.* unaffected from 6.12.101 up to and including 6.12.* unaffected from 6.18.42 up to and including 6.18.* unaffected from 7.1.6 up to and including 7.1.* unaffected 7.2 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-68147 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-68147
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-68147
trivy image --scanners vuln IMAGE | grep CVE-2026-68147
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/bab016bb80d74a9d1f7d4121a7fc1cb529b470e0 git.kernel.org
- https://git.kernel.org/stable/c/4462ac3d90e897dda52ce4b6af2d526ddae835a8 git.kernel.org
- https://git.kernel.org/stable/c/97a688563be71ec6fefc071aff69a66c69dbe244 git.kernel.org
- https://git.kernel.org/stable/c/81ea8e8221853950c47dac7164f27c63a96f8f86 git.kernel.org
- https://git.kernel.org/stable/c/bc2d630296e0e049210ec05ff08459a6893ae749 git.kernel.org
- https://git.kernel.org/stable/c/6fe4e4b8259e1330945b5f3c9476e08473b8e0e8 git.kernel.org
Source: the record CVE-2026-68147 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse