CVE-2023-52785: scsi: ufs: core: Fix racing issue between ufshcd_mcq_abort() and ISR

Description

In the Linux kernel, the following vulnerability has been resolved:

scsi: ufs: core: Fix racing issue between ufshcd_mcq_abort() and ISR

If command timeout happens and cq complete IRQ is raised at the same time,
ufshcd_mcq_abort clears lprb->cmd and a NULL pointer deref happens in the
ISR. Error log:

ufshcd_abort: Device abort task at tag 18
Unable to handle kernel NULL pointer dereference at virtual address
0000000000000108
pc : [0xffffffe27ef867ac] scsi_dma_unmap+0xc/0x44
lr : [0xffffffe27f1b898c] ufshcd_release_scsi_cmd+0x24/0x114

Classification

CVE ID: CVE-2023-52785

Affected Products

Vendor: Linux

Product: Linux

Exploit Prediction Scoring System (EPSS)

EPSS Score: 0.04% (probability of being exploited)

EPSS Percentile: 5.08% (scored less or equal to compared to others)

EPSS Date: 2025-02-04 (when was this score calculated)

References

https://git.kernel.org/stable/c/8f15a7e3c054d960bbd1521110700450bbf798a1
https://git.kernel.org/stable/c/f84d461f33a6b27304d468d9cfb56c0cefdb4ee7
https://git.kernel.org/stable/c/27900d7119c464b43cd9eac69c85884d17bae240

Timeline