blob: eaf68655a41395100f459b2fa23dbe7fdc19e878 [file] [log] [blame]
From bippy-5f407fcff5a0 Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: <linux-cve-announce@vger.kernel.org>
Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org>
Subject: CVE-2024-56699: s390/pci: Fix potential double remove of hotplug slot
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
s390/pci: Fix potential double remove of hotplug slot
In commit 6ee600bfbe0f ("s390/pci: remove hotplug slot when releasing the
device") the zpci_exit_slot() was moved from zpci_device_reserved() to
zpci_release_device() with the intention of keeping the hotplug slot
around until the device is actually removed.
Now zpci_release_device() is only called once all references are
dropped. Since the zPCI subsystem only drops its reference once the
device is in the reserved state it follows that zpci_release_device()
must only deal with devices in the reserved state. Despite that it
contains code to tear down from both configured and standby state. For
the standby case this already includes the removal of the hotplug slot
so would cause a double removal if a device was ever removed in
either configured or standby state.
Instead of causing a potential double removal in a case that should
never happen explicitly WARN_ON() if a device in non-reserved state is
released and get rid of the dead code cases.
The Linux kernel CVE team has assigned CVE-2024-56699 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.9 with commit 6ee600bfbe0f818ffb7748d99e9b0c89d0d9f02a and fixed in 6.11.11 with commit c1489651071ab1be46d2af1da8adb15c9fc3c069
Issue introduced in 6.9 with commit 6ee600bfbe0f818ffb7748d99e9b0c89d0d9f02a and fixed in 6.12.2 with commit 371bd905599d18da62d75e3974acbf6a41e315c7
Issue introduced in 6.9 with commit 6ee600bfbe0f818ffb7748d99e9b0c89d0d9f02a and fixed in 6.13 with commit c4a585e952ca403a370586d3f16e8331a7564901
Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to
older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2024-56699
will be updated if fixes are backported, please check that for the most
up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
arch/s390/pci/pci.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes. Individual
changes are never tested alone, but rather are part of a larger kernel
release. Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all. If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
https://git.kernel.org/stable/c/c1489651071ab1be46d2af1da8adb15c9fc3c069
https://git.kernel.org/stable/c/371bd905599d18da62d75e3974acbf6a41e315c7
https://git.kernel.org/stable/c/c4a585e952ca403a370586d3f16e8331a7564901