# CVE-2026-89586: ata: libata-scsi: fix DSM TRIM for sector sizes larger than 2048 bytes

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 8.2
- **CVSS:** 8.2 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Unchanged; Confidentiality impact: Low; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.63% (percentile 45, 2026-11-26)
- **Published:** 2026-09-11T19:44:51.322Z
- **Modified:** 2026-10-19T09:17:54.783Z

## Who should check

- Anyone running Linux \>= ef2d7392c4ece5c3cd12a6c7ca9366cd8f189aff, \< 07975b8daa3b0ab3cbc02cc48ea7bc48fadcec53; \>= ef2d7392c4ece5c3cd12a6c7ca9366cd8f189aff, \< b7b5ab2df325ffbbad7ca2debaa071e024d68cb5; \>= ef2d7392c4ece5c3cd12a6c7ca9366cd8f189aff, \< 07baa310ea3224a7044b1ca84796bb37a235af1f; \>= ef2d7392c4ece5c3cd12a6c7ca9366cd8f189aff, \< 977554ed91b54075fbc0bac536316b4841ef6258; \>= ef2d7392c4ece5c3cd12a6c7ca9366cd8f189aff, \< 04e2befe25792f2e90097f284d7e86fc6bcfe928; \>= ef2d7392c4ece5c3cd12a6c7ca9366cd8f189aff, \< c2e3dccd6870659851eaa4c12ab16418b8e3040a; \>= ef2d7392c4ece5c3cd12a6c7ca9366cd8f189aff, \< 4a4268a0b0a595bd9534cf9c7fda93775a7d8a0d; \>= ef2d7392c4ece5c3cd12a6c7ca9366cd8f189aff, \< 79cce911e623c0baa0fde307ce3a434e084b881a
- Anyone running Linux 4.9

## Description

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

ata: libata-scsi: fix DSM TRIM for sector sizes larger than 2048 bytes

ata\_scsi\_write\_same\_xlat() translates a SCSI WRITE SAME command with the
UNMAP bit set into an ATA DATA SET MANAGEMENT TRIM command.  The TRIM
descriptor is built by ata\_format\_dsm\_trim\_descr() into the 2048-byte
ata\_scsi\_rbuf staging buffer, and the number of bytes copied is compared
against the logical sector size by the caller:

	size = ata\_format\_dsm\_trim\_descr(scmd, trmax, block, n\_block);
	if (size != len)		/\* len == sdp-\>sector\_size \*/
		goto invalid\_param\_len;

ata\_format\_dsm\_trim\_descr() clamps the copy length to ATA\_SCSI\_RBUF\_SIZE
(2048).  On a device whose logical sector size exceeds that (e.g. a 4Kn
device, where sector\_size == 4096) the function can never return more than
2048, while the caller expects it to return sector\_size.  The comparison
therefore always fails, so every TRIM is rejected with "Parameter list
length error" and WARN\_ON() splats on each attempt.  TRIM / discard is
thus completely broken on such devices.

The descriptor was incorrectly sized from the logical sector size.  A DSM
TRIM payload is a list of 512-byte pages, each holding up to
ATA\_MAX\_TRIM\_RNUM (64) LBA Range Entries, and is independent of the logical
sector size.  The Block Limits VPD page already advertises a single such
page as the maximum WRITE SAME length (65535 \* ATA\_MAX\_TRIM\_RNUM logical
blocks), so the block layer never sends a request that needs more than one
page.

Emit exactly one 512-byte page, independent of the logical sector size,
and transfer only that page (COUNT == 1).  For a 512-byte-sector device
this is unchanged; devices with larger logical sectors now work instead of
failing every TRIM.

## Affected and fixed versions

- Linux: \>= ef2d7392c4ece5c3cd12a6c7ca9366cd8f189aff, \< 07975b8daa3b0ab3cbc02cc48ea7bc48fadcec53; \>= ef2d7392c4ece5c3cd12a6c7ca9366cd8f189aff, \< b7b5ab2df325ffbbad7ca2debaa071e024d68cb5; \>= ef2d7392c4ece5c3cd12a6c7ca9366cd8f189aff, \< 07baa310ea3224a7044b1ca84796bb37a235af1f; \>= ef2d7392c4ece5c3cd12a6c7ca9366cd8f189aff, \< 977554ed91b54075fbc0bac536316b4841ef6258; \>= ef2d7392c4ece5c3cd12a6c7ca9366cd8f189aff, \< 04e2befe25792f2e90097f284d7e86fc6bcfe928; \>= ef2d7392c4ece5c3cd12a6c7ca9366cd8f189aff, \< c2e3dccd6870659851eaa4c12ab16418b8e3040a; \>= ef2d7392c4ece5c3cd12a6c7ca9366cd8f189aff, \< 4a4268a0b0a595bd9534cf9c7fda93775a7d8a0d; \>= ef2d7392c4ece5c3cd12a6c7ca9366cd8f189aff, \< 79cce911e623c0baa0fde307ce3a434e084b881a (cvelist)
- Linux: 4.9 (cvelist)

