CVE-2023-53810

Source
https://cve.org/CVERecord?id=CVE-2023-53810
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-53810.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2023-53810
Downstream
Published
2025-12-09T00:01:08.062Z
Modified
2026-03-11T05:06:44.608708Z
Summary
blk-mq: release crypto keyslot before reporting I/O complete
Details

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

blk-mq: release crypto keyslot before reporting I/O complete

Once all I/O using a blkcryptokey has completed, filesystems can call blkcryptoevictkey(). However, the block layer currently doesn't call blkcryptoputkeyslot() until the request is being freed, which happens after upper layers have been told (via bioendio()) the I/O has completed. This causes a race condition where blkcryptoevictkey() can see 'slot_refs != 0' without there being an actual bug.

This makes _blkcryptoevictkey() hit the 'WARNONONCE(atomicread(&slot->slotrefs) != 0)' and return without doing anything, eventually causing a use-after-free in blkcryptoreprogramallkeys(). (This is a very rare bug and has only been seen when per-file keys are being used with fscrypt.)

There are two options to fix this: either release the keyslot before bio_endio() is called on the request's last bio, or make __blkcryptoevictkey() ignore slotrefs. Let's go with the first solution, since it preserves the ability to report bugs (via WARNONONCE) where a key is evicted while still in-use.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/53xxx/CVE-2023-53810.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
a892c8d52c02284076fbbacae6692aa5c5807d11
Fixed
874bdf43b4a7dc5463c31508f62b3e42eb237b08
Fixed
d206f79d9cd658665b37ce8134c6ec849ac7af0c
Fixed
7d206ec7a04e8545828191b6ea8b49d3ea61391f
Fixed
b278570e2c59d538216f8b656e97680188a8fba4
Fixed
92d5d233b9ff531cf9cc36ab4251779e07adb633
Fixed
9cd1e566676bbcb8a126acd921e4e194e6339603

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-53810.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.8.0
Fixed
5.10.180
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.111
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.28
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.2.15
Type
ECOSYSTEM
Events
Introduced
6.3.0
Fixed
6.3.2

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2023-53810.json"