# CVE-2025-71238: scsi: qla2xxx: Fix bsg\_done() causing double free

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

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.22% (percentile 7, 2026-11-28)
- **CWE:** CWE-415
- **Published:** 2026-03-04T14:36:36.579Z
- **Modified:** 2026-10-19T19:17:17.903Z

## Who should check

- Anyone running Linux \>= 1b81e7f3019d632a707e07927e946ffbbc102910, \< 057a5bdc481e58ab853117254867ffb22caf9f6e; \>= 1b81e7f3019d632a707e07927e946ffbbc102910, \< f2bbb4db0e4a4fbd5e649c0b5d8733f61da24720; \>= 1b81e7f3019d632a707e07927e946ffbbc102910, \< 27ac9679c43a09e54e2d9aae9980ada045b428e0; \>= 1b81e7f3019d632a707e07927e946ffbbc102910, \< 74e7458537cd9349cf019862e51491f670871707; \>= 1b81e7f3019d632a707e07927e946ffbbc102910, \< 871f6236da96c4a9712b8a29d7f555f767a47e95; \>= 1b81e7f3019d632a707e07927e946ffbbc102910, \< 31f33b856d2324d86bcaef295f4d210477a1c018; \>= 1b81e7f3019d632a707e07927e946ffbbc102910, \< 708003e1bc857dd014d4c44278d7d77c26f91b1c; \>= 1b81e7f3019d632a707e07927e946ffbbc102910, \< c2c68225b1456f4d0d393b5a8778d51bb0d5b1d0
- Anyone running Linux 5.7

## Description

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

scsi: qla2xxx: Fix bsg\_done() causing double free

Kernel panic observed on system,

