Skip to contentSkip to conversation

CVE-2025-68724: crypto: asymmetric_keys - prevent overflow in asymmetric_key_generate_id

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Dec 24, 2025

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

crypto: asymmetric_keys - prevent overflow in asymmetric_key_generate_id

Use check_add_overflow() to guard against potential integer overflows when adding the binary blob lengths and the size of an asymmetric_key_id structure and return ERR_PTR(-EOVERFLOW) accordingly. This prevents a possible buffer overflow when copying data from potentially malicious X.509 certificate fields that can be arbitrarily large, such as ASN.1 INTEGER serial numbers, issuer names, etc.

The Linux kernel CVE team has assigned CVE-2025-68724 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 3.18 with commit 7901c1a8effbe5f89673bfc09d6e37b8f334f1a7 and fixed in 6.12.63 with commit c73be4f51eed98fa0c7c189db8f279e1c86bfbf7
	Issue introduced in 3.18 with commit 7901c1a8effbe5f89673bfc09d6e37b8f334f1a7 and fixed in 6.17.13 with commit 6af753ac5205115e6c310c8c4236c01b59a1c44f
	Issue introduced in 3.18 with commit 7901c1a8effbe5f89673bfc09d6e37b8f334f1a7 and fixed in 6.18.2 with commit b7090a5c153105b9fd221a5a81459ee8cd5babd6
	Issue introduced in 3.18 with commit 7901c1a8effbe5f89673bfc09d6e37b8f334f1a7 and fixed in 6.19-rc1 with commit df0845cf447ae1556c3440b8b155de0926cbaa56

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2025-68724

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
crypto/asymmetric_keys/asymmetric_type.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/c73be4f51eed98fa0c7c189db8f279e1c86bfbf7
	https://git.kernel.org/stable/c/6af753ac5205115e6c310c8c4236c01b59a1c44f
	https://git.kernel.org/stable/c/b7090a5c153105b9fd221a5a81459ee8cd5babd6
	https://git.kernel.org/stable/c/df0845cf447ae1556c3440b8b155de0926cbaa56