In the Linux kernel, the following vulnerability has been resolved:
iio: adc: at91-sama5d2adc: Fix potential use-after-free in sama5d2adc driver
at91adcinterrupt can call at91adctouchdatahandler function to start the work by schedulework(&st->touchst.workq).
If we remove the module which will call at91adcremove to make cleanup, it will free indiodev through iiodevice_unregister but quite a bit later. While the work mentioned above will be used. The sequence of operations that may lead to a UAF bug is as follows:
CPU0 CPU1
| at91_adc_workq_handler
at91adcremove | iiodeviceunregister(indiodev) | //free indiodev a bit later | | iiopushtobuffers(indiodev) | //use indio_dev
Fix it by ensuring that the work is canceled before proceeding with the cleanup in at91adcremove.
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/71xxx/CVE-2025-71199.json"
}