AZL-116974: CVE-2026-139237 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
ibmveth: release the pool kobjects when probe fails
If registernetdev() fails in ibmvethprobe(), for example with -EINTR when the binding task is killed, probe frees the netdev but leaves the pool%d kobjects embedded in it registered in sysfs. Reading /sys/devices/vio/<unit>/pool0/num is then a use-after-free, and the next probe cannot add pool0.
Put the kobjects before freeing the netdev, as ibmvethremove() does, on this path and on the netifsetrealnumtxqueues() one.
The kobjects also have no release(). With CONFIGDEBUGKOBJECTRELEASE, kobjectput() defers their cleanup, including removing the sysfs files, to a work item, so freenetdev() can free them first, here and in remove(). Add a release() that signals a per-pool completion, and wait for it in both places before freenetdev(). Without that config, release() runs from kobjectput() and the wait returns at once.
Found in review of the ibmveth multi-queue RX series and confirmed by code inspection; the release() part was raised by the Sashiko review of the first version. Tested on a POWER10 LPAR with registernetdev() forced to fail with -EINTR by a test-only module parameter (not part of this patch): no pool%d directories remain and the device binds again. No kernel selftests cover ibmveth.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In ibmveth_probe(), add a release() that signals a per-pool completion and wait for it; call kobject_put() on the pool%d kobjects before free_netdev() on both the register_netdev() failure path and the netif_set_real_num_tx_queues() path.
Event History
Frequently Asked Questions
When does the use-after-free occur?
It occurs when ibmveth_probe() fails after pool kobjects have been registered, including if register_netdev() fails with -EINTR. The failed probe frees the netdev while the embedded pool kobjects and their sysfs files remain registered.
What observable symptoms could indicate a failed probe left stale state behind?
Reading /sys/devices/vio/<unit>/pool0/num after the affected failure path can access freed memory. A subsequent probe can also fail to add pool0 because the prior kobject remains registered.
Does CONFIG_DEBUG_KOBJECT_RELEASE change the affected behavior?
Yes. With CONFIG_DEBUG_KOBJECT_RELEASE enabled, kobject_put() defers cleanup and sysfs-file removal to a work item, which can allow free_netdev() to free the associated memory first. The fix adds a release callback and waits for completion before freeing the netdev.