CVE-2026-139776: soc: qcom: apr: clean up failed service registrations
In the Linux kernel, the following vulnerability has been resolved:
soc: qcom: apr: clean up failed service registrations
apradddevice() publishes a service in svcsidr before parsing the optional protection domain and registering the device. If device registration fails, putdevice() frees the aprdevice while its service remains in the IDR. A received packet can then dereference that stale entry. The property error path also leaves the service and allocation behind.
Split deviceregister() into deviceinitialize() and deviceadd() so every pre-registration error can safely drop the device reference. Remove the service from the IDR on all failures after publication, then drain the RX workqueue before dropping the device reference. This prevents an in-flight lookup from outliving the device.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1.193 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.6.163 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.119 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.65 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.6 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.6-1 - Compensating control
In soc: qcom: apr, remove the published service from svcs_idr on every failure after publication, drain the RX workqueue before dropping the device reference, and split device_register() into device_initialize() and device_add() so pre-registration errors can safely release the device.
Event History
Frequently Asked Questions
What conditions are required for this issue to be reachable?
A Qualcomm APR service registration must fail after the service has been published in the service IDR, such as during optional protection-domain parsing or device registration. A packet must then be received and look up the stale service entry while it refers to the freed device.
What is the impact of a failed registration before the fix?
The failed service can remain in the IDR after its apr_device has been freed, allowing a received packet to dereference a stale entry. The property-error path can also leave the service and its allocation behind.
What cleanup behavior does the fix add?
The fix removes services from the IDR on failures occurring after publication and drains the RX workqueue before dropping the device reference. It also separates device initialization from device addition so pre-registration failures can safely release the device reference.