serial: arc_uart: fix of_iomap leak in `arc_serial_probe`
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 8dbe1d5e09a7faec8d22cadcc1011acab8fa6e2a · < 40a462313ba4f337a2b419e7fb4a670f3dd95e14| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
serial: arc_uart: fix of_iomap leak in `arc_serial_probe`
Smatch reports:
drivers/tty/serial/arc_uart.c:631 arc_serial_probe() warn: 'port->membase' from of_iomap() not released on lines: 631.
In arc_serial_probe(), if uart_add_one_port() fails, port->membase is not released, which would cause a resource leak.
To fix this, I replace of_iomap with devm_platform_ioremap_resource.
From the CVE record · Linux
The Linux kernel's arc_uart driver can leak a mapped resource if uart_add_one_port() fails during arc_serial_probe(). The input does not describe an attacker path, authentication requirements, or user interaction.
Engineers running Linux kernels with the arc_uart driver should check their versions; affected versions are not specified.