Security Vulnerability Report
中文
CVE-2026-31719 CVSS 7.5 HIGH

CVE-2026-31719

Published: 2026-05-01 14:16:22
Last Modified: 2026-05-06 20:59:16
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67

Description

In the Linux kernel, the following vulnerability has been resolved: crypto: krb5enc - fix async decrypt skipping hash verification krb5enc_dispatch_decrypt() sets req->base.complete as the skcipher callback, which is the caller's own completion handler. When the skcipher completes asynchronously, this signals "done" to the caller without executing krb5enc_dispatch_decrypt_hash(), completely bypassing the integrity verification (hash check). Compare with the encrypt path which correctly uses krb5enc_encrypt_done as an intermediate callback to chain into the hash computation on async completion. Fix by adding krb5enc_decrypt_done as an intermediate callback that chains into krb5enc_dispatch_decrypt_hash() upon async skcipher completion, matching the encrypt path's callback pattern. Also fix EBUSY/EINPROGRESS handling throughout: remove krb5enc_request_complete() which incorrectly swallowed EINPROGRESS notifications that must be passed up to callers waiting on backlogged requests, and add missing EBUSY checks in krb5enc_encrypt_ahash_done for the dispatch_encrypt return value. Unset MAY_BACKLOG on the async completion path so the user won't see back-to-back EINPROGRESS notifications.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Configurations (Affected Products)

cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* - VULNERABLE
cpe:2.3:o:linux:linux_kernel:7.1:rc1:*:*:*:*:*:* - VULNERABLE
Linux Kernel (Versions prior to fix commits 07cbb1bd4243, 3bfbf5f0a99c, e51f42114abb)

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
/* * Conceptual PoC for CVE-2026-31719 * Demonstrating the missing callback chain in the vulnerable decrypt path. * This code is illustrative of the kernel logic flaw. */ #include <linux/crypto.h> #include <linux/kernel.h> // Simulated structure of the request struct krb5enc_request { struct crypto_async_request base; struct skcipher_request *skreq; // ... other fields }; // The function that performs the hash verification void krb5enc_dispatch_decrypt_hash(struct krb5enc_request *req) { // Integrity check logic (HMAC verification) happens here printk(KERN_DEBUG "Verifying hash..."); } // VULNERABLE FUNCTION LOGIC static int vulnerable_krb5enc_dispatch_decrypt(struct krb5enc_request *req) { int ret; // ... // Prepare the skcipher request // BUG: The completion callback is set directly to the caller's handler. // When skcipher completes asynchronously, it calls 'req->base.complete', // skipping 'krb5enc_dispatch_decrypt_hash' entirely. req->base.complete = caller_completion_handler; ret = crypto_skcipher_decrypt(req->skreq); // If the operation is in progress (async), the function returns here. // The hash verification is NEVER called for async completions. if (ret == -EINPROGRESS || ret == -EBUSY) return ret; // Only reached if operation was synchronous krb5enc_dispatch_decrypt_hash(req); return ret; } // EXPLOIT SCENARIO: // An attacker sends a packet that triggers the async path (e.g., large data). // The kernel returns -EINPROGRESS, completes decryption in hardware/softirq, // calls 'caller_completion_handler', and the application uses the data // without 'krb5enc_dispatch_decrypt_hash' ever verifying the integrity.

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-31719", "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "published": "2026-05-01T14:16:22.077", "lastModified": "2026-05-06T20:59:16.007", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ncrypto: krb5enc - fix async decrypt skipping hash verification\n\nkrb5enc_dispatch_decrypt() sets req->base.complete as the skcipher\ncallback, which is the caller's own completion handler. When the\nskcipher completes asynchronously, this signals \"done\" to the caller\nwithout executing krb5enc_dispatch_decrypt_hash(), completely bypassing\nthe integrity verification (hash check).\n\nCompare with the encrypt path which correctly uses\nkrb5enc_encrypt_done as an intermediate callback to chain into the\nhash computation on async completion.\n\nFix by adding krb5enc_decrypt_done as an intermediate callback that\nchains into krb5enc_dispatch_decrypt_hash() upon async skcipher\ncompletion, matching the encrypt path's callback pattern.\n\nAlso fix EBUSY/EINPROGRESS handling throughout: remove\nkrb5enc_request_complete() which incorrectly swallowed EINPROGRESS\nnotifications that must be passed up to callers waiting on backlogged\nrequests, and add missing EBUSY checks in krb5enc_encrypt_ahash_done\nfor the dispatch_encrypt return value.\n\n\nUnset MAY_BACKLOG on the async completion path so the user won't\nsee back-to-back EINPROGRESS notifications."}], "metrics": {"cvssMetricV31": [{"source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "NVD-CWE-noinfo"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.15", "versionEndExcluding": "6.18.25", "matchCriteriaId": "F2D3B79E-3EFA-4203-9F11-FF77FD2FBA79"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "6.19", "versionEndExcluding": "7.0.2", "matchCriteriaId": "1BD58F1E-7C20-4C0D-92A2-FAC5CBFBE8A8"}, {"vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:7.1:rc1:*:*:*:*:*:*", "matchCriteriaId": "B1EF7059-E670-45F4-B422-54C40FA86390"}]}]}], "references": [{"url": "https://git.kernel.org/stable/c/07cbb1bd424370671814a862913c99a6e1441588", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/3bfbf5f0a99c991769ec562721285df7ab69240b", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}, {"url": "https://git.kernel.org/stable/c/e51f42114abbdf47f29dda43e7826be28907fcd2", "source": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "tags": ["Patch"]}]}}