In the Linux kernel, the following vulnerability has been resolved:
s390/dcssblk: fix kernel crash with list_add corruption
Commit fb08a1908cb1 ("dax: simplify the daxdevice <-> gendisk association") introduced new logic for gendisk association, requiring drivers to explicitly call daxaddhost() and daxremove_host().
For dcssblk driver, some daxremovehost() calls were missing, e.g. in device remove path. The commit also broke error handling for outdax case in device add path, resulting in an extra putdevice() w/o the previous get_device() in that case.
This lead to stale xarray entries after device add / remove cycles. In the case when a previously used struct gendisk pointer (xarray index) would be used again, because blkallocdisk() happened to return such a pointer, the xainsert() in daxaddhost() would fail and go to outdax, doing the extra putdevice() in the error path. In combination with an already flawed error handling in dcssblk (deviceregister() cleanup), which needs to be addressed in a separate patch, this resulted in a missing devicedel() / klistdel(), and eventually in the kernel crash with listadd corruption on a subsequent deviceadd() / klist_add().
Fix this by adding the missing daxremovehost() calls, and also move the put_device() in the error path to restore the previous logic.
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/54xxx/CVE-2023-54117.json"
}