CVE-2026-139637: serial: sh-sci: Unregister UART on sysfs setup failure
In the Linux kernel, the following vulnerability has been resolved:
serial: sh-sci: Unregister UART on sysfs setup failure
sciprobesingle() registers the UART port before sciprobe() creates the RX FIFO tuning attributes. If either devicecreatefile() call fails, probe returns an error without removing the port from the serial core. Device-managed resources are then released while the port remains registered.
Unregister the UART port before returning either sysfs creation error. If the second attribute fails, remove the first attribute before unregistering the port. Keep the existing probe failure policy and leave the successful initialization path unchanged.
This issue was identified during our ongoing static-analysis research while reviewing kernel code.
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.12.120 - 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 sci_probe(), if either device_create_file() call fails, remove the first sysfs attribute if the second creation failed, unregister the UART port, and then return the error.
Event History
Frequently Asked Questions
When can this issue be triggered?
It is triggered only when creation of one of the RX FIFO tuning sysfs attributes fails during sh-sci UART probe. The UART port has already been registered at that point, so the failure path can leave it registered after device-managed resources are released.
What is the practical impact of the flawed failure path?
A failed probe can leave a UART port registered with the serial core even though resources associated with the device have been released. The provided information does not specify a remote attack vector, privilege requirement, or exploitation outcome.
What should be done if the affected code cannot be updated immediately?
The provided fix changes the probe error handling to unregister the UART port when sysfs attribute creation fails, and to remove the first attribute if creation of the second fails. No workaround or configuration-based mitigation is provided.