Back

MEDIUM

cxl: fix possible null-ptr-deref in cxl_guest_init_afu|adapter()

Published Oct 4, 2025

Description

If device_register() fails in cxl_register_afu|adapter(), the device is not added, device_unregister() can not be called in the error path, otherwise it will cause a null-ptr-deref because of removing not added device.

As comment of device_register() says, it should use put_device() to give up the reference in the error path. So split device_unregister() into device_del() and put_device(), then goes to put dev when register fails.

Affected products

Remediation

No remediation recorded yet.

References (15)

Change history (0)

No recorded changes yet.

Sources
CVE.org / MITRE
Status PUBLISHED
Assigner Linux
Published Oct 4, 2025
Updated May 11, 2026
Reserved Oct 4, 2025
NVD
Status Analyzed
Modified Jun 17, 2026
Red Hat
Severity Low
Public date Oct 4, 2025
ENISA EUVD
Assigner Linux
Published Oct 4, 2025
Updated May 11, 2026
Exploited since n/a
EUVD-2025-32381