## Mitigation

- Upgrade Linux to 79cce911e623c0baa0fde307ce3a434e084b881a or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-89586. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-89586.md
Affected: Linux >= ef2d7392c4ece5c3cd12a6c7ca9366cd8f189aff, < 07975b8daa3b0ab3cbc02cc48ea7bc48fadcec53; >= ef2d7392c4ece5c3cd12a6c7ca9366cd8f189aff, < b7b5ab2df325ffbbad7ca2debaa071e024d68cb5; >= ef2d7392c4ece5c3cd12a6c7ca9366cd8f189aff, < 07baa310ea3224a7044b1ca84796bb37a235af1f; >= ef2d7392c4ece5c3cd12a6c…
Fixed in: Linux 07975b8daa3b0ab3cbc02cc48ea7bc48fadcec53, Linux 07baa310ea3224a7044b1ca84796bb37a235af1f, Linux 977554ed91b54075fbc0bac536316b4841ef6258, Linux 04e2befe25792f2e90097f284d7e86fc6bcfe928, Linux 4a4268a0b0a595bd9534cf9c7fda93775a7d8a0d, Linux 79cce911e623c0baa0fde307ce3a434e084b881a

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-89586 being exploited?

There is no confirmed exploitation: CVE-2026-89586 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.63% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2026-89586?

High: CVSS 8.2 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2026-89586?

Linux \>= ef2d7392c4ece5c3cd12a6c7ca9366cd8f189aff, \< 07975b8daa3b0ab3cbc02cc48ea7bc48fadcec53; \>= ef2d7392c4ece5c3cd12a6c7ca9366cd8f189aff, \< b7b5ab2df325ffbbad7ca2debaa071e024d68cb5; \>= ef2d7392c4ece5c3cd12a6c7ca9366cd8f189aff, \< 07baa310ea3224a7044b1ca84796bb37a235af1f; \>= ef2d7392c4ece5c3cd12a6c7ca9366cd8f189aff, \< 977554ed91b54075fbc0bac536316b4841ef6258; \>= ef2d7392c4ece5c3cd12a6c7ca9366cd8f189aff, \< 04e2befe25792f2e90097f284d7e86fc6bcfe928; \>= ef2d7392c4ece5c3cd12a6c7ca9366cd8f189aff, \< c2e3dccd6870659851eaa4c12ab16418b8e3040a; \>= ef2d7392c4ece5c3cd12a6c7ca9366cd8f189aff, \< 4a4268a0b0a595bd9534cf9c7fda93775a7d8a0d; \>= ef2d7392c4ece5c3cd12a6c7ca9366cd8f189aff, \< 79cce911e623c0baa0fde307ce3a434e084b881a; Linux 4.9.

### Is there a fix for CVE-2026-89586?

Yes. Fixed in Linux 07975b8daa3b0ab3cbc02cc48ea7bc48fadcec53, Linux 07baa310ea3224a7044b1ca84796bb37a235af1f, Linux 977554ed91b54075fbc0bac536316b4841ef6258, Linux 04e2befe25792f2e90097f284d7e86fc6bcfe928, Linux 4a4268a0b0a595bd9534cf9c7fda93775a7d8a0d, Linux 79cce911e623c0baa0fde307ce3a434e084b881a. Upgrade Linux to 79cce911e623c0baa0fde307ce3a434e084b881a or later.

### How do I check if I'm affected by CVE-2026-89586?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/07975b8daa3b0ab3cbc02cc48ea7bc48fadcec53>
- other: <https://git.kernel.org/stable/c/b7b5ab2df325ffbbad7ca2debaa071e024d68cb5>
- other: <https://git.kernel.org/stable/c/07baa310ea3224a7044b1ca84796bb37a235af1f>
- other: <https://git.kernel.org/stable/c/977554ed91b54075fbc0bac536316b4841ef6258>
- other: <https://git.kernel.org/stable/c/04e2befe25792f2e90097f284d7e86fc6bcfe928>
- other: <https://git.kernel.org/stable/c/c2e3dccd6870659851eaa4c12ab16418b8e3040a>
- other: <https://git.kernel.org/stable/c/4a4268a0b0a595bd9534cf9c7fda93775a7d8a0d>
- other: <https://git.kernel.org/stable/c/79cce911e623c0baa0fde307ce3a434e084b881a>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-89586>

HTML: <https://flawdb.com/CVE-2026-89586> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-89586>
