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

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/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.12%, higher than 2% of CVEs (2026-12-01)
- Published: 2026-09-25T10:36:09.014Z
- Modified: 2026-10-22T15:18:03.967Z
- Weaknesses: CWE-401
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from e22bae30667a7e74ed057e00fb6e8c79e0738de3 before 60a9aaac07f6470b252c4de40e7d8a6e25004093; from e22bae30667a7e74ed057e00fb6e8c79e0738de3 before 58e3d2fbc8c914ed3dce2f7d915b3c4f4a3c76fb; from e22bae30667a7e74ed057e00fb6e8c79e0738de3 before 040146f81d099006a354b0caacc7f01ca00f257e; from e22bae30667a7e74ed057e00fb6e8c79e0738de3 before 06a7073b33b8f5cb0ee71e07dc669efffb1c7d58; from e22bae30667a7e74ed057e00fb6e8c79e0738de3 before 1ccbe8c42009706af79e6629c70d42fc929aef2b; from e22bae30667a7e74ed057e00fb6e8c79e0738de3 before 419d129f970aaa6567dbac366b0c93784bf9ec97; 6.1 (not affected: before 6.1; from 6.1.189 up to 6.1.*; from 6.6.158 up to 6.6.*; from 6.12.111 up to 6.12.*; from 6.18.53 up to 6.18.*; from 7.2.7 up to 7.2.*; from 7.3 up to *)
- linux linux_kernel: from 6.1 before 6.12.111; from 6.13 before 6.18.53; from 6.19 before 7.2.7; 7.3

## References

- <https://git.kernel.org/stable/c/60a9aaac07f6470b252c4de40e7d8a6e25004093> (patch)
- <https://git.kernel.org/stable/c/58e3d2fbc8c914ed3dce2f7d915b3c4f4a3c76fb> (patch)
- <https://git.kernel.org/stable/c/040146f81d099006a354b0caacc7f01ca00f257e> (patch)
- <https://git.kernel.org/stable/c/06a7073b33b8f5cb0ee71e07dc669efffb1c7d58> (patch)
- <https://git.kernel.org/stable/c/1ccbe8c42009706af79e6629c70d42fc929aef2b> (patch)
- <https://git.kernel.org/stable/c/419d129f970aaa6567dbac366b0c93784bf9ec97> (patch)

## Sources

- CVE List: [CVE-2026-98128](https://www.cve.org/CVERecord?id=CVE-2026-98128), CVE Terms of Use, modified 2026-10-19
- NVD: [CVE-2026-98128](https://nvd.nist.gov/vuln/detail/CVE-2026-98128), Public domain, modified 2026-10-22

---

Page: https://cve.day/CVE-2026-98128 · Whole record: https://cve.day/CVE-2026-98128.json · Rebuilt by cve.day 2026-11-25T22:59:41.072Z
