Files
xserver/dix
José Expósito bc1fdbe465 Xi: do not keep linked list pointer during recursion
The `DisableDevice()` function is called whenever an enabled device
is disabled and it moves the device from the `inputInfo.devices` linked
list to the `inputInfo.off_devices` linked list.

However, its link/unlink operation has an issue during the recursive
call to `DisableDevice()` due to the `prev` pointer pointing to a
removed device.

This issue leads to a length mismatch between the total number of
devices and the number of device in the list, leading to a heap
overflow and, possibly, to local privilege escalation.

Simplify the code that checked whether the device passed to
`DisableDevice()` was in `inputInfo.devices` or not and find the
previous device after the recursion.

CVE-2024-21886, ZDI-CAN-22840

This vulnerability was discovered by:
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
2024-01-16 09:24:31 +01:00
..
2020-07-05 13:07:33 -07:00
2015-07-08 16:41:29 -04:00
2020-07-05 13:07:33 -07:00
2014-11-12 10:25:00 +10:00
2017-10-30 13:45:20 -04:00
2019-10-30 16:17:04 +00:00
2015-04-21 16:57:07 -07:00
2020-07-05 13:07:33 -07:00
2020-07-05 13:07:33 -07:00
2013-07-23 23:56:58 +01:00
2020-07-05 13:07:33 -07:00
2014-11-12 10:25:00 +10:00
2021-09-06 21:19:46 +00:00