Commit 8514973
committed
ublk: make sure ubq->canceling is set when queue is frozen
jira KERNEL-238
cve CVE-2025-22068
Rebuild_History Non-Buildable kernel-6.12.0-124.16.1.el10_1
commit-author Ming Lei <ming.lei@redhat.com>
commit 8741d07
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.
Fixes: 216c8f5 ("ublk: replace monitor with cancelable uring_cmd")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250327095123.179113-2-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
(cherry picked from commit 8741d07)
Signed-off-by: Jonathan Maple <jmaple@ciq.com>1 parent 2ed8f1b commit 8514973
1 file changed
+29
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1441 | 1441 | | |
1442 | 1442 | | |
1443 | 1443 | | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
1444 | 1458 | | |
1445 | 1459 | | |
| 1460 | + | |
1446 | 1461 | | |
1447 | 1462 | | |
1448 | | - | |
1449 | | - | |
1450 | | - | |
| 1463 | + | |
1451 | 1464 | | |
1452 | | - | |
1453 | | - | |
1454 | | - | |
1455 | 1465 | | |
1456 | 1466 | | |
1457 | 1467 | | |
| |||
1463 | 1473 | | |
1464 | 1474 | | |
1465 | 1475 | | |
1466 | | - | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
1467 | 1483 | | |
1468 | | - | |
1469 | | - | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
1470 | 1489 | | |
1471 | 1490 | | |
1472 | 1491 | | |
1473 | | - | |
| 1492 | + | |
1474 | 1493 | | |
1475 | 1494 | | |
1476 | 1495 | | |
| |||
0 commit comments