CVE-2026-53116: s390/ap: use generic driver_override infrastructure
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
s390/ap: use generic driver_override infrastructure
When the AP masks are updated via apmask_store() or aqmask_store(), ap_bus_revise_bindings() is called after ap_attr_mutex has been released.
This calls __ap_revise_reserved(), which accesses the driver_override field without holding any lock, racing against a concurrent driver_override_store() that may free the old string, resulting in a potential UAF.
Fix this by using the driver-core driver_override infrastructure, which protects all accesses with an internal spinlock.
Note that unlike most other buses, the AP bus does not check driver_override in its match() callback; the override is checked in ap_device_probe() and __ap_revise_reserved() instead.
Also note that we do not enable the driver_override feature of struct bus_type, as AP - in contrast to most other buses - passes "" to sysfs_emit() when the driver_override pointer is NULL. Thus, printing "\n" instead of "(null)\n".
Additionally, AP has a custom counter that is modified in the corresponding custom driver_override_store().
The Linux kernel CVE team has assigned CVE-2026-53116 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.19 with commit d38a87d7c0643db61e7a3bfc3ebeea2dc2568f7e and fixed in 7.0.10 with commit 8f2eca0570438b94602da1297353eb7b10dcb6cb Issue introduced in 6.19 with commit d38a87d7c0643db61e7a3bfc3ebeea2dc2568f7e and fixed in 7.1 with commit 81d6f7c3a70b10ff757ee8b5f8114a190871cf1e
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-53116
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/s390/crypto/ap_bus.c drivers/s390/crypto/ap_bus.h drivers/s390/crypto/ap_queue.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/8f2eca0570438b94602da1297353eb7b10dcb6cb https://git.kernel.org/stable/c/81d6f7c3a70b10ff757ee8b5f8114a190871cf1e