In the Linux kernel, the following vulnerability has been resolved:
ACPICA: Fix use-after-free in acpiutcopyipackageto_ipackage()
There is an use-after-free reported by KASAN:
BUG: KASAN: use-after-free in acpiutremovereference+0x3b/0x82 Read of size 1 at addr ffff888112afc460 by task modprobe/2111 CPU: 0 PID: 2111 Comm: modprobe Not tainted 6.1.0-rc7-dirty Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), Call Trace: <TASK> kasanreport+0xae/0xe0 acpiutremovereference+0x3b/0x82 acpiutcopyiobjecttoiobject+0x3be/0x3d5 acpidsstoreobjecttolocal+0x15d/0x3a0 acpiexstore+0x78d/0x7fd acpiexopcode1A1T1R+0xbe4/0xf9b acpipsparse_aml+0x217/0x8d5 ... </TASK>
The root cause of the problem is that the acpioperandobject is freed when acpiutwalkpackagetree() fails in acpiutcopyipackagetoipackage(), lead to repeated release in acpiutcopyiobjecttoiobject(). The problem was introduced by "8aa5e56eeb61" commit, this commit is to fix memory leak in acpiutcopyiobjecttoiobject(), repeatedly adding remove operation, lead to "acpioperand_object" used after free.
Fix it by removing acpiutremovereference() in acpiutcopyipackagetoipackage(). acpiutcopyipackagetoipackage() is called to copy an internal package object into another internal package object, when it fails, the memory of acpioperand_object should be freed by the caller.
{ "vanir_signatures": [ { "digest": { "length": 678.0, "function_hash": "80385647374476698974135746229507267346" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@133462d35dae95edb944af86b986d4c9dec59bd1", "signature_type": "Function", "target": { "function": "acpi_ut_copy_ipackage_to_ipackage", "file": "drivers/acpi/acpica/utcopy.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50423-05c547e3" }, { "digest": { "line_hashes": [ "116712819832638522773040567817349478549", "313144687160141918639000210239644119625", "16119227442164515457339954011988518782", "335250673053178445044206776513658003679", "209323297314786934852944636282406579731", "211215542824175976643538167002355164445" ], "threshold": 0.9 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f51b2235e4f320edc839c3e5cb0d1f8a6e8657c6", "signature_type": "Line", "target": { "file": "drivers/acpi/acpica/utcopy.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50423-1bf464bb" }, { "digest": { "line_hashes": [ "116712819832638522773040567817349478549", "313144687160141918639000210239644119625", "16119227442164515457339954011988518782", "335250673053178445044206776513658003679", "209323297314786934852944636282406579731", "211215542824175976643538167002355164445" ], "threshold": 0.9 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@01f2c2052ea50fb9a8ce12e4e83aed0267934ef0", "signature_type": "Line", "target": { "file": "drivers/acpi/acpica/utcopy.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50423-3f3724af" }, { "digest": { "length": 678.0, "function_hash": "80385647374476698974135746229507267346" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@02617006b5a46f2ea55ac61f5693c7afd7bf9276", "signature_type": "Function", "target": { "function": "acpi_ut_copy_ipackage_to_ipackage", "file": "drivers/acpi/acpica/utcopy.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50423-4ca9b6b5" }, { "digest": { "line_hashes": [ "116712819832638522773040567817349478549", "313144687160141918639000210239644119625", "16119227442164515457339954011988518782", "335250673053178445044206776513658003679", "209323297314786934852944636282406579731", "211215542824175976643538167002355164445" ], "threshold": 0.9 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@dfdde4d5138bc023897033a5ac653a84e94805be", "signature_type": "Line", "target": { "file": "drivers/acpi/acpica/utcopy.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50423-5fdaff8d" }, { "digest": { "length": 678.0, "function_hash": "80385647374476698974135746229507267346" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6fde666278f91b85d71545a0ebbf41d8d7af8074", "signature_type": "Function", "target": { "function": "acpi_ut_copy_ipackage_to_ipackage", "file": "drivers/acpi/acpica/utcopy.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50423-607a7a35" }, { "digest": { "length": 678.0, "function_hash": "80385647374476698974135746229507267346" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@dfdde4d5138bc023897033a5ac653a84e94805be", "signature_type": "Function", "target": { "function": "acpi_ut_copy_ipackage_to_ipackage", "file": "drivers/acpi/acpica/utcopy.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50423-60d89388" }, { "digest": { "length": 678.0, "function_hash": "80385647374476698974135746229507267346" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c9125b643fc51b8e662f2f614096ceb45a0adbc3", "signature_type": "Function", "target": { "function": "acpi_ut_copy_ipackage_to_ipackage", "file": "drivers/acpi/acpica/utcopy.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50423-6329f559" }, { "digest": { "line_hashes": [ "116712819832638522773040567817349478549", "313144687160141918639000210239644119625", "16119227442164515457339954011988518782", "335250673053178445044206776513658003679", "209323297314786934852944636282406579731", "211215542824175976643538167002355164445" ], "threshold": 0.9 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6fde666278f91b85d71545a0ebbf41d8d7af8074", "signature_type": "Line", "target": { "file": "drivers/acpi/acpica/utcopy.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50423-667a37c5" }, { "digest": { "line_hashes": [ "116712819832638522773040567817349478549", "313144687160141918639000210239644119625", "16119227442164515457339954011988518782", "335250673053178445044206776513658003679", "209323297314786934852944636282406579731", "211215542824175976643538167002355164445" ], "threshold": 0.9 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@02617006b5a46f2ea55ac61f5693c7afd7bf9276", "signature_type": "Line", "target": { "file": "drivers/acpi/acpica/utcopy.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50423-798f6f95" }, { "digest": { "line_hashes": [ "116712819832638522773040567817349478549", "313144687160141918639000210239644119625", "16119227442164515457339954011988518782", "335250673053178445044206776513658003679", "209323297314786934852944636282406579731", "211215542824175976643538167002355164445" ], "threshold": 0.9 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c9125b643fc51b8e662f2f614096ceb45a0adbc3", "signature_type": "Line", "target": { "file": "drivers/acpi/acpica/utcopy.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50423-7c0f4d03" }, { "digest": { "line_hashes": [ "116712819832638522773040567817349478549", "313144687160141918639000210239644119625", "16119227442164515457339954011988518782", "335250673053178445044206776513658003679", "209323297314786934852944636282406579731", "211215542824175976643538167002355164445" ], "threshold": 0.9 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@470188b09e92d83c5a997f25f0e8fb8cd2bc3469", "signature_type": "Line", "target": { "file": "drivers/acpi/acpica/utcopy.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50423-948e064a" }, { "digest": { "length": 678.0, "function_hash": "80385647374476698974135746229507267346" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@02f237423c9c6a18e062de2d474f85d5659e4eb9", "signature_type": "Function", "target": { "function": "acpi_ut_copy_ipackage_to_ipackage", "file": "drivers/acpi/acpica/utcopy.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50423-9d9d5fb9" }, { "digest": { "length": 678.0, "function_hash": "80385647374476698974135746229507267346" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f51b2235e4f320edc839c3e5cb0d1f8a6e8657c6", "signature_type": "Function", "target": { "function": "acpi_ut_copy_ipackage_to_ipackage", "file": "drivers/acpi/acpica/utcopy.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50423-a31dbcf6" }, { "digest": { "line_hashes": [ "116712819832638522773040567817349478549", "313144687160141918639000210239644119625", "16119227442164515457339954011988518782", "335250673053178445044206776513658003679", "209323297314786934852944636282406579731", "211215542824175976643538167002355164445" ], "threshold": 0.9 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@133462d35dae95edb944af86b986d4c9dec59bd1", "signature_type": "Line", "target": { "file": "drivers/acpi/acpica/utcopy.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50423-aa851419" }, { "digest": { "length": 678.0, "function_hash": "80385647374476698974135746229507267346" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@470188b09e92d83c5a997f25f0e8fb8cd2bc3469", "signature_type": "Function", "target": { "function": "acpi_ut_copy_ipackage_to_ipackage", "file": "drivers/acpi/acpica/utcopy.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50423-ac20887c" }, { "digest": { "length": 678.0, "function_hash": "80385647374476698974135746229507267346" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@01f2c2052ea50fb9a8ce12e4e83aed0267934ef0", "signature_type": "Function", "target": { "function": "acpi_ut_copy_ipackage_to_ipackage", "file": "drivers/acpi/acpica/utcopy.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50423-e5b207f6" }, { "digest": { "line_hashes": [ "116712819832638522773040567817349478549", "313144687160141918639000210239644119625", "16119227442164515457339954011988518782", "335250673053178445044206776513658003679", "209323297314786934852944636282406579731", "211215542824175976643538167002355164445" ], "threshold": 0.9 }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@02f237423c9c6a18e062de2d474f85d5659e4eb9", "signature_type": "Line", "target": { "file": "drivers/acpi/acpica/utcopy.c" }, "deprecated": false, "signature_version": "v1", "id": "CVE-2022-50423-ecdea258" } ] }