Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6759628C03E for ; Thu, 10 Jul 2025 08:16:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752135390; cv=none; b=RaHJYl7nucSiqVvm1NF0Ke2EX1YKBLky07SCxxZOaFY0aneVUOer6rgOpJpgpvb21zzigEfBvCuvxSk4fCUiShFS2QhFOmABP8crhuCTx9JLYcCAbvv+M9vG774pL201lrodEIdxVdDbG9IcbWaklAYA1JXNTf0wW5msgwigNos= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752135390; c=relaxed/simple; bh=egum62ZRQI+o2SSCGrGcHoduAA2lWeWZX02snPa52dQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=L3b8EE0H3O5Iyfp6gUTGeoXPKQ1twXEgKgglcVMFtYPiwdrcSZgKwHIPkfqiVUK72Hg0rSt5629XZOSB2vSlLSFPgpwwVknAnd1Y5U8OhjNc8PymaiYfGanBQQmKCEEDU9zbs5zUXQU11nCfT3X4tstHvGoNCJlMbuit3+ME13Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=HI444m+D; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="HI444m+D" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E8A7FC4CEE3; Thu, 10 Jul 2025 08:16:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1752135390; bh=egum62ZRQI+o2SSCGrGcHoduAA2lWeWZX02snPa52dQ=; h=From:To:Cc:Subject:Date:Reply-to:From; b=HI444m+DiSH77fDrF4I89TRGmzMHKxAMUdOVjcdry1VAM6UkGeYsSPIa8sNff7p1u +KjWmS+xkeAPCeKIOchDROkx2JowI8HIH12zovm/bh6859uXf7Eywp3Cova9DC7+/R 7A7VzZjsikSyuTY+tnhw0St0wraXcB5DRI6MzVk4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38345: ACPICA: fix acpi operand cache leak in dswstate.c Date: Thu, 10 Jul 2025 10:15:53 +0200 Message-ID: <2025071035-CVE-2025-38345-ef5c@gregkh> X-Mailer: git-send-email 2.50.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=5345; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=lhau3vqpaM/1evNg1JORh95ANEInjQsKV7xu2AE2Oso=; b=owGbwMvMwCRo6H6F97bub03G02pJDBn5Zcu3Tp53zfXHmWzWV6ZL9RPuKdrfv+BmuEeh+fXBm wFpia9kOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiAakMC+YI2AVPtJeN1dyY OstgWfojljNyqgwLznjNeLGeweqcHFdpauaqPtO+kIxvAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: ACPICA: fix acpi operand cache leak in dswstate.c ACPICA commit 987a3b5cf7175916e2a4b6ea5b8e70f830dfe732 I found an ACPI cache leak in ACPI early termination and boot continuing case. When early termination occurs due to malicious ACPI table, Linux kernel terminates ACPI function and continues to boot process. While kernel terminates ACPI function, kmem_cache_destroy() reports Acpi-Operand cache leak. Boot log of ACPI operand cache leak is as follows: >[ 0.585957] ACPI: Added _OSI(Module Device) >[ 0.587218] ACPI: Added _OSI(Processor Device) >[ 0.588530] ACPI: Added _OSI(3.0 _SCP Extensions) >[ 0.589790] ACPI: Added _OSI(Processor Aggregator Device) >[ 0.591534] ACPI Error: Illegal I/O port address/length above 64K: C806E00000004002/0x2 (20170303/hwvalid-155) >[ 0.594351] ACPI Exception: AE_LIMIT, Unable to initialize fixed events (20170303/evevent-88) >[ 0.597858] ACPI: Unable to start the ACPI Interpreter >[ 0.599162] ACPI Error: Could not remove SCI handler (20170303/evmisc-281) >[ 0.601836] kmem_cache_destroy Acpi-Operand: Slab cache still has objects >[ 0.603556] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.12.0-rc5 #26 >[ 0.605159] Hardware name: innotek gmb_h virtual_box/virtual_box, BIOS virtual_box 12/01/2006 >[ 0.609177] Call Trace: >[ 0.610063] ? dump_stack+0x5c/0x81 >[ 0.611118] ? kmem_cache_destroy+0x1aa/0x1c0 >[ 0.612632] ? acpi_sleep_proc_init+0x27/0x27 >[ 0.613906] ? acpi_os_delete_cache+0xa/0x10 >[ 0.617986] ? acpi_ut_delete_caches+0x3f/0x7b >[ 0.619293] ? acpi_terminate+0xa/0x14 >[ 0.620394] ? acpi_init+0x2af/0x34f >[ 0.621616] ? __class_create+0x4c/0x80 >[ 0.623412] ? video_setup+0x7f/0x7f >[ 0.624585] ? acpi_sleep_proc_init+0x27/0x27 >[ 0.625861] ? do_one_initcall+0x4e/0x1a0 >[ 0.627513] ? kernel_init_freeable+0x19e/0x21f >[ 0.628972] ? rest_init+0x80/0x80 >[ 0.630043] ? kernel_init+0xa/0x100 >[ 0.631084] ? ret_from_fork+0x25/0x30 >[ 0.633343] vgaarb: loaded >[ 0.635036] EDAC MC: Ver: 3.0.0 >[ 0.638601] PCI: Probing PCI hardware >[ 0.639833] PCI host bridge to bus 0000:00 >[ 0.641031] pci_bus 0000:00: root bus resource [io 0x0000-0xffff] > ... Continue to boot and log is omitted ... I analyzed this memory leak in detail and found acpi_ds_obj_stack_pop_and_ delete() function miscalculated the top of the stack. acpi_ds_obj_stack_push() function uses walk_state->operand_index for start position of the top, but acpi_ds_obj_stack_pop_and_delete() function considers index 0 for it. Therefore, this causes acpi operand memory leak. This cache leak causes a security threat because an old kernel (<= 4.9) shows memory locations of kernel functions in stack dump. Some malicious users could use this information to neutralize kernel ASLR. I made a patch to fix ACPI operand cache leak. The Linux kernel CVE team has assigned CVE-2025-38345 to this issue. Affected and fixed versions =========================== Fixed in 5.4.295 with commit 4fa430a8bca708c7776f6b9d001257f48b19a5b7 Fixed in 5.10.239 with commit 1c0d9115a001979cb446ba5e8331dd1d29a10bbf Fixed in 5.15.186 with commit 5a68893b594ee6ce0efce5f74c07e64e9dd0c2c4 Fixed in 6.1.142 with commit 64c4bcf0308dd1d752ef31d560040b8725e29984 Fixed in 6.6.95 with commit 755a8006b76792922ff7b1c9674d8897a476b5d7 Fixed in 6.12.35 with commit 76d37168155880f2b04a0aad92ceb0f9d799950e Fixed in 6.15.4 with commit e0783910ca4368b01466bc8dcdcc13c3e0b7db53 Fixed in 6.16-rc1 with commit 156fd20a41e776bbf334bd5e45c4f78dfc90ce1c 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-2025-38345 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/acpica/dsutils.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/4fa430a8bca708c7776f6b9d001257f48b19a5b7 https://git.kernel.org/stable/c/1c0d9115a001979cb446ba5e8331dd1d29a10bbf https://git.kernel.org/stable/c/5a68893b594ee6ce0efce5f74c07e64e9dd0c2c4 https://git.kernel.org/stable/c/64c4bcf0308dd1d752ef31d560040b8725e29984 https://git.kernel.org/stable/c/755a8006b76792922ff7b1c9674d8897a476b5d7 https://git.kernel.org/stable/c/76d37168155880f2b04a0aad92ceb0f9d799950e https://git.kernel.org/stable/c/e0783910ca4368b01466bc8dcdcc13c3e0b7db53 https://git.kernel.org/stable/c/156fd20a41e776bbf334bd5e45c4f78dfc90ce1c