# CVE-2021-46966: ACPI: custom\_method: fix potential use-after-free issue

- Priority: **Routine**
- Reason: Not severe (CVSS 7.8, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2024-02-27 · Modified: 2026-05-23
- Aliases: UBUNTU-CVE-2021-46966, DEBIAN-CVE-2021-46966
- Record: https://cvemate.com/vulnerability/CVE-2021-46966 · JSON: https://cvemate.com/vulnerability/CVE-2021-46966/json

## Description

```text
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.
```

## Signals

- CVSS: 7.8 high (v3.1, NVD) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.23%, percentile 14.698%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 90)

- debian linux (Debian): \< 5.10.38-1
- ubuntu linux (Ubuntu): \< 4.4.0-253.287 \| \< 4.15.0-151.157 \| \< 5.4.0-77.86
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): \< 4.4.0-1130.136 \| \< 4.4.0-1168.183 \| \< 4.15.0-1109.116 \| \< 5.4.0-1051.53
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.4 (Ubuntu): \< 5.4.0-1051.53~18.04.1
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-fips (Ubuntu): \< 4.15.0-2051.53 \| \< 5.4.0-1069.73+fips2 \| All versions (No fix recorded)
- ubuntu linux-aws-hwe (Ubuntu): \< 4.15.0-1109.116~16.04.1
- ubuntu linux-azure (Ubuntu): \< 4.15.0-1121.134~14.04.1 \| \< 4.15.0-1121.134~16.04.1 \| All versions (No fix recorded) \| \< 5.4.0-1051.53
- ubuntu linux-azure-4.15 (Ubuntu): \< 4.15.0-1121.134
- ubuntu linux-azure-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.3 (Ubuntu): All versions (No fix recorded)

## References

- <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>
- <https://ubuntu.com/security/CVE-2021-46966>
- <https://git.kernel.org/linus/e483bb9a991bdae29a0caa4b3a6d002c968f94aa>
- <https://www.cve.org/CVERecord?id=CVE-2021-46966>
- <https://ubuntu.com/security/notices/USN-6739-1>
- <https://security-tracker.debian.org/tracker/CVE-2021-46966>

---

Data as of 2026-12-05T07:09:35.532Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
