Skip to contentSkip to conversation

CVE-2026-93106: crash_dump: release keyring reference at the correct time

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 17

lore
Share & tools
lore
#0 lore raw

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

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

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

crash_dump: release keyring reference at the correct time

restore_dm_crypt_keys_to_thread_keyring() gets a reference to the user keyring before restoring the saved dm-crypt keys.

The same keyring reference is then passed to add_key_to_keyring() for each saved key, but add_key_to_keyring() drops that reference on every call. This is only balanced when exactly one key is restored. With multiple keys, the keyring reference is dropped too many times and may trigger a refcount underflow or use-after-free.

When more than five keys are restored, a refcount underflow/use-after-free warning can be triggered.

The early error paths after lookup_user_key() also return without dropping the keyring reference.

Keep ownership of the keyring reference in restore_dm_crypt_keys_to_thread_keyring(), drop it once on all exit paths, and make add_key_to_keyring() only use the reference without consuming it.

The Linux kernel CVE team has assigned CVE-2026-93106 to this issue.

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

	Issue introduced in 6.16 with commit 62f17d9df6924cf805de5ae970470615c1c8d9f2 and fixed in 6.18.52 with commit b0f7343a002f9c8b8378011f60482c76f3216dfd
	Issue introduced in 6.16 with commit 62f17d9df6924cf805de5ae970470615c1c8d9f2 and fixed in 7.2.6 with commit ed566979f99c5516cad45a76ae25e2a4928ffb67
	Issue introduced in 6.16 with commit 62f17d9df6924cf805de5ae970470615c1c8d9f2 and fixed in 7.3-rc1 with commit ada2e5a44e99113e08ad9b7b71396c6c572204da

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-2026-93106

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:
kernel/crash_dump_dm_crypt.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/b0f7343a002f9c8b8378011f60482c76f3216dfd
	https://git.kernel.org/stable/c/ed566979f99c5516cad45a76ae25e2a4928ffb67
	https://git.kernel.org/stable/c/ada2e5a44e99113e08ad9b7b71396c6c572204da