| From bippy-5f407fcff5a0 Mon Sep 17 00:00:00 2001 |
| From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| To: <linux-cve-announce@vger.kernel.org> |
| Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org> |
| Subject: CVE-2023-52787: blk-mq: make sure active queue usage is held for bio_integrity_prep() |
| |
| Description |
| =========== |
| |
| In the Linux kernel, the following vulnerability has been resolved: |
| |
| blk-mq: make sure active queue usage is held for bio_integrity_prep() |
| |
| blk_integrity_unregister() can come if queue usage counter isn't held |
| for one bio with integrity prepared, so this request may be completed with |
| calling profile->complete_fn, then kernel panic. |
| |
| Another constraint is that bio_integrity_prep() needs to be called |
| before bio merge. |
| |
| Fix the issue by: |
| |
| - call bio_integrity_prep() with one queue usage counter grabbed reliably |
| |
| - call bio_integrity_prep() before bio merge |
| |
| The Linux kernel CVE team has assigned CVE-2023-52787 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Issue introduced in 5.16 with commit 900e080752025f0016128f07c9ed4c50eba3654b and fixed in 6.1.72 with commit b5c8e0ff76d10f6bf70a7237678f27c20cf59bc9 |
| Issue introduced in 5.16 with commit 900e080752025f0016128f07c9ed4c50eba3654b and fixed in 6.5.13 with commit e9c309ded295b7f8849097d71ae231456ca79f78 |
| Issue introduced in 5.16 with commit 900e080752025f0016128f07c9ed4c50eba3654b and fixed in 6.6.3 with commit b80056bd75a16e4550873ecefe12bc8fd190b1cf |
| Issue introduced in 5.16 with commit 900e080752025f0016128f07c9ed4c50eba3654b and fixed in 6.7 with commit b0077e269f6c152e807fdac90b58caf012cdbaab |
| |
| 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-2023-52787 |
| 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: |
| block/blk-mq.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/b5c8e0ff76d10f6bf70a7237678f27c20cf59bc9 |
| https://git.kernel.org/stable/c/e9c309ded295b7f8849097d71ae231456ca79f78 |
| https://git.kernel.org/stable/c/b80056bd75a16e4550873ecefe12bc8fd190b1cf |
| https://git.kernel.org/stable/c/b0077e269f6c152e807fdac90b58caf012cdbaab |