Linux kernel use-after-free in remote control registration errors
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
media: rc: Ensure registered is cleared in error path
If rc_register_device() fails, ensure that registered is not set to true. If lirc_register() succeeded, then userspace could have an open file descriptor open. This leads to a use-after-free.
lirc_unregister() must be called with registered = false, else there is a possibility that an fd is open and polling, which would never return POLLERR unless registered is false.
Note that registered must be changed under dev->lock, many functions read registered under lock (e.g. lirc_ioctl).
From the CVE record · Linux
The Linux kernel media remote-control code can leave a device marked as registered when rc_register_device() fails. If lirc_register() succeeded and userspace has an open file descriptor polling the device, this can lead to a use-after-free. The described condition requires local userspace access to an open device file descriptor; authentication requirements are not specified.
Engineers running Linux kernels with the affected media remote-control code should check their kernel versions; affected versions were not provided.