CVE-2024-26623

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-26623
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-26623.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-26623
Downstream
Related
Published
2024-03-06T06:45:32Z
Modified
2025-10-09T01:56:44.232148Z
Summary
pds_core: Prevent race issues involving the adminq
Details

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

pds_core: Prevent race issues involving the adminq

There are multiple paths that can result in using the pdsc's adminq.

[1] pdscadminqisr and the resulting work from queuework(), i.e. pdscworkthread()->pdscprocess_adminq()

[2] pdscadminqpost()

When the device goes through reset via PCIe reset and/or a fwdown/fwup cycle due to bad PCIe state or bad device state the adminq is destroyed and recreated.

A NULL pointer dereference can happen if [1] or [2] happens after the adminq is already destroyed.

In order to fix this, add some further state checks and implement reference counting for adminq uses. Reference counting was used because multiple threads can attempt to access the adminq at the same time via [1] or [2]. Additionally, multiple clients (i.e. pds-vfio-pci) can be using [2] at the same time.

The adminqrefcnt is initialized to 1 when the adminq has been allocated and is ready to use. Users/clients of the adminq (i.e. [1] and [2]) will increment the refcnt when they are using the adminq. When the driver goes into a fwdown cycle it will set the PDSCSFWDEAD bit and then wait for the adminqrefcnt to hit 1. Setting the PDSCSFWDEAD before waiting will prevent any further adminqrefcnt increments. Waiting for the adminqrefcnt to hit 1 allows for any current users of the adminq to finish before the driver frees the adminq. Once the adminqrefcnt hits 1 the driver clears the refcnt to signify that the adminq is deleted and cannot be used. On the fwup cycle the driver will once again initialize the adminqrefcnt to 1 allowing the adminq to be used again.

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
01ba61b55b2041a39c54aefb3153c770dd59a0ef
Fixed
22cd6046eb2148b18990257505834dd45c672a1b
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
01ba61b55b2041a39c54aefb3153c770dd59a0ef
Fixed
5939feb63ea1f011027576c64b68b681cbad31ca
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
01ba61b55b2041a39c54aefb3153c770dd59a0ef
Fixed
7e82a8745b951b1e794cc780d46f3fbee5e93447

Affected versions

v6.*

v6.3
v6.4
v6.4-rc1
v6.4-rc2
v6.4-rc3
v6.4-rc4
v6.4-rc5
v6.4-rc6
v6.4-rc7
v6.5
v6.5-rc1
v6.5-rc2
v6.5-rc3
v6.5-rc4
v6.5-rc5
v6.5-rc6
v6.5-rc7
v6.6
v6.6-rc1
v6.6-rc2
v6.6-rc3
v6.6-rc4
v6.6-rc5
v6.6-rc6
v6.6-rc7
v6.6.1
v6.6.10
v6.6.11
v6.6.12
v6.6.13
v6.6.14
v6.6.15
v6.6.2
v6.6.3
v6.6.4
v6.6.5
v6.6.6
v6.6.7
v6.6.8
v6.6.9
v6.7
v6.7-rc1
v6.7-rc2
v6.7-rc3
v6.7-rc4
v6.7-rc5
v6.7-rc6
v6.7-rc7
v6.7-rc8
v6.7.1
v6.7.2
v6.7.3
v6.8-rc1

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.4.0
Fixed
6.6.16
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.7.4