\[5353358.825191\] BUG: unable to handle page fault for address: ff5f5e897b024000
\[5353358.825194\] \#PF: supervisor write access in kernel mode
\[5353358.825195\] \#PF: error\_code(0x0002) - not-present page
\[5353358.825196\] PGD 100006067 P4D 0
\[5353358.825198\] Oops: 0002 \[\#1\] PREEMPT SMP NOPTI
\[5353358.825200\] CPU: 5 PID: 2132085 Comm: qlafwupdate.sub Kdump: loaded Tainted: G        W    L    -------  ---  5.14.0-503.34.1.el9\_5.x86\_64 \#1
\[5353358.825203\] Hardware name: HPE ProLiant DL360 Gen11/ProLiant DL360 Gen11, BIOS 2.44 01/17/2025
\[5353358.825204\] RIP: 0010:memcpy\_erms+0x6/0x10
\[5353358.825211\] RSP: 0018:ff591da8f4f6b710 EFLAGS: 00010246
\[5353358.825212\] RAX: ff5f5e897b024000 RBX: 0000000000007090 RCX: 0000000000001000
\[5353358.825213\] RDX: 0000000000001000 RSI: ff591da8f4fed090 RDI: ff5f5e897b024000
\[5353358.825214\] RBP: 0000000000010000 R08: ff5f5e897b024000 R09: 0000000000000000
\[5353358.825215\] R10: ff46cf8c40517000 R11: 0000000000000001 R12: 0000000000008090
\[5353358.825216\] R13: ff591da8f4f6b720 R14: 0000000000001000 R15: 0000000000000000
\[5353358.825218\] FS:  00007f1e88d47740(0000) GS:ff46cf935f940000(0000) knlGS:0000000000000000
\[5353358.825219\] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
\[5353358.825220\] CR2: ff5f5e897b024000 CR3: 0000000231532004 CR4: 0000000000771ef0
\[5353358.825221\] PKRU: 55555554
\[5353358.825222\] Call Trace:
\[5353358.825223\]  \<TASK\>
\[5353358.825224\]  ? show\_trace\_log\_lvl+0x1c4/0x2df
\[5353358.825229\]  ? show\_trace\_log\_lvl+0x1c4/0x2df
\[5353358.825232\]  ? sg\_copy\_buffer+0xc8/0x110
\[5353358.825236\]  ? \_\_die\_body.cold+0x8/0xd
\[5353358.825238\]  ? page\_fault\_oops+0x134/0x170
\[5353358.825242\]  ? kernelmode\_fixup\_or\_oops+0x84/0x110
\[5353358.825244\]  ? exc\_page\_fault+0xa8/0x150
\[5353358.825247\]  ? asm\_exc\_page\_fault+0x22/0x30
\[5353358.825252\]  ? memcpy\_erms+0x6/0x10
\[5353358.825253\]  sg\_copy\_buffer+0xc8/0x110
\[5353358.825259\]  qla2x00\_process\_vendor\_specific+0x652/0x1320 \[qla2xxx\]
\[5353358.825317\]  qla24xx\_bsg\_request+0x1b2/0x2d0 \[qla2xxx\]

Most routines in qla\_bsg.c call bsg\_done() only for success cases.
However a few invoke it for failure case as well leading to a double
free. Validate before calling bsg\_done().

## Affected and fixed versions

- Linux: \>= 1b81e7f3019d632a707e07927e946ffbbc102910, \< 057a5bdc481e58ab853117254867ffb22caf9f6e; \>= 1b81e7f3019d632a707e07927e946ffbbc102910, \< f2bbb4db0e4a4fbd5e649c0b5d8733f61da24720; \>= 1b81e7f3019d632a707e07927e946ffbbc102910, \< 27ac9679c43a09e54e2d9aae9980ada045b428e0; \>= 1b81e7f3019d632a707e07927e946ffbbc102910, \< 74e7458537cd9349cf019862e51491f670871707; \>= 1b81e7f3019d632a707e07927e946ffbbc102910, \< 871f6236da96c4a9712b8a29d7f555f767a47e95; \>= 1b81e7f3019d632a707e07927e946ffbbc102910, \< 31f33b856d2324d86bcaef295f4d210477a1c018; \>= 1b81e7f3019d632a707e07927e946ffbbc102910, \< 708003e1bc857dd014d4c44278d7d77c26f91b1c; \>= 1b81e7f3019d632a707e07927e946ffbbc102910, \< c2c68225b1456f4d0d393b5a8778d51bb0d5b1d0 (cvelist)
- Linux: 5.7 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-71238.md
Affected: Linux >= 1b81e7f3019d632a707e07927e946ffbbc102910, < 057a5bdc481e58ab853117254867ffb22caf9f6e; >= 1b81e7f3019d632a707e07927e946ffbbc102910, < f2bbb4db0e4a4fbd5e649c0b5d8733f61da24720; >= 1b81e7f3019d632a707e07927e946ffbbc102910, < 27ac9679c43a09e54e2d9aae9980ada045b428e0; >= 1b81e7f3019d632a707e079…
Fixed in: Linux 057a5bdc481e58ab853117254867ffb22caf9f6e, Linux 27ac9679c43a09e54e2d9aae9980ada045b428e0, Linux 74e7458537cd9349cf019862e51491f670871707, Linux 871f6236da96c4a9712b8a29d7f555f767a47e95, Linux 31f33b856d2324d86bcaef295f4d210477a1c018, Linux 708003e1bc857dd014d4c44278d7d77c26f91b1c

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-2025-71238 being exploited?

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

### How serious is CVE-2025-71238?

High: CVSS 7.8 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-71238?

Linux \>= 1b81e7f3019d632a707e07927e946ffbbc102910, \< 057a5bdc481e58ab853117254867ffb22caf9f6e; \>= 1b81e7f3019d632a707e07927e946ffbbc102910, \< f2bbb4db0e4a4fbd5e649c0b5d8733f61da24720; \>= 1b81e7f3019d632a707e07927e946ffbbc102910, \< 27ac9679c43a09e54e2d9aae9980ada045b428e0; \>= 1b81e7f3019d632a707e07927e946ffbbc102910, \< 74e7458537cd9349cf019862e51491f670871707; \>= 1b81e7f3019d632a707e07927e946ffbbc102910, \< 871f6236da96c4a9712b8a29d7f555f767a47e95; \>= 1b81e7f3019d632a707e07927e946ffbbc102910, \< 31f33b856d2324d86bcaef295f4d210477a1c018; \>= 1b81e7f3019d632a707e07927e946ffbbc102910, \< 708003e1bc857dd014d4c44278d7d77c26f91b1c; \>= 1b81e7f3019d632a707e07927e946ffbbc102910, \< c2c68225b1456f4d0d393b5a8778d51bb0d5b1d0; Linux 5.7.

### Is there a fix for CVE-2025-71238?

Yes. Fixed in Linux 057a5bdc481e58ab853117254867ffb22caf9f6e, Linux 27ac9679c43a09e54e2d9aae9980ada045b428e0, Linux 74e7458537cd9349cf019862e51491f670871707, Linux 871f6236da96c4a9712b8a29d7f555f767a47e95, Linux 31f33b856d2324d86bcaef295f4d210477a1c018, Linux 708003e1bc857dd014d4c44278d7d77c26f91b1c. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2025-71238?

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

- patch: <https://git.kernel.org/stable/c/057a5bdc481e58ab853117254867ffb22caf9f6e>
- patch: <https://git.kernel.org/stable/c/f2bbb4db0e4a4fbd5e649c0b5d8733f61da24720>
- patch: <https://git.kernel.org/stable/c/27ac9679c43a09e54e2d9aae9980ada045b428e0>
- patch: <https://git.kernel.org/stable/c/74e7458537cd9349cf019862e51491f670871707>
- patch: <https://git.kernel.org/stable/c/871f6236da96c4a9712b8a29d7f555f767a47e95>
- patch: <https://git.kernel.org/stable/c/31f33b856d2324d86bcaef295f4d210477a1c018>
- patch: <https://git.kernel.org/stable/c/708003e1bc857dd014d4c44278d7d77c26f91b1c>
- patch: <https://git.kernel.org/stable/c/c2c68225b1456f4d0d393b5a8778d51bb0d5b1d0>

## 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-2025-71238>

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