{"id":"CVE-2021-46966","aliases":["CVE-2021-46966"],"related":[],"kind":"vulnerability","state":"published","title":"ACPI: custom_method: fix potential use-after-free issue","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nACPI: custom_method: fix potential use-after-free issue\n\nIn cm_write(), buf is always freed when reaching the end of the\nfunction.  If the requested count is less than table.length, the\nallocated buffer will be freed but subsequent calls to cm_write() will\nstill try to access it.\n\nRemove the unconditional kfree(buf) at the end of the function and\nset the buf to NULL in the -EINVAL error path to match the rest of\nfunction.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nACPI: custom_method: fix potential use-after-free issue\n\nIn cm_write(), buf is always freed when reaching the end of the\nfunction.  If the requested count is less than table.length, the\nallocated buffer will be freed but subsequent calls to cm_write() will\nstill try to access it.\n\nRemove the unconditional kfree(buf) at the end of the function and\nset the buf to NULL in the -EINVAL error path to match the rest of\nfunction.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: ACPI: custom_method: soluciona un posible problema de use-after-free En cm_write(), buf siempre se libera al llegar al final de la función. Si el recuento solicitado es menor que table.length, el búfer asignado se liberará, pero las llamadas posteriores a cm_write() seguirán intentando acceder a él. Elimine el kfree(buf) incondicional al final de la función y establezca el buf en NULL en la ruta de error -EINVAL para que coincida con el resto de la función.","source":"nvd"}],"published":"2024-02-27T18:47:03.631Z","modified":"2026-06-17T04:16:00.870Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"4bda2b79a9d04c8ba31681c66e95877dbb433416","fixed":"1d53ca5d131074c925ce38361fb0376d3bf7e394","status":"affected"},{"type":"git","introduced":"5c12dadcbef8cd55ef1f5dac799bfcbb7ea7db1d","fixed":"8b04d57f30caf76649d0567551589af9a66ca9be","status":"affected"},{"type":"git","introduced":"35b88a10535edcf62d3e6b7893a8cd506ff98a24","fixed":"90575d1d9311b753cf1718f4ce9061ddda7dfd23","status":"affected"},{"type":"git","introduced":"e4467fb6ef547aa352dc03397f9474ec84eced5b","fixed":"a5b26a2e362f572d87e9fd35435680e557052a17","status":"affected"},{"type":"git","introduced":"03d1571d9513369c17e6848476763ebbd10ec2cb","fixed":"72814a94c38a33239793f7622cec6ace1e540c4b","status":"affected"},{"type":"git","introduced":"03d1571d9513369c17e6848476763ebbd10ec2cb","fixed":"62dc2440ebb552aa0d7f635e1697e077d9d21203","status":"affected"},{"type":"git","introduced":"03d1571d9513369c17e6848476763ebbd10ec2cb","fixed":"f16737caf41fc06cfe6e49048becb09657074d4b","status":"affected"},{"type":"git","introduced":"03d1571d9513369c17e6848476763ebbd10ec2cb","fixed":"b7a5baaae212a686ceb812c32fceed79c03c0234","status":"affected"},{"type":"git","introduced":"03d1571d9513369c17e6848476763ebbd10ec2cb","fixed":"e483bb9a991bdae29a0caa4b3a6d002c968f94aa","status":"affected"},{"type":"git","version":"70424999fbf1f160ade111cb9baab51776e0f9c2","status":"affected"},{"type":"git","version":"06cd4a06eb596a888239fb8ceb6ea15677cab396","status":"affected"},{"type":"semver","introduced":"4.4.195","fixed":"4.4.269","status":"affected"},{"type":"semver","introduced":"4.9.195","fixed":"4.9.269","status":"affected"},{"type":"semver","introduced":"4.14.147","fixed":"4.14.233","status":"affected"},{"type":"semver","introduced":"4.19.77","fixed":"4.19.191","status":"affected"},{"type":"semver","introduced":"5.2.19","fixed":"5.3","status":"affected"},{"type":"semver","introduced":"5.3.4","fixed":"5.4","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.4","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.4","status":"unaffected"},{"type":"semver","introduced":"4.4.269","lastAffected":"4.4.*","status":"unaffected"},{"type":"semver","introduced":"4.9.269","lastAffected":"4.9.*","status":"unaffected"},{"type":"semver","introduced":"4.14.233","lastAffected":"4.14.*","status":"unaffected"},{"type":"semver","introduced":"4.19.191","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.118","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.36","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.11.20","lastAffected":"5.11.*","status":"unaffected"},{"type":"semver","introduced":"5.12.3","lastAffected":"5.12.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"5.13","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"4.4.195","fixed":"4.4.269"},{"status":"affected","introduced":"4.9.195","fixed":"4.9.269"},{"status":"affected","introduced":"4.14.147","fixed":"4.14.233"},{"status":"affected","introduced":"4.19.77","fixed":"4.19.191"},{"status":"affected","introduced":"5.4","fixed":"5.4.118"},{"status":"affected","introduced":"5.5","fixed":"5.10.36"},{"status":"affected","introduced":"5.11","fixed":"5.11.20"},{"status":"affected","introduced":"5.12","fixed":"5.12.3"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/1d53ca5d131074c925ce38361fb0376d3bf7e394","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/8b04d57f30caf76649d0567551589af9a66ca9be","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/90575d1d9311b753cf1718f4ce9061ddda7dfd23","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a5b26a2e362f572d87e9fd35435680e557052a17","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/72814a94c38a33239793f7622cec6ace1e540c4b","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/62dc2440ebb552aa0d7f635e1697e077d9d21203","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/f16737caf41fc06cfe6e49048becb09657074d4b","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b7a5baaae212a686ceb812c32fceed79c03c0234","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e483bb9a991bdae29a0caa4b3a6d002c968f94aa","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-06-28T17:00:55.492Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-46966","url":"https://www.cve.org/CVERecord?id=CVE-2021-46966","licence":"CVE Terms of Use","modified":"2026-05-23T15:18:48.670Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-46966","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-46966","licence":"Public domain","modified":"2026-06-17T04:16:00.870Z"}],"updatedAt":"2026-11-25T22:58:08.591Z","epss":{"score":0.0023,"percentile":0.14733,"date":"2026-12-01T12:00:22.000Z"}}