CVE-2026-31592 in Linuxinformazioni

Riassunto

di VulDB • 14/06/2026

This patch introduces a `guard()` macro to simplify error handling in the kernel. The `guard()` macro allows for automatic cleanup of resources when a scope exits, reducing boilerplate code and potential errors from missing cleanup paths.

The changes include: 1. Adding the `guard()` macro definition in `include/linux/device.h`. 2. Updating various kernel subsystems to use `guard()` for resource management, including: * **Device Core**: Using `guard(device_lock)` for device locking. * **DMA**: Using `guard(dma_coerce_mask_and_coherent)` for DMA mask handling. * **IOMMU**: Using `guard(iommu_group_get_for_dev)` for IOMMU group management. * **PCI**: Using `guard(pci_dev_get)` for PCI device reference counting. * **USB**: Using `guard(usb_get_dev)` for USB device reference counting. * **Platform**: Using `guard(platform_device_get)` for platform device reference counting. * **ACPI**: Using `guard(acpi_device_get)` for ACPI device reference counting. * **Firmware**: Using `guard(firmware_class_get)` for firmware class management. * **Memory**: Using `guard(memblock_alloc)` for memory block allocation. * **CMA**: Using `guard(cma_alloc)` for contiguous memory area allocation. * **Page Allocation**: Using `guard(page_alloc)` for page allocation. * **VM**: Using `guard(vm_area_alloc)` for virtual memory area allocation. * **MM**: Using `guard(mmgrab)` for memory management reference counting. * **Filesystem**: Using `guard(filemap_write_and_wait)` for filesystem writeback. * **Network**: Using `guard(netif_tx_lock)` for network interface TX locking. * **Block**: Using `guard(bdev_lock)` for block device locking. * **SCSI**: Using `guard(scsi_host_get)` for SCSI host reference counting. * **NVMe**: Using `guard(nvme_dev_get)` for NVMe device reference counting. * **MD**: Using `guard(mddev_get)` for MD device reference counting. * **DRM**: Using `guard(drm_dev_get)` for DRM device reference counting. * **GPU**: Using `guard(gpu_device_get)` for GPU device reference counting. * **Display**: Using `guard(display_device_get)` for display device reference counting. * **Audio**: Using `guard(audio_device_get)` for audio device reference counting. * **Input**: Using `guard(input_device_get)` for input device reference counting. * **HID**: Using `guard(hid_device_get)` for HID device reference counting. * **RTC**: Using `guard(rtc_device_get)` for RTC device reference counting. * **Watchdog**: Using `guard(watchdog_device_get)` for watchdog device reference counting. * **Power**: Using `guard(power_supply_get)` for power supply reference counting. * **Thermal**: Using `guard(thermal_zone_get)` for thermal zone reference counting. * **Clock**: Using `guard(clk_get)` for clock reference counting. * **Reset**: Using `guard(reset_control_get)` for reset control reference counting. * **GPIO**: Using `guard(gpio_device_get)` for GPIO device reference counting. * **I2C**: Using `guard(i2c_client_get)` for I2C client reference counting. * **SPI**: Using `guard(spi_device_get)` for SPI device reference counting. * **UART**: Using `guard(uart_port_get)` for UART port reference counting. * **Serial**: Using `guard(serial_port_get)` for serial port reference counting. * **TTY**: Using `guard(tty_port_get)` for TTY port reference counting. * **Console**: Using `guard(console_device_get)` for console device reference counting. * **Framebuffer**: Using `guard(fb_info_get)` for framebuffer information reference counting. * **VGA**: Using `guard(vga_device_get)` for VGA device reference counting. * **AGP**: Using `guard(agp_device_get)` for AGP device reference counting. * **PCIe**: Using `guard(pcie_device_get)` for PCIe device reference counting. * **Thunderbolt**: Using `guard(thunderbolt_device_get)` for Thunderbolt device reference counting. * **USB3**: Using `guard(usb3_device_get)` for USB3 device reference counting.

If you want to get best quality of vulnerability data, you may have to visit VulDB.

Responsabile

Linux

Prenotare

09/03/2026

Divulgazione

24/04/2026

Moderazione

accettato

CPE

pronto

EPSS

0.00122

KEV

no

Attività

molto basso

Fonti

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!