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.
Published: 2026-09-11
Score: 8.2 High
EPSS: < 1% Very Low
KEV: No
Impact: TRIM / Discard Functionality Loss
Action: Upgrade Kernel
AI Analysis

Impact

A bounds‑check bug in the libata‑scsi implementation caused the kernel to truncate the DATA SET MANAGEMENT (DSM) TRIM descriptor to 2048 bytes, regardless of the logical sector size of the underlying storage device. The descriptor length is then compared against the device’s sector size; when that size is larger than 2048 bytes, the comparison fails, so every TRIM command is rejected with a parameter‑length error. As a result, discard requests are silently ignored and the kernel emits WARN_ON messages on each attempt, effectively disabling TRIM for devices such as 4K‑sector HDDs or SSDs and impairing storage efficiency.

Affected Systems

Linux kernel builds that include libata‑scsi support and are attached to block devices whose logical sector size exceeds 2048 bytes are affected. This includes typical 4 KiB sector devices that many modern systems use. Unpatched systems that rely on automatic discard or that use filesystems with discard enabled will suffer from the loss of TRIM functionality.

Risk and Exploitability

The flaw causes a denial‑of‑service condition that limits the ability of the system to free unused blocks, but it does not provide remote code execution or privilege escalation. The vulnerability requires a local TRIM operation, so the likely attack vector is local or privileged processes, such as the kernel’s automatic discard scheduler. The CVSS score of 8.2 indicates high severity, but the EPSS score of less than 1 % and absence from the CISA KEV catalog suggest that active exploitation is unlikely at present.

Generated by OpenCVE AI on September 15, 2026 at 21:37 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the Linux kernel to a version that incorporates the libata‑scsi TRIM descriptor fix for devices with a sector size larger than 2048 bytes.
  • For systems that cannot upgrade immediately, prevent accidental discard by removing the discard option in the filesystem mount entries or by adding "discard=no" in relevant udev rules for large‑sector block devices.
  • If an upgrade is not yet available or supported, apply the backported patch that corrects the bounds check in ata_format_dsm_trim_descr() to the current kernel source.

Generated by OpenCVE AI on September 15, 2026 at 21:37 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Debian DSA Debian DSA DSA-6528-1 linux security update
History

Mon, 14 Sep 2026 12:30:00 +0000


Sun, 13 Sep 2026 06:45:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 4.4, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H'}

cvssV3_1

{'score': 8.2, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H'}


Sat, 12 Sep 2026 17:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-20

Sat, 12 Sep 2026 12:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-130
References
Metrics threat_severity

None

cvssV3_1

{'score': 4.4, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate


Sat, 12 Sep 2026 09:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-20

Fri, 11 Sep 2026 23:45:00 +0000

Type Values Removed Values Added
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.
Title ata: libata-scsi: fix DSM TRIM for sector sizes larger than 2048 bytes
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-09-14T12:01:13.899Z

Reserved: 2026-09-11T19:38:34.729Z

Link: CVE-2026-89586

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-09-11T20:19:43.040

Modified: 2026-09-14T13:19:12.880

Link: CVE-2026-89586

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-09-11T19:44:51Z

Links: CVE-2026-89586 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-09-15T21:45:17Z

Weaknesses
  • CWE-130

    Improper Handling of Length Parameter Inconsistency