CVE-2024-56699

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.
Configurations

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*

History

26 Sep 2025, 20:21

Type Values Removed Values Added
First Time Linux linux Kernel
Linux
Summary
  • (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: s390/pci: Arreglar posible doble eliminación de ranura hotplug En el commit 6ee600bfbe0f ("s390/pci: eliminar ranura hotplug al liberar el dispositivo"), zpci_exit_slot() se movió de zpci_device_reserved() a zpci_release_device() con la intención de mantener la ranura hotplug hasta que el dispositivo sea realmente eliminado. Ahora, zpci_release_device() solo se llama una vez que se eliminan todas las referencias. Dado que el subsistema zPCI solo elimina su referencia una vez que el dispositivo está en el estado reservado, se deduce que zpci_release_device() solo debe tratar con dispositivos en el estado reservado. A pesar de eso, contiene código para desmantelar tanto el estado configurado como el de espera. Para el caso de espera, esto ya incluye la eliminación de la ranura hotplug, por lo que causaría una doble eliminación si un dispositivo alguna vez se eliminara en estado configurado o de espera. En lugar de provocar una posible doble eliminación en un caso que nunca debería ocurrir, use WARN_ON() explícitamente si se libera un dispositivo en estado no reservado y elimine los casos de código inactivo.
References () https://git.kernel.org/stable/c/371bd905599d18da62d75e3974acbf6a41e315c7 - () https://git.kernel.org/stable/c/371bd905599d18da62d75e3974acbf6a41e315c7 - Patch
References () https://git.kernel.org/stable/c/c1489651071ab1be46d2af1da8adb15c9fc3c069 - () https://git.kernel.org/stable/c/c1489651071ab1be46d2af1da8adb15c9fc3c069 - Patch
References () https://git.kernel.org/stable/c/c4a585e952ca403a370586d3f16e8331a7564901 - () https://git.kernel.org/stable/c/c4a585e952ca403a370586d3f16e8331a7564901 - Patch
CWE CWE-415
CPE cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 7.8

28 Dec 2024, 10:15

Type Values Removed Values Added
New CVE

Information

Published : 2024-12-28 10:15

Updated : 2025-09-26 20:21


NVD link : CVE-2024-56699

Mitre link : CVE-2024-56699

CVE.ORG link : CVE-2024-56699


JSON object : View

Products Affected

linux

  • linux_kernel
CWE
CWE-415

Double Free