CVE-2025-68331
kernel: usb: uas: fix urb unmapping issue when the uas device is remove during ongoing data transfer
Overview
Description
In the Linux kernel, the following vulnerability has been resolved:
usb: uas: fix urb unmapping issue when the uas device is remove during ongoing data transfer
When a UAS device is unplugged during data transfer, there is
a probability of a system panic occurring. The root cause is
an access to an invalid memory address during URB callback handling.
Specifically, this happens when the dma_direct_unmap_sg() function
is called within the usb_hcd_unmap_urb_for_dma() interface, but the
sg->dma_address field is 0 and the sg data structure has already been
freed.
The SCSI driver sends transfer commands by invoking uas_queuecommand_lck()
in uas.c, using the uas_submit_urbs() function to submit requests to USB.
Within the uas_submit_urbs() implementation, three URBs (sense_urb,
data_urb, and cmd_urb) are sequentially submitted. Device removal may
occur at any point during uas_submit_urbs execution, which may result
in URB submission failure. However, some URBs might have been successfully
submitted before the failure, and uas_submit_urbs will return the -ENODEV
error code in this case. The current error handling directly calls
scsi_done(). In the SCSI driver, this eventually triggers scsi_complete()
to invoke scsi_end_request() for releasing the sgtable. The successfully
submitted URBs, when being unlinked to giveback, call
usb_hcd_unmap_urb_for_dma() in hcd.c, leading to exceptions during sg
unmapping operations since the sg data structure has already been freed.
This patch modifies the error condition check in the uas_submit_urbs()
function. When a UAS device is removed but one or more URBs have already
been successfully submitted to USB, it avoids immediately invoking
scsi_done() and save the cmnd to devinfo->cmnd array. If the successfully
submitted URBs is completed before devinfo->resetting being set, then
the scsi_done() function will be called within uas_try_complete() after
all pending URB operations are finalized. Otherwise, the scsi_done()
function will be called within uas_zap_pending(), which is executed after
usb_kill_anchored_urbs().
The error handling only takes effect when uas_queuecommand_lck() calls
uas_submit_urbs() and returns the error value -ENODEV . In this case,
the device is disconnected, and the flow proceeds to uas_disconnect(),
where uas_zap_pending() is invoked to call uas_try_complete().
Source: OX vulnerability database
Severity
5.5 · MEDIUM
CVSS 3.1 base score, scored by redhat.
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Affected packages · 0
No registry package. This ID affects operating system packages only.
Operating systems · 99 fixes
Azure Linux 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 3.0 | kernel | 0:6.6.119.3-1.azl3 |
Oracle Linux 2 releases · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 8 | bpftool +13 | 5.15.0-317.197.5.1.el8uek |
| 9 | bpftool +3 | 5.15.0-317.197.5.1.el9uek |
| 9 | kernel-uek +34 | 6.12.0-108.64.6.3.el9uek |
Photon OS 2 releases · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 4.0 | bpftool +9 | 5.10.247-1.ph4 |
| 5.0 | linux-esx +2 | 6.1.159-1.ph5 |
| 5.0 | bpftool +7 | 6.1.177-1.ph5 |
Red Hat 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 9 | bpftool +106 | affected |
SUSE Linux Enterprise 3 releases · 6 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 15.6 | kernel-livepatch-6-4-0-150600-23-84-default | 1-150600.13.3.1 | SUSE-SU-2026:0293-1 |
| 15.6 | cluster-md-kmp-default +17 | 6.4.0-150600.23.84.1 | SUSE-SU-2026:0293-1 |
| 15.6 | kernel-default-base | 6.4.0-150600.23.84.1.150600.12.38.1 | SUSE-SU-2026:0293-1 |
| 15.7 | kernel-livepatch-6-4-0-150700-7-28-rt | 1-150700.1.3.1 | SUSE-SU-2026:0278-1 |
| 15.7 | kernel-livepatch-6-4-0-150700-53-28-default | 1-150700.15.3.1 | SUSE-SU-2026:0315-1 |
| 15.7 | kernel-azure +4 | 6.4.0-150700.20.24.1 | SUSE-SU-2026:0281-1 |
4 more rows
SUSE Linux Enterprise Micro 3 releases · 4 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 6.0 | kernel-default +5 | 6.4.0-39.1 | SUSE-SU-2026:20477-1 |
| 6.0 | kernel-default-base | 6.4.0-39.1.21.16 | SUSE-SU-2026:20477-1 |
| 6.0 | kernel-devel-rt +3 | 6.4.0-40.1 | SUSE-SU-2026:20845-1 |
| 6.1 | kernel-default +6 | 6.4.0-39.1 | SUSE-SU-2026:20498-1 |
| 6.1 | kernel-default-base | 6.4.0-39.1.21.16 | SUSE-SU-2026:20498-1 |
| 6.1 | kernel-devel-rt +4 | 6.4.0-40.1 | SUSE-SU-2026:20876-1 |
2 more rows
amazon linux 1 release · 3 packages
| Release | Package | Fixed in |
|---|---|---|
| 2023 | kernel-livepatch-6-1-159-181-297 +1 | 1:1.0-0.amzn2023 |
| 2023 | bpftool +20 | 1:6.1.159-181.297.amzn2023 |
| 2023 | bpftool6-12 +20 | 1:6.12.63-84.121.amzn2023 |
debian 4 releases · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 11 | linux | 5.10.247-1 |
| 11 | linux-6-1 | 6.1.159-1~deb11u1 |
| 12 | linux | 6.1.159-1 |
| 13 | linux | 6.12.63-1 |
| 14 | linux | 6.17.11-1 |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| linux | 1 |
openSUSE Leap 1 release · 2 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 16.0 | cluster-md-kmp-64kb +74 | 6.12.0-160000.9.1 | openSUSE-SU-2026:20145-1 |
| 16.0 | kernel-default-base | 6.12.0-160000.9.1.160000.2.6 | openSUSE-SU-2026:20145-1 |
root.io debian 3 releases · 2 packages
| Release | Package | Fixed in |
|---|---|---|
| 11 | rootio-linux | 5.10.247-1 |
| 12 | linux +1 | 6.1.159-1 |
| 13 | linux +1 | 6.12.63-1 |
root.io ubuntu 2 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 22.04 | linux +1 | 5.15.0-173.183 |
| 24.04 | linux +1 | 6.8.0-106.106 |
ubuntu 3 releases · 46 packages
| Release | Package | Fixed in |
|---|---|---|
| 20.04-ESM | linux-nvidia-tegra-5-15 | 5.15.0-1055.55~20.04.1 |
| 20.04-ESM | linux-ibm-5-15 | 5.15.0-1097.100~20.04.1 |
| 20.04-ESM | linux-riscv-5-15 | 5.15.0-1097.101~20.04.1 |
| 20.04-ESM | linux-intel-iotg-5-15 | 5.15.0-1098.104~20.04.1 |
| 20.04-ESM | linux-oracle-5-15 | 5.15.0-1100.106~20.04.1 |
| 20.04-ESM | linux-aws-5-15 | 5.15.0-1103.110~20.04.1 |
51 more rows
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2025-68331
- git.kernel.org https://git.kernel.org/stable/c/26d56a9fcb2014b99e654127960aa0a48a391e3c
- git.kernel.org https://git.kernel.org/stable/c/2b90a8131c83f6f2be69397d2b7d14d217d95d2f
- git.kernel.org https://git.kernel.org/stable/c/426edbfc88b22601ea34a441a469092e7b301c52
- git.kernel.org https://git.kernel.org/stable/c/6289fc489e94c9beb6be2b502ccc263663733d72
- git.kernel.org https://git.kernel.org/stable/c/66ac05e7b0d6bbd1bee9fcf729e20fd4cce86d17
- git.kernel.org https://git.kernel.org/stable/c/75f8e2643085db4f7e136fc6b368eb114dd80a64
- git.kernel.org https://git.kernel.org/stable/c/e3a55221f4de080cb7a91ba10f01c4f708603f8d
- linux.oracle.com https://linux.oracle.com/cve/CVE-2025-68331.html
- linux.oracle.com https://linux.oracle.com/errata/ELSA-2026-50113.html
Show all 39 references
- lore.kernel.org https://lore.kernel.org/linux-cve-announce/2025122219-CVE-2025-68331-e22f@gregkh/T
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2025-68331
- ubuntu.com https://ubuntu.com/security/notices/USN-8094-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8094-2
- ubuntu.com https://ubuntu.com/security/notices/USN-8094-3
- ubuntu.com https://ubuntu.com/security/notices/USN-8094-4
- ubuntu.com https://ubuntu.com/security/notices/USN-8094-5
- ubuntu.com https://ubuntu.com/security/notices/USN-8095-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8095-2
- ubuntu.com https://ubuntu.com/security/notices/USN-8095-3
- ubuntu.com https://ubuntu.com/security/notices/USN-8095-4
- ubuntu.com https://ubuntu.com/security/notices/USN-8095-5
- ubuntu.com https://ubuntu.com/security/notices/USN-8096-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8096-2
- ubuntu.com https://ubuntu.com/security/notices/USN-8096-3
- ubuntu.com https://ubuntu.com/security/notices/USN-8096-4
- ubuntu.com https://ubuntu.com/security/notices/USN-8096-5
- ubuntu.com https://ubuntu.com/security/notices/USN-8100-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8116-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8125-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8126-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8141-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8152-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8163-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8163-2
- ubuntu.com https://ubuntu.com/security/notices/USN-8165-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8243-1
- ubuntu.com https://ubuntu.com/security/notices/USN-8261-1
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2025-68331
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.