Skip to contentSkip to conversation

CVE-2026-45981: s390/cio: Fix device lifecycle handling in css_alloc_subchannel()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 27

lore
Share & tools
lore
#0 lore raw

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

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

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

s390/cio: Fix device lifecycle handling in css_alloc_subchannel()

css_alloc_subchannel() calls device_initialize() before setting up the DMA masks. If dma_set_coherent_mask() or dma_set_mask() fails, the error path frees the subchannel structure directly, bypassing the device model reference counting.

Once device_initialize() has been called, the embedded struct device must be released via put_device(), allowing the release callback to free the container structure.

Fix the error path by dropping the initial device reference with put_device() instead of calling kfree() directly.

This ensures correct device lifetime handling and avoids potential use-after-free or double-free issues.

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

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

	Issue introduced in 3.10 with commit e5dcf0025d7af58f525590ac86ac27cb44714e8d and fixed in 5.10.252 with commit 2b2ad7ad4a28ffdb9f94e6d979b88a5b12b71681
	Issue introduced in 3.10 with commit e5dcf0025d7af58f525590ac86ac27cb44714e8d and fixed in 5.15.202 with commit b1d4e6fb241672850296956c4d782a69363a3807
	Issue introduced in 3.10 with commit e5dcf0025d7af58f525590ac86ac27cb44714e8d and fixed in 6.1.165 with commit fd295a75d828c11acfcc6869c2a12cdaaf9b7722
	Issue introduced in 3.10 with commit e5dcf0025d7af58f525590ac86ac27cb44714e8d and fixed in 6.6.128 with commit abb6e07f46a740cda4f07d1b561ae4eaa7a1df42
	Issue introduced in 3.10 with commit e5dcf0025d7af58f525590ac86ac27cb44714e8d and fixed in 6.12.75 with commit f96c5ccf95ae5f27218c1ce2d6a3ad2d3e105424
	Issue introduced in 3.10 with commit e5dcf0025d7af58f525590ac86ac27cb44714e8d and fixed in 6.18.14 with commit 6715560527e343a387e4a0d2e6c401748e89fa55
	Issue introduced in 3.10 with commit e5dcf0025d7af58f525590ac86ac27cb44714e8d and fixed in 6.19.4 with commit c35cfbb5341ba05ad1b4476ffc3c21cc3ff8f603
	Issue introduced in 3.10 with commit e5dcf0025d7af58f525590ac86ac27cb44714e8d and fixed in 7.0 with commit f65c75b0b9b5a390bc3beadcde0a6fbc3ad118f7

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-45981

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:

	drivers/s390/cio/css.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/2b2ad7ad4a28ffdb9f94e6d979b88a5b12b71681
	https://git.kernel.org/stable/c/b1d4e6fb241672850296956c4d782a69363a3807
	https://git.kernel.org/stable/c/fd295a75d828c11acfcc6869c2a12cdaaf9b7722
	https://git.kernel.org/stable/c/abb6e07f46a740cda4f07d1b561ae4eaa7a1df42
	https://git.kernel.org/stable/c/f96c5ccf95ae5f27218c1ce2d6a3ad2d3e105424
	https://git.kernel.org/stable/c/6715560527e343a387e4a0d2e6c401748e89fa55
	https://git.kernel.org/stable/c/c35cfbb5341ba05ad1b4476ffc3c21cc3ff8f603
	https://git.kernel.org/stable/c/f65c75b0b9b5a390bc3beadcde0a6fbc3ad118f7