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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.23% (percentile 8, 2026-11-28)
- **CWE:** CWE-416
- **Published:** 2024-02-27T18:47:03.631Z
- **Modified:** 2026-06-17T04:16:00.870Z

## Who should check

- Anyone running Linux \>= 4bda2b79a9d04c8ba31681c66e95877dbb433416, \< 1d53ca5d131074c925ce38361fb0376d3bf7e394; \>= 5c12dadcbef8cd55ef1f5dac799bfcbb7ea7db1d, \< 8b04d57f30caf76649d0567551589af9a66ca9be; \>= 35b88a10535edcf62d3e6b7893a8cd506ff98a24, \< 90575d1d9311b753cf1718f4ce9061ddda7dfd23; \>= e4467fb6ef547aa352dc03397f9474ec84eced5b, \< a5b26a2e362f572d87e9fd35435680e557052a17; \>= 03d1571d9513369c17e6848476763ebbd10ec2cb, \< 72814a94c38a33239793f7622cec6ace1e540c4b; \>= 03d1571d9513369c17e6848476763ebbd10ec2cb, \< 62dc2440ebb552aa0d7f635e1697e077d9d21203; \>= 03d1571d9513369c17e6848476763ebbd10ec2cb, \< f16737caf41fc06cfe6e49048becb09657074d4b; \>= 03d1571d9513369c17e6848476763ebbd10ec2cb, \< b7a5baaae212a686ceb812c32fceed79c03c0234; \>= 03d1571d9513369c17e6848476763ebbd10ec2cb, \< e483bb9a991bdae29a0caa4b3a6d002c968f94aa; 70424999fbf1f160ade111cb9baab51776e0f9c2; …
- Anyone running Linux 5.4

## 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.

## Affected and fixed versions

- Linux: \>= 4bda2b79a9d04c8ba31681c66e95877dbb433416, \< 1d53ca5d131074c925ce38361fb0376d3bf7e394; \>= 5c12dadcbef8cd55ef1f5dac799bfcbb7ea7db1d, \< 8b04d57f30caf76649d0567551589af9a66ca9be; \>= 35b88a10535edcf62d3e6b7893a8cd506ff98a24, \< 90575d1d9311b753cf1718f4ce9061ddda7dfd23; \>= e4467fb6ef547aa352dc03397f9474ec84eced5b, \< a5b26a2e362f572d87e9fd35435680e557052a17; \>= 03d1571d9513369c17e6848476763ebbd10ec2cb, \< 72814a94c38a33239793f7622cec6ace1e540c4b; \>= 03d1571d9513369c17e6848476763ebbd10ec2cb, \< 62dc2440ebb552aa0d7f635e1697e077d9d21203; \>= 03d1571d9513369c17e6848476763ebbd10ec2cb, \< f16737caf41fc06cfe6e49048becb09657074d4b; \>= 03d1571d9513369c17e6848476763ebbd10ec2cb, \< b7a5baaae212a686ceb812c32fceed79c03c0234; \>= 03d1571d9513369c17e6848476763ebbd10ec2cb, \< e483bb9a991bdae29a0caa4b3a6d002c968f94aa; 70424999fbf1f160ade111cb9baab51776e0f9c2; … (cvelist)
- Linux: 5.4 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2021-46966. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-46966.md
Affected: Linux >= 4bda2b79a9d04c8ba31681c66e95877dbb433416, < 1d53ca5d131074c925ce38361fb0376d3bf7e394; >= 5c12dadcbef8cd55ef1f5dac799bfcbb7ea7db1d, < 8b04d57f30caf76649d0567551589af9a66ca9be; >= 35b88a10535edcf62d3e6b7893a8cd506ff98a24, < 90575d1d9311b753cf1718f4ce9061ddda7dfd23; >= e4467fb6ef547aa352dc033…
Fixed in: Linux 1d53ca5d131074c925ce38361fb0376d3bf7e394, Linux 8b04d57f30caf76649d0567551589af9a66ca9be, Linux 90575d1d9311b753cf1718f4ce9061ddda7dfd23, Linux 72814a94c38a33239793f7622cec6ace1e540c4b, Linux 62dc2440ebb552aa0d7f635e1697e077d9d21203

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2021-46966 being exploited?

There is no confirmed exploitation: CVE-2021-46966 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.23% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2021-46966?

High: CVSS 7.8 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2021-46966?

Linux \>= 4bda2b79a9d04c8ba31681c66e95877dbb433416, \< 1d53ca5d131074c925ce38361fb0376d3bf7e394; \>= 5c12dadcbef8cd55ef1f5dac799bfcbb7ea7db1d, \< 8b04d57f30caf76649d0567551589af9a66ca9be; \>= 35b88a10535edcf62d3e6b7893a8cd506ff98a24, \< 90575d1d9311b753cf1718f4ce9061ddda7dfd23; \>= e4467fb6ef547aa352dc03397f9474ec84eced5b, \< a5b26a2e362f572d87e9fd35435680e557052a17; \>= 03d1571d9513369c17e6848476763ebbd10ec2cb, \< 72814a94c38a33239793f7622cec6ace1e540c4b; \>= 03d1571d9513369c17e6848476763ebbd10ec2cb, \< 62dc2440ebb552aa0d7f635e1697e077d9d21203; \>= 03d1571d9513369c17e6848476763ebbd10ec2cb, \< f16737caf41fc06cfe6e49048becb09657074d4b; \>= 03d1571d9513369c17e6848476763ebbd10ec2cb, \< b7a5baaae212a686ceb812c32fceed79c03c0234; \>= 03d1571d9513369c17e6848476763ebbd10ec2cb, \< e483bb9a991bdae29a0caa4b3a6d002c968f94aa; 70424999fbf1f160ade111cb9baab51776e0f9c2; …; Linux 5.4.

### Is there a fix for CVE-2021-46966?

Yes. Fixed in Linux 1d53ca5d131074c925ce38361fb0376d3bf7e394, Linux 8b04d57f30caf76649d0567551589af9a66ca9be, Linux 90575d1d9311b753cf1718f4ce9061ddda7dfd23, Linux 72814a94c38a33239793f7622cec6ace1e540c4b, Linux 62dc2440ebb552aa0d7f635e1697e077d9d21203. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2021-46966?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/1d53ca5d131074c925ce38361fb0376d3bf7e394>
- patch: <https://git.kernel.org/stable/c/8b04d57f30caf76649d0567551589af9a66ca9be>
- patch: <https://git.kernel.org/stable/c/90575d1d9311b753cf1718f4ce9061ddda7dfd23>
- patch: <https://git.kernel.org/stable/c/a5b26a2e362f572d87e9fd35435680e557052a17>
- patch: <https://git.kernel.org/stable/c/72814a94c38a33239793f7622cec6ace1e540c4b>
- patch: <https://git.kernel.org/stable/c/62dc2440ebb552aa0d7f635e1697e077d9d21203>
- patch: <https://git.kernel.org/stable/c/f16737caf41fc06cfe6e49048becb09657074d4b>
- patch: <https://git.kernel.org/stable/c/b7a5baaae212a686ceb812c32fceed79c03c0234>
- patch: <https://git.kernel.org/stable/c/e483bb9a991bdae29a0caa4b3a6d002c968f94aa>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2021-46966>

HTML: <https://flawdb.com/CVE-2021-46966> · JSON: <https://flawdb.com/api/v1/entries/CVE-2021-46966>
