# CVE-2023-54325: crypto: qat - fix out-of-bounds read

- Severity: High 7.1 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.15%, higher than 4% of CVEs (2026-12-01)
- Published: 2025-12-30T12:37:09.015Z
- Modified: 2026-08-05T09:19:16.226Z
- Assigned by: Linux

## Description

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

crypto: qat - fix out-of-bounds read

When preparing an AER-CTR request, the driver copies the key provided by
the user into a data structure that is accessible by the firmware.
If the target device is QAT GEN4, the key size is rounded up by 16 since
a rounded up size is expected by the device.
If the key size is rounded up before the copy, the size used for copying
the key might be bigger than the size of the region containing the key,
causing an out-of-bounds read.

Fix by doing the copy first and then update the keylen.

This is to fix the following warning reported by KASAN:

	[  138.150574] BUG: KASAN: global-out-of-bounds in qat_alg_skcipher_init_com.isra.0+0x197/0x250 [intel_qat]
	[  138.150641] Read of size 32 at addr ffffffff88c402c0 by task cryptomgr_test/2340

	[  138.150651] CPU: 15 PID: 2340 Comm: cryptomgr_test Not tainted 6.2.0-rc1+ #45
	[  138.150659] Hardware name: Intel Corporation ArcherCity/ArcherCity, BIOS EGSDCRB1.86B.0087.D13.2208261706 08/26/2022
	[  138.150663] Call Trace:
	[  138.150668]  <TASK>
	[  138.150922]  kasan_check_range+0x13a/0x1c0
	[  138.150931]  memcpy+0x1f/0x60
	[  138.150940]  qat_alg_skcipher_init_com.isra.0+0x197/0x250 [intel_qat]
	[  138.151006]  qat_alg_skcipher_init_sessions+0xc1/0x240 [intel_qat]
	[  138.151073]  crypto_skcipher_setkey+0x82/0x160
	[  138.151085]  ? prepare_keybuf+0xa2/0xd0
	[  138.151095]  test_skcipher_vec_cfg+0x2b8/0x800

(As written by CVE List.)

## Affected

- Linux Linux: from 67916c9516893528ecce060ada1f58af0ce33d93 before 7697139d5dfd491f4c495a914a1dd68f6e827a0f; from 67916c9516893528ecce060ada1f58af0ce33d93 before dc3809f390357c8992f0a23083da934a20fef9af; from 67916c9516893528ecce060ada1f58af0ce33d93 before 2b1501f058245573a3aa6bf234d205dde1196184; from 67916c9516893528ecce060ada1f58af0ce33d93 before f6044cc3030e139f60c281386f28bda6e3049d66; 5.11 (not affected: before 5.11; from 5.15.99 up to 5.15.*; from 6.1.16 up to 6.1.*; from 6.2.3 up to 6.2.*; from 6.3 up to *)

## References

- <https://git.kernel.org/stable/c/7697139d5dfd491f4c495a914a1dd68f6e827a0f>
- <https://git.kernel.org/stable/c/dc3809f390357c8992f0a23083da934a20fef9af>
- <https://git.kernel.org/stable/c/2b1501f058245573a3aa6bf234d205dde1196184>
- <https://git.kernel.org/stable/c/f6044cc3030e139f60c281386f28bda6e3049d66>

## Sources

- CVE List: [CVE-2023-54325](https://www.cve.org/CVERecord?id=CVE-2023-54325), CVE Terms of Use, modified 2026-08-05
- NVD: [CVE-2023-54325](https://nvd.nist.gov/vuln/detail/CVE-2023-54325), Public domain, modified 2026-08-04

---

Page: https://cve.day/CVE-2023-54325 · Whole record: https://cve.day/CVE-2023-54325.json · Rebuilt by cve.day 2026-11-25T22:58:35.276Z
