| From bippy-1.2.0 Mon Sep 17 00:00:00 2001 |
| From: Greg Kroah-Hartman <gregkh@kernel.org> |
| To: <linux-cve-announce@vger.kernel.org> |
| Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org> |
| Subject: CVE-2025-22068: ublk: make sure ubq->canceling is set when queue is frozen |
| |
| Description |
| =========== |
| |
| In the Linux kernel, the following vulnerability has been resolved: |
| |
| ublk: make sure ubq->canceling is set when queue is frozen |
| |
| Now ublk driver depends on `ubq->canceling` for deciding if the request |
| can be dispatched via uring_cmd & io_uring_cmd_complete_in_task(). |
| |
| Once ubq->canceling is set, the uring_cmd can be done via ublk_cancel_cmd() |
| and io_uring_cmd_done(). |
| |
| So set ubq->canceling when queue is frozen, this way makes sure that the |
| flag can be observed from ublk_queue_rq() reliably, and avoids |
| use-after-free on uring_cmd. |
| |
| The Linux kernel CVE team has assigned CVE-2025-22068 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Issue introduced in 6.7 with commit 216c8f5ef0f209a3797292c487bdaa6991ab4b92 and fixed in 6.12.23 with commit 7e3497d7dacb5aee69dd9be842b778083cae0e75 |
| Issue introduced in 6.7 with commit 216c8f5ef0f209a3797292c487bdaa6991ab4b92 and fixed in 6.13.11 with commit 5491400589e7572c2d2627ed6384302f7672aa1d |
| Issue introduced in 6.7 with commit 216c8f5ef0f209a3797292c487bdaa6991ab4b92 and fixed in 6.14.2 with commit 9158359015f0eda00e521e35b7bc7ebce176aebf |
| Issue introduced in 6.7 with commit 216c8f5ef0f209a3797292c487bdaa6991ab4b92 and fixed in 6.15 with commit 8741d0737921ec1c03cf59aebf4d01400c2b461a |
| |
| Please see https://www.kernel.org for a full list of currently supported |
| kernel versions by the kernel community. |
| |
| Unaffected versions might change over time as fixes are backported to |
| older supported kernel versions. The official CVE entry at |
| https://cve.org/CVERecord/?id=CVE-2025-22068 |
| will be updated if fixes are backported, please check that for the most |
| up to date information about this issue. |
| |
| |
| Affected files |
| ============== |
| |
| The file(s) affected by this issue are: |
| drivers/block/ublk_drv.c |
| |
| |
| Mitigation |
| ========== |
| |
| The Linux kernel CVE team recommends that you update to the latest |
| stable kernel version for this, and many other bugfixes. Individual |
| changes are never tested alone, but rather are part of a larger kernel |
| release. Cherry-picking individual commits is not recommended or |
| supported by the Linux kernel community at all. If however, updating to |
| the latest release is impossible, the individual changes to resolve this |
| issue can be found at these commits: |
| https://git.kernel.org/stable/c/7e3497d7dacb5aee69dd9be842b778083cae0e75 |
| https://git.kernel.org/stable/c/5491400589e7572c2d2627ed6384302f7672aa1d |
| https://git.kernel.org/stable/c/9158359015f0eda00e521e35b7bc7ebce176aebf |
| https://git.kernel.org/stable/c/8741d0737921ec1c03cf59aebf4d01400c2b461a |