# CVE-2022-49159: scsi: qla2xxx: Implement ref count for SRB

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

- **Severity:** HIGH 8.8
- **CVSS:** 8.8 (v3.1, CNA) `CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Adjacent network; Attack complexity: Low; Privileges required: None; 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.36% (percentile 23, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2025-02-26T01:55:22.021Z
- **Modified:** 2026-10-15T22:17:23.713Z

## Who should check

- Anyone running Linux \>= ac280b670e6d6666667aba02324e2fc50bd96ae7, \< e17111dd2fda81c35f309b1e5b6ab35809a375e7; \>= ac280b670e6d6666667aba02324e2fc50bd96ae7, \< e140723f78ff418c8df7d990e102e07b65c87d4a; \>= ac280b670e6d6666667aba02324e2fc50bd96ae7, \< ceda7f794f3dfe272491e93e3e93049f8be5f07b; \>= ac280b670e6d6666667aba02324e2fc50bd96ae7, \< 31e6cdbe0eae37badceb5e0d4f06cf051432fd77
- Anyone running Linux 2.6.32

## Description

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

scsi: qla2xxx: Implement ref count for SRB

The timeout handler and the done function are racing. When
qla2x00\_async\_iocb\_timeout() starts to run it can be preempted by the
normal response path (via the firmware?). qla24xx\_async\_gpsc\_sp\_done()
releases the SRB unconditionally. When scheduling back to
qla2x00\_async\_iocb\_timeout() qla24xx\_async\_abort\_cmd() will access an freed
sp-\>qpair pointer:

  qla2xxx \[0000:83:00.0\]-2871:0: Async-gpsc timeout - hdl=63d portid=234500 50:06:0e:80:08:77:b6:21.
  qla2xxx \[0000:83:00.0\]-2853:0: Async done-gpsc res 0, WWPN 50:06:0e:80:08:77:b6:21
  qla2xxx \[0000:83:00.0\]-2854:0: Async-gpsc OUT WWPN 20:45:00:27:f8:75:33:00 speeds=2c00 speed=0400.
  qla2xxx \[0000:83:00.0\]-28d8:0: qla24xx\_handle\_gpsc\_event 50:06:0e:80:08:77:b6:21 DS 7 LS 6 rc 0 login 1\|1 rscn 1\|0 lid 5
  BUG: unable to handle kernel NULL pointer dereference at 0000000000000004
  IP: qla24xx\_async\_abort\_cmd+0x1b/0x1c0 \[qla2xxx\]

Obvious solution to this is to introduce a reference counter. One reference
is taken for the normal code path (the 'good' case) and one for the timeout
path. As we always race between the normal good case and the timeout/abort
handler we need to serialize it. Also we cannot assume any order between
the handlers. Since this is slow path we can use proper synchronization via
locks.

When we are able to cancel a timer (del\_timer returns 1) we know there
can't be any error handling in progress because the timeout handler hasn't
expired yet, thus we can safely decrement the refcounter by one.

If we are not able to cancel the timer, we know an abort handler is
running. We have to make sure we call sp-\>done() in the abort handlers
before calling kref\_put().

## Affected and fixed versions

- Linux: \>= ac280b670e6d6666667aba02324e2fc50bd96ae7, \< e17111dd2fda81c35f309b1e5b6ab35809a375e7; \>= ac280b670e6d6666667aba02324e2fc50bd96ae7, \< e140723f78ff418c8df7d990e102e07b65c87d4a; \>= ac280b670e6d6666667aba02324e2fc50bd96ae7, \< ceda7f794f3dfe272491e93e3e93049f8be5f07b; \>= ac280b670e6d6666667aba02324e2fc50bd96ae7, \< 31e6cdbe0eae37badceb5e0d4f06cf051432fd77 (cvelist)
- Linux: 2.6.32 (cvelist)

## Mitigation

- Upgrade Linux to 31e6cdbe0eae37badceb5e0d4f06cf051432fd77 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2022-49159.md
Affected: Linux >= ac280b670e6d6666667aba02324e2fc50bd96ae7, < e17111dd2fda81c35f309b1e5b6ab35809a375e7; >= ac280b670e6d6666667aba02324e2fc50bd96ae7, < e140723f78ff418c8df7d990e102e07b65c87d4a; >= ac280b670e6d6666667aba02324e2fc50bd96ae7, < ceda7f794f3dfe272491e93e3e93049f8be5f07b; >= ac280b670e6d6666667aba0…
Fixed in: Linux 31e6cdbe0eae37badceb5e0d4f06cf051432fd77

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-2022-49159 being exploited?

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

### How serious is CVE-2022-49159?

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

### Which versions are affected by CVE-2022-49159?

Linux \>= ac280b670e6d6666667aba02324e2fc50bd96ae7, \< e17111dd2fda81c35f309b1e5b6ab35809a375e7; \>= ac280b670e6d6666667aba02324e2fc50bd96ae7, \< e140723f78ff418c8df7d990e102e07b65c87d4a; \>= ac280b670e6d6666667aba02324e2fc50bd96ae7, \< ceda7f794f3dfe272491e93e3e93049f8be5f07b; \>= ac280b670e6d6666667aba02324e2fc50bd96ae7, \< 31e6cdbe0eae37badceb5e0d4f06cf051432fd77; Linux 2.6.32.

### Is there a fix for CVE-2022-49159?

Yes. Fixed in Linux 31e6cdbe0eae37badceb5e0d4f06cf051432fd77. Upgrade Linux to 31e6cdbe0eae37badceb5e0d4f06cf051432fd77 or later.

### How do I check if I'm affected by CVE-2022-49159?

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/e17111dd2fda81c35f309b1e5b6ab35809a375e7>
- patch: <https://git.kernel.org/stable/c/e140723f78ff418c8df7d990e102e07b65c87d4a>
- patch: <https://git.kernel.org/stable/c/ceda7f794f3dfe272491e93e3e93049f8be5f07b>
- patch: <https://git.kernel.org/stable/c/31e6cdbe0eae37badceb5e0d4f06cf051432fd77>

## 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-2022-49159>

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