CVE-2026-68147: fscrypt: Avoid dynamic allocation in fscrypt_get_devices()

Published Aug 10, 2026
·
Updated

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

fscrypt: Avoid dynamic allocation in fscryptgetdevices()

When a blkcryptokey starts being used or is evicted, fs/crypto/ calls fscryptgetdevices() to get the filesystem's list of block devices, then iterates over them and calls blkcryptoconfigsupported(), blkcryptostartusingkey(), or blkcryptoevictkey() 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 fscryptdestroyinlinecryptkey() call site when it's invoked for inode eviction under direct reclaim.

- fscryptdestroyinlinecryptkey() doesn't handle the failure. It just zeroizes and frees the blkcryptokey without calling blkcryptoevictkey(). 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.)

Affected Software

1 affected component
Linux Kernel

Event History

Aug 10, 2026
CVE Published
via MITRE·11:59 AM
Data Sourced
via MITRE·11:59 AM
Description
Data Sourced
via NVD·01:20 PM
Description
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2026-68147?

The severity of CVE-2026-68147 is rated at 37.

2

How do I fix CVE-2026-68147?

To fix CVE-2026-68147, ensure that your Linux kernel version is updated to include the patch addressing this vulnerability.

3

What are the potential impacts of CVE-2026-68147?

CVE-2026-68147 can lead to use-after-free vulnerabilities, potentially allowing attackers to execute arbitrary code.

4

Is CVE-2026-68147 specific to certain Linux kernel versions?

Yes, CVE-2026-68147 affects specific versions of the Linux kernel where dynamic allocation in fscrypt_get_devices() has been addressed.

5

What components are affected by CVE-2026-68147?

CVE-2026-68147 affects the fscrypt module in the Linux kernel that manages filesystem encryption.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203