CVE-2025-21738
published high CVSS 3.1 · 7.8ata: libata-sff: Ensure that we cannot write outside the allocated buffer
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux5a5dbd18a7496ed403f6f54bb20c955c65482fa5 to < a8f8cf87059ed1905c2a5c72f8b39a4f57b11b4c · 5a5dbd18a7496ed403f6f54bb20c955c65482fa5 to < d5e6e3000309359eae2a17117aa6e3c44897bf6c · 5a5dbd18a7496ed403f6f54bb20c955c65482fa5 to < 0dd5aade301a10f4b329fa7454fdcc2518741902 · 5a5dbd18a7496ed403f6f54bb20c955c65482fa5 to < 0a17a9944b8d89ef03946121241870ac53ddaf45 · 5a5dbd18a7496ed403f6f54bb20c955c65482fa5 to < 6e74e53b34b6dec5a50e1404e2680852ec6768d2 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux2.6.22 (affected) · 0 to < 2.6.22 (unaffected · semver) · 6.1.129 through 6.1.* (unaffected · semver) · 6.6.78 through 6.6.* (unaffected · semver) · 6.12.14 through 6.12.* (unaffected · semver) · 6.13.3 through 6.13.* (unaffected · semver) · 6.14 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Siemens | — | SIMATIC S7-1500 TM MFP - GNU/Linux subsystem0 and later · Other versions: unknown | Affected | Not stated | siemens-SADP |
| Amazon Linux | AL2 | Release evaluation | No Fix Planned | Not stated | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluationALAS2023-2025-876 | Fixed | Not stated | Amazon Linux assessment |
| AlmaLinux | 10 | kernel | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-64k | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-64k-core | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
Show 97 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| AlmaLinux | 10 | kernel-64k-debug | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-64k-debug-core | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-64k-debug-devel | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-64k-debug-devel-matched | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-64k-debug-modules | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-64k-debug-modules-core | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-64k-debug-modules-extra | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-64k-devel | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-64k-devel-matched | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-64k-modules | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-64k-modules-core | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-64k-modules-extra | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-abi-stablelists | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-core | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-cross-headers | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-debug | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-debug-core | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-debug-devel | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-debug-devel-matched | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-debug-modules | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-debug-modules-core | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-debug-modules-extra | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-debug-uki-virt | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-devel | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-devel-matched | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-doc | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-headers | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-modules | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-modules-core | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-modules-extra | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-modules-extra-matched | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-rt | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-rt-64k | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-rt-64k-core | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-rt-64k-debug | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-rt-64k-debug-core | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-rt-64k-debug-devel | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-rt-64k-debug-modules | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-rt-64k-debug-modules-core | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-rt-64k-debug-modules-extra | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-rt-64k-devel | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-rt-64k-modules | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-rt-64k-modules-core | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-rt-64k-modules-extra | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-rt-core | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-rt-debug | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-rt-debug-core | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-rt-debug-devel | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-rt-debug-modules | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-rt-debug-modules-core | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-rt-debug-modules-extra | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-rt-devel | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-rt-modules | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-rt-modules-core | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-rt-modules-extra | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-tools | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-tools-libs | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-tools-libs-devel | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-uki-virt | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-uki-virt-addons | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-zfcpdump | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-zfcpdump-core | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-zfcpdump-devel | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-zfcpdump-devel-matched | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-zfcpdump-modules | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-zfcpdump-modules-core | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | kernel-zfcpdump-modules-extra | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | libperf | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | perf | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | python3-perf | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | rtla | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 10 | rv | Advisory build | 6.12.0-124.8.1.el10_1 | ALSA-2025:20095 |
| AlmaLinux | 9 | kernel | Advisory build | 5.14.0-611.5.1.el9_7 | ALSA-2025:20518 |
| AlmaLinux | 9 | kernel-64k | Advisory build | 5.14.0-611.5.1.el9_7 | ALSA-2025:20518 |
| AlmaLinux | 9 | kernel-64k-core | Advisory build | 5.14.0-611.5.1.el9_7 | ALSA-2025:20518 |
| AlmaLinux | 9 | kernel-64k-debug | Advisory build | 5.14.0-611.5.1.el9_7 | ALSA-2025:20518 |
| AlmaLinux | 9 | kernel-64k-debug-core | Advisory build | 5.14.0-611.5.1.el9_7 | ALSA-2025:20518 |
| AlmaLinux | 9 | kernel-64k-debug-devel | Advisory build | 5.14.0-611.5.1.el9_7 | ALSA-2025:20518 |
| AlmaLinux | 9 | kernel-64k-debug-devel-matched | Advisory build | 5.14.0-611.5.1.el9_7 | ALSA-2025:20518 |
| AlmaLinux | 9 | kernel-64k-debug-modules | Advisory build | 5.14.0-611.5.1.el9_7 | ALSA-2025:20518 |
| AlmaLinux | 9 | kernel-64k-debug-modules-core | Advisory build | 5.14.0-611.5.1.el9_7 | ALSA-2025:20518 |
| AlmaLinux | 9 | kernel-64k-debug-modules-extra | Advisory build | 5.14.0-611.5.1.el9_7 | ALSA-2025:20518 |
| AlmaLinux | 9 | kernel-64k-devel | Advisory build | 5.14.0-611.5.1.el9_7 | ALSA-2025:20518 |
| AlmaLinux | 9 | kernel-64k-devel-matched | Advisory build | 5.14.0-611.5.1.el9_7 | ALSA-2025:20518 |
| AlmaLinux | 9 | kernel-64k-modules | Advisory build | 5.14.0-611.5.1.el9_7 | ALSA-2025:20518 |
| AlmaLinux | 9 | kernel-64k-modules-core | Advisory build | 5.14.0-611.5.1.el9_7 | ALSA-2025:20518 |
| AlmaLinux | 9 | kernel-64k-modules-extra | Advisory build | 5.14.0-611.5.1.el9_7 | ALSA-2025:20518 |
| AlmaLinux | 9 | kernel-abi-stablelists | Advisory build | 5.14.0-611.5.1.el9_7 | ALSA-2025:20518 |
| AlmaLinux | 9 | kernel-core | Advisory build | 5.14.0-611.5.1.el9_7 | ALSA-2025:20518 |
| AlmaLinux | 9 | kernel-cross-headers | Advisory build | 5.14.0-611.5.1.el9_7 | ALSA-2025:20518 |
| AlmaLinux | 9 | kernel-debug | Advisory build | 5.14.0-611.5.1.el9_7 | ALSA-2025:20518 |
| AlmaLinux | 9 | kernel-debug-core | Advisory build | 5.14.0-611.5.1.el9_7 | ALSA-2025:20518 |
| AlmaLinux | 9 | kernel-debug-devel | Advisory build | 5.14.0-611.5.1.el9_7 | ALSA-2025:20518 |
| AlmaLinux | 9 | kernel-debug-devel-matched | Advisory build | 5.14.0-611.5.1.el9_7 | ALSA-2025:20518 |
| AlmaLinux | 9 | kernel-debug-modules | Advisory build | 5.14.0-611.5.1.el9_7 | ALSA-2025:20518 |
| AlmaLinux | 9 | kernel-debug-modules-core | Advisory build | 5.14.0-611.5.1.el9_7 | ALSA-2025:20518 |
| AlmaLinux | 9 | kernel-debug-modules-extra | Advisory build | 5.14.0-611.5.1.el9_7 | ALSA-2025:20518 |
Package entries are limited to the first 100 builds and 100 linked advisories.
Description
In the Linux kernel, the following vulnerability has been resolved: ata: libata-sff: Ensure that we cannot write outside the allocated buffer reveliofuzzing reported that a SCSI_IOCTL_SEND_COMMAND ioctl with out_len set to 0xd42, SCSI command set to ATA_16 PASS-THROUGH, ATA command set to ATA_NOP, and protocol set to ATA_PROT_PIO, can cause ata_pio_sector() to write outside the allocated buffer, overwriting random memory. While a ATA device is supposed to abort a ATA_NOP command, there does seem to be a bug either in libata-sff or QEMU, where either this status is not set, or the status is cleared before read by ata_sff_hsm_move(). Anyway, that is most likely a separate bug. Looking at __atapi_pio_bytes(), it already has a safety check to ensure that __atapi_pio_bytes() cannot write outside the allocated buffer. Add a similar check to ata_pio_sector(), such that also ata_pio_sector() cannot write outside the allocated buffer.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.8 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:L - The vulnerability is triggered through the SCSI_IOCTL_SEND_COMMAND (or SG_IO) ioctl issued on a local ATA block device node, requiring local system access. There is no network-facing path into libata's PIO transfer code. AC:L - The attacker deterministically controls both required conditions — the buffer length (any out_len/in_len that is not a multiple of the 512-byte sector size) and the ATA sector count in the pass-through CDB — with no race, no memory-layout dependency, and no reliance on the device's error behaviour when a normal PIO read/write command is used. PR:L - The ATA_12 pass-through opcode 0xA1 aliases GPCMD_BLANK in scsi_cmd_allowed(), so it is permitted for any unprivileged user holding a write-opened fd on the block device — no CAP_SYS_RAWIO is needed — which is routinely the case for disk-group members, containers with device passthrough, and embedded/appliance images with permissive device nodes. UI:N - The attacker triggers the entire sequence from its own process via a single ioctl; no action by any other user or administrator is required. S:U - The out-of-bounds write corrupts kernel memory within the same security authority; there is no crossing of a VM, IOMMU, or hypervisor boundary. C:H - In the data-out direction (ATA_CMD_PIO_WRITE with an unaligned in_len) the kernel reads far past the end of the kmalloc'd buffer and streams that kernel memory to attacker-chosen disk sectors, which can then simply be read back — an unbounded kernel-memory disclosure primitive. I:H - In the data-in direction the kernel writes up to ~128 KB of device-supplied data (contents of disk sectors the attacker previously wrote, hence fully controlled) past the end of a small slab allocation into adjacent pages, giving a controlled-content heap overflow suitable for control-flow hijacking and privilege escalation. A:H - Overwriting arbitrary adjacent kernel pages and slab metadata with attacker data reliably corrupts unrelated kernel structures, producing oopses, slab corruption BUGs, and full system panics.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 5a5dbd18a7496ed403f6f54bb20c955c65482fa5 to < a8f8cf87059ed1905c2a5c72f8b39a4f57b11b4c (affected · git)5a5dbd18a7496ed403f6f54bb20c955c65482fa5 to < d5e6e3000309359eae2a17117aa6e3c44897bf6c (affected · git)5a5dbd18a7496ed403f6f54bb20c955c65482fa5 to < 0dd5aade301a10f4b329fa7454fdcc2518741902 (affected · git)5a5dbd18a7496ed403f6f54bb20c955c65482fa5 to < 0a17a9944b8d89ef03946121241870ac53ddaf45 (affected · git)5a5dbd18a7496ed403f6f54bb20c955c65482fa5 to < 6e74e53b34b6dec5a50e1404e2680852ec6768d2 (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 2.6.22 (affected)0 to < 2.6.22 (unaffected · semver)6.1.129 through 6.1.* (unaffected · semver)6.6.78 through 6.6.* (unaffected · semver)6.12.14 through 6.12.* (unaffected · semver)6.13.3 through 6.13.* (unaffected · semver)6.14 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
| Siemens | SIMATIC S7-1500 TM MFP - GNU/Linux subsystem | 0 and later (affected · custom)Default: unknown | siemens-SADP · adp |
Weaknesses
0No weakness assertions.
References
7- https://cert-portal.siemens.com/productcert/html/ssa-784472.html
- https://git.kernel.org/stable/c/0a17a9944b8d89ef03946121241870ac53ddaf45
- https://git.kernel.org/stable/c/0dd5aade301a10f4b329fa7454fdcc2518741902
- https://git.kernel.org/stable/c/6e74e53b34b6dec5a50e1404e2680852ec6768d2
- https://git.kernel.org/stable/c/a8f8cf87059ed1905c2a5c72f8b39a4f57b11b4c
- https://git.kernel.org/stable/c/d5e6e3000309359eae2a17117aa6e3c44897bf6c
- https://lists.debian.org/debian-lts-announce/2025/03/msg00028.html
Provider assertions
3Linux · cna
ata: libata-sff: Ensure that we cannot write outside the allocated buffer
siemens-SADP · adp
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 64899c53827e8a0ec14074160eb85dd64b75ede26f37ef45a49a372ffbdf6ad9
- Ingested
- 15 Oct 2026, 13:12:09 UTC
- Source record
- Official CVE record