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 5453710FD for ; Fri, 25 Jul 2025 14:05:51 +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=1753452351; cv=none; b=P+Pcee/vdfUVBh+gCl8sMLqTQur1T+WD4FUBsYNRUWTUXy4wTeQP0CjO5rdF8OZgz9NCjrfbmnZwUZ2HAp2FHHDXnpavd7In6DYs1hkmY9+2JFiZChIAoxQB4oSny7HPQca4FxUvdkMJI5AJIVzqT/h6FfgtmT5EzSJwpKjACY0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753452351; c=relaxed/simple; bh=dWeGbPwIBrQeU4IFOe3q3CCvY+23bBPtIpbsMub6iX8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=iuaW4p2RK4S9pDy2e5Lc1q96iK4CuDbL/z/R5+7m1HdVZbZ2r3kmGwpii5WvPb26obF+2Qnfuitnx/erqtQ7UxO0FouDJl6uEFyHtI7ipRuOL4DM6Yg2WhFRC7BYYeutHElPdnfRs9dHJ5pRDwRUA+2PBGNbk4TvbM8g7UMB72c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=xvqpiJM+; 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="xvqpiJM+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 74566C4CEE7; Fri, 25 Jul 2025 14:05:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1753452350; bh=dWeGbPwIBrQeU4IFOe3q3CCvY+23bBPtIpbsMub6iX8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=xvqpiJM+3O5d/fBCMA6GYbwqQcsmgrTMLwmEIO5NFfU4d4VT2XqDb03HOlBkzaSMu oUOJt4QU1W/sj+rOz6P6WNxb9zvOrKAev7VFNBEQpf/HNkYIXHxAlcAuQL9dVLKRiD 67lNE/dtWgvv1miWooEE9/T8HbHKmigHQY7uZYGk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38418: remoteproc: core: Release rproc->clean_table after rproc_attach() fails Date: Fri, 25 Jul 2025 16:05:47 +0200 Message-ID: <2025072546-CVE-2025-38418-7af0@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=4099; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=atP1oZIlmL5/OAH99dmqkIt+E6jbHlQAXHDhTCmhffo=; b=kA0DAAIRMUfUDdst+ykByyZiAGiDjzqgHlKCN9F/vWzVfMdj5UCJf/lVuslYUBkaxzkxyQotb IhdBAARAgAdFiEE9LYMxb94wiFKMT3LMUfUDdst+ykFAmiDjzoACgkQMUfUDdst+ym6JwCeJr2W 7wFJ4lkIYLfyw26SOIFUu4EAn3JNaHX+T3a79bNCHdqigcrRXPhj 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: remoteproc: core: Release rproc->clean_table after rproc_attach() fails When rproc->state = RPROC_DETACHED is attached to remote processor through rproc_attach(), if rproc_handle_resources() returns failure, then the clean table should be released, otherwise the following memory leak will occur. unreferenced object 0xffff000086a99800 (size 1024): comm "kworker/u12:3", pid 59, jiffies 4294893670 (age 121.140s) hex dump (first 32 bytes): 00 00 00 00 00 80 00 00 00 00 00 00 00 00 10 00 ............ 00 00 00 00 00 00 08 00 00 00 00 00 00 00 00 00 ............ backtrace: [<000000008bbe4ca8>] slab_post_alloc_hook+0x98/0x3fc [<000000003b8a272b>] __kmem_cache_alloc_node+0x13c/0x230 [<000000007a507c51>] __kmalloc_node_track_caller+0x5c/0x260 [<0000000037818dae>] kmemdup+0x34/0x60 [<00000000610f7f57>] rproc_boot+0x35c/0x56c [<0000000065f8871a>] rproc_add+0x124/0x17c [<00000000497416ee>] imx_rproc_probe+0x4ec/0x5d4 [<000000003bcaa37d>] platform_probe+0x68/0xd8 [<00000000771577f9>] really_probe+0x110/0x27c [<00000000531fea59>] __driver_probe_device+0x78/0x12c [<0000000080036a04>] driver_probe_device+0x3c/0x118 [<000000007e0bddcb>] __device_attach_driver+0xb8/0xf8 [<000000000cf1fa33>] bus_for_each_drv+0x84/0xe4 [<000000001a53b53e>] __device_attach+0xfc/0x18c [<00000000d1a2a32c>] device_initial_probe+0x14/0x20 [<00000000d8f8b7ae>] bus_probe_device+0xb0/0xb4 unreferenced object 0xffff0000864c9690 (size 16): The Linux kernel CVE team has assigned CVE-2025-38418 to this issue. Affected and fixed versions =========================== Issue introduced in 5.13 with commit 9dc9507f1880fb6225e3e058cb5219b152cbf198 and fixed in 5.15.186 with commit 3562c09feeb8d8e9d102ce6840e8c7d57a7feb5c Issue introduced in 5.13 with commit 9dc9507f1880fb6225e3e058cb5219b152cbf198 and fixed in 6.1.142 with commit bf876fd9dc2d0c9fff96aef63d4346719f206fc1 Issue introduced in 5.13 with commit 9dc9507f1880fb6225e3e058cb5219b152cbf198 and fixed in 6.6.95 with commit 3ee979709e16a83b257bc9a544a7ff71fd445ea9 Issue introduced in 5.13 with commit 9dc9507f1880fb6225e3e058cb5219b152cbf198 and fixed in 6.12.35 with commit f4ef928ca504c996f9222eb2c59ac6d6eefd9c75 Issue introduced in 5.13 with commit 9dc9507f1880fb6225e3e058cb5219b152cbf198 and fixed in 6.15.4 with commit 6fe9486d709e4a60990843832501ef6556440ca7 Issue introduced in 5.13 with commit 9dc9507f1880fb6225e3e058cb5219b152cbf198 and fixed in 6.16-rc1 with commit bcd241230fdbc6005230f80a4f8646ff5a84f15b 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-38418 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/remoteproc/remoteproc_core.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/3562c09feeb8d8e9d102ce6840e8c7d57a7feb5c https://git.kernel.org/stable/c/bf876fd9dc2d0c9fff96aef63d4346719f206fc1 https://git.kernel.org/stable/c/3ee979709e16a83b257bc9a544a7ff71fd445ea9 https://git.kernel.org/stable/c/f4ef928ca504c996f9222eb2c59ac6d6eefd9c75 https://git.kernel.org/stable/c/6fe9486d709e4a60990843832501ef6556440ca7 https://git.kernel.org/stable/c/bcd241230fdbc6005230f80a4f8646ff5a84f15b