Commit 7400fa1
block, bfq: fix re-introduced UAF in bic_set_bfqq()
Commit eca0025 ("block, bfq: split sync bfq_queues on a
per-actuator basis"), which is a backport of 9778369 ("block,
bfq: split sync bfq_queues on a per-actuator basis") re-introduces UAF
bug originally fixed by b600de2 ("block, bfq: fix uaf for bfqq in
bic_set_bfqq()") and backported to 6.1 in cb1876f ("block, bfq:
fix uaf for bfqq in bic_set_bfqq()").
bfq_release_process_ref() may release the sync_bfqq variable, which
points to the same bfqq as bic->bfqq member for call context from
__bfq_bic_change_cgroup(). bic_set_bfqq() then accesses bic->bfqq member
which leads to the UAF condition.
Fix this by bringing the incriminated function calls back in correct
order.
Fixes: eca0025 ("block, bfq: split sync bfq_queues on a per-actuator basis")
Signed-off-by: Jakub Acs <[email protected]>
Cc: Hagar Hemdan <[email protected]>
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 49100c0 commit 7400fa1
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
739 | 739 | | |
740 | 740 | | |
741 | 741 | | |
742 | | - | |
743 | 742 | | |
| 743 | + | |
744 | 744 | | |
745 | 745 | | |
746 | 746 | | |
| |||
0 commit comments