CVE-2026-89607: ecryptfs: reject oversized encrypted_key_size in parse_tag_3_packet

Published Sep 11, 2026
·
Updated

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

ecryptfs: reject oversized encryptedkeysize in parsetag3packet

parsetag3packet() set encryptedkeysize from the Tag 3 packet body without bounding it against ECRYPTFSMAXKEYBYTES (64). When encryptedkeysize > 64, decryptpassphraseencryptedsessionkey() sets decryptedkeysize = encryptedkeysize and performs two out-of-bounds writes:

1. cryptoskcipherdecrypt() writes encryptedkeysize bytes into decryptedkey[64] via scatterlist, overflowing into the parent ecryptfsauthtok struct. 2. memcpy(cryptstat->key, decryptedkey, decryptedkeysize) writes into cryptstat->key[64], corrupting rootiv, keysiglist, and mutexes in ecryptfscryptstat.

Only AES-192 (cipher code 0x08) enables this because it sets cryptstat->keysize = 24 independently of encryptedkeysize, allowing cryptoskciphersetkey() to succeed while encryptedkeysize exceeds ECRYPTFSMAXKEYBYTES.

The PKI decryption path (parsetag65packet) already validates decryptedkeysize <= ECRYPTFSMAXKEYBYTES; the passphrase path omits this check.

Bound encryptedkeysize against ECRYPTFSMAXKEYBYTES (64) rather than ECRYPTFSMAXENCRYPTEDKEYBYTES (512). The 64-byte limit also protects the 512-byte encryptedkey[] buffer, so the former 512-byte check is removed as redundant.

[tyhicks: Adjust the code comment to refer to macros representing the buffer sizes rather than mentioning the buffer size values since they may change in the future]

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Configuration

    Update ecryptfs to reject oversized encrypted_key_size in parse_tag_3_packet() for the ecryptfs_auth_tok struct so encrypted_key_size is bounded by ECRYPTFS_MAX_KEY_BYTES (64) before decryption. Specifically, add/restore the check that prevents decrypted_key_size (set from encrypted_key_size) from exceeding 64 bytes.

    Linux kernel ecryptfs encrypted_key_size validation in parse_tag_3_packet (parse_tag_3_packet/ecryptfs_auth_tok) = Reject oversized encrypted_key_size that would exceed ECRYPTFS_MAX_KEY_BYTES (64)

Event History

Sep 11, 2026
CVE Published
via MITRE·07:45 PM
Data Sourced
via MITRE·07:45 PM
Description

Frequently Asked Questions

1

What conditions are required to trigger the out-of-bounds writes?

An attacker needs to supply a Tag 3 packet through the eCryptfs passphrase decryption path with an encrypted_key_size greater than 64. Exploitation additionally depends on selecting AES-192 (cipher code 0x08), because its 24-byte key size allows key setup to succeed despite the oversized encrypted key field.

2

Which eCryptfs key-handling path is affected?

The affected path is passphrase-encrypted session-key handling in parse_tag_3_packet() and decrypt_passphrase_encrypted_session_key(). The PKI decryption path handling Tag 65 packets already checks that the decrypted key size does not exceed 64 bytes.

3

What memory can be corrupted if the issue is triggered?

Decryption can overflow the 64-byte decrypted_key buffer into its parent ecryptfs_auth_tok structure. A subsequent copy can overflow crypt_stat->key and corrupt root_iv, keysig_list, and mutexes in ecryptfs_crypt_stat.

4

What mitigation is available if the fix cannot be applied immediately?

The provided data identifies the triggering condition as oversized Tag 3 encrypted_key_size values used with AES-192. Avoiding processing of untrusted or malformed passphrase-encrypted Tag 3 packets, particularly those selecting cipher code 0x08, reduces exposure until the size validation fix is deployed.

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