Skip to contentSkip to conversation

CVE-2026-98128: scsi: mpi3mr: Fix target device refcount leak in mpi3mr_sas_port_add()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Sep 25

lore
Share & tools
lore
#0 lore raw

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

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

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

scsi: mpi3mr: Fix target device refcount leak in mpi3mr_sas_port_add()

mpi3mr_get_tgtdev_by_addr() increments the target device kref when it returns a device. If a subsequent error triggers a goto out_fail after the tgtdev reference is acquired, the reference is never released because the out_fail path does not call mpi3mr_tgtdev_put(). This prevents the target device structure from ever being freed.

Add a tgtdev put in the out_fail path, guarded by a NULL check since tgtdev is only acquired for SAS_END_DEVICE types and the same cleanup path is shared by earlier error cases where tgtdev is still NULL.

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

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

	Issue introduced in 6.1 with commit e22bae30667a7e74ed057e00fb6e8c79e0738de3 and fixed in 6.12.111 with commit 040146f81d099006a354b0caacc7f01ca00f257e
	Issue introduced in 6.1 with commit e22bae30667a7e74ed057e00fb6e8c79e0738de3 and fixed in 6.18.53 with commit 06a7073b33b8f5cb0ee71e07dc669efffb1c7d58
	Issue introduced in 6.1 with commit e22bae30667a7e74ed057e00fb6e8c79e0738de3 and fixed in 7.2.7 with commit 1ccbe8c42009706af79e6629c70d42fc929aef2b
	Issue introduced in 6.1 with commit e22bae30667a7e74ed057e00fb6e8c79e0738de3 and fixed in 7.3-rc2 with commit 419d129f970aaa6567dbac366b0c93784bf9ec97

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

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/scsi/mpi3mr/mpi3mr_transport.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/040146f81d099006a354b0caacc7f01ca00f257e
	https://git.kernel.org/stable/c/06a7073b33b8f5cb0ee71e07dc669efffb1c7d58
	https://git.kernel.org/stable/c/1ccbe8c42009706af79e6629c70d42fc929aef2b
	https://git.kernel.org/stable/c/419d129f970aaa6567dbac366b0c93784bf9ec97