| 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-2021-46966: ACPI: custom_method: fix potential use-after-free issue |
| |
| Description |
| =========== |
| |
| In the Linux kernel, the following vulnerability has been resolved: |
| |
| ACPI: custom_method: fix potential use-after-free issue |
| |
| In cm_write(), buf is always freed when reaching the end of the |
| function. If the requested count is less than table.length, the |
| allocated buffer will be freed but subsequent calls to cm_write() will |
| still try to access it. |
| |
| Remove the unconditional kfree(buf) at the end of the function and |
| set the buf to NULL in the -EINVAL error path to match the rest of |
| function. |
| |
| The Linux kernel CVE team has assigned CVE-2021-46966 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Issue introduced in 4.4.195 with commit 4bda2b79a9d04c8ba31681c66e95877dbb433416 and fixed in 4.4.269 with commit 1d53ca5d131074c925ce38361fb0376d3bf7e394 |
| Issue introduced in 4.9.195 with commit 5c12dadcbef8cd55ef1f5dac799bfcbb7ea7db1d and fixed in 4.9.269 with commit 8b04d57f30caf76649d0567551589af9a66ca9be |
| Issue introduced in 4.14.147 with commit 35b88a10535edcf62d3e6b7893a8cd506ff98a24 and fixed in 4.14.233 with commit 90575d1d9311b753cf1718f4ce9061ddda7dfd23 |
| Issue introduced in 4.19.77 with commit e4467fb6ef547aa352dc03397f9474ec84eced5b and fixed in 4.19.191 with commit a5b26a2e362f572d87e9fd35435680e557052a17 |
| Issue introduced in 5.4 with commit 03d1571d9513369c17e6848476763ebbd10ec2cb and fixed in 5.4.118 with commit 72814a94c38a33239793f7622cec6ace1e540c4b |
| Issue introduced in 5.4 with commit 03d1571d9513369c17e6848476763ebbd10ec2cb and fixed in 5.10.36 with commit 62dc2440ebb552aa0d7f635e1697e077d9d21203 |
| Issue introduced in 5.4 with commit 03d1571d9513369c17e6848476763ebbd10ec2cb and fixed in 5.11.20 with commit f16737caf41fc06cfe6e49048becb09657074d4b |
| Issue introduced in 5.4 with commit 03d1571d9513369c17e6848476763ebbd10ec2cb and fixed in 5.12.3 with commit b7a5baaae212a686ceb812c32fceed79c03c0234 |
| Issue introduced in 5.4 with commit 03d1571d9513369c17e6848476763ebbd10ec2cb and fixed in 5.13 with commit e483bb9a991bdae29a0caa4b3a6d002c968f94aa |
| Issue introduced in 5.2.19 with commit 70424999fbf1f160ade111cb9baab51776e0f9c2 |
| Issue introduced in 5.3.4 with commit 06cd4a06eb596a888239fb8ceb6ea15677cab396 |
| |
| 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-2021-46966 |
| 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/acpi/custom_method.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/1d53ca5d131074c925ce38361fb0376d3bf7e394 |
| https://git.kernel.org/stable/c/8b04d57f30caf76649d0567551589af9a66ca9be |
| https://git.kernel.org/stable/c/90575d1d9311b753cf1718f4ce9061ddda7dfd23 |
| https://git.kernel.org/stable/c/a5b26a2e362f572d87e9fd35435680e557052a17 |
| https://git.kernel.org/stable/c/72814a94c38a33239793f7622cec6ace1e540c4b |
| https://git.kernel.org/stable/c/62dc2440ebb552aa0d7f635e1697e077d9d21203 |
| https://git.kernel.org/stable/c/f16737caf41fc06cfe6e49048becb09657074d4b |
| https://git.kernel.org/stable/c/b7a5baaae212a686ceb812c32fceed79c03c0234 |
| https://git.kernel.org/stable/c/e483bb9a991bdae29a0caa4b3a6d002c968f94aa |