zram: do not forget to endio for partial discard requests
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
zram: do not forget to endio for partial discard requests
As reported by Qu Wenruo and Avinesh Kumar, the following
getconf PAGESIZE 65536 blkdiscard -p 4k /dev/zram0
takes literally forever to complete. zram doesn't support partial discards and just returns immediately w/o doing any discard work in such cases. The problem is that we forget to endio on our way out, so blkdiscard sleeps forever in submit_bio_wait(). Fix this by jumping to end_bio label, which does bio_endio().
From the CVE record · Linux
The Linux kernel's zram driver fails to complete partial discard requests. A local user issuing a partial discard to a zram device can cause the discard command to wait indefinitely; the report demonstrates this with a 4 KB discard on a system with 64 KB pages.
Engineers running Linux systems that use zram should check their kernel; affected versions were not provided.