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 C18053370E4 for ; Wed, 6 May 2026 11:30:34 +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=1778067034; cv=none; b=BmHurozKVblxoYX8FklhGf9BAq6bg3mj34U9+hjjzEhSAZ3MeH0mjgJofO0Cq5nNKbMCKIPl5As1jhrHh0CMdeQIa5CXXAo1Cf4Ts8Q+VGjD7W/IHKsqneO1eyhjzUB5LTFa/EXlLbkemWi/BaYKQ20e+LOMzaSiNv6MDjvOqtE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778067034; c=relaxed/simple; bh=KF6buPGZJo+zL3cw8VBi6QYo3iJvTk/fKgTiKHt1uto=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=KGH7jyQ9YS3ZsieJMgRx3lS6otNqFmEWW5lahyzQBT5YmIfN/i3PjxGof5mPCJsuiP3J17lYGZeT1OIl9Z+DrV6FvcYFd7rVQ9NeJH2mxLi4UzyUXGyYJi5lvvNKDLsQDJO7Oxmyn6TX2k6sSzQxq7mhH12TSdHPYtIL8901ntg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=kqb9tHrK; 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="kqb9tHrK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 58DC2C2BCC4; Wed, 6 May 2026 11:30:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1778067034; bh=KF6buPGZJo+zL3cw8VBi6QYo3iJvTk/fKgTiKHt1uto=; h=From:To:Cc:Subject:Date:Reply-To:From; b=kqb9tHrKqNIGFlNDKtphuxcpR7JxU7XuGp16PGngdQya4A7KwpGODsGpmPB7VHOg4 +CyedcEGdX4fClvEwvMjDXiftSs3Bx9Iy2U1kGeEc/iRzkM8YDGWlrLCGAz66NPkyc xKSSQkwzl40wmMJyOwJG29U441qBAgrW7VWhhYxQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-71274: rpmsg: core: fix race in driver_override_show() and use core helper Date: Wed, 6 May 2026 13:27:16 +0200 Message-ID: <2026050617-CVE-2025-71274-6af4@gregkh> X-Mailer: git-send-email 2.54.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4210; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=CfOTzcHOCt15+L5bsXRcMAAnt0sHfdTFbxLK01/2Yq4=; b=owGbwMvMwCRo6H6F97bub03G02pJDJm/VaftnpjZe/Bq8Kv+HoO6Tgfl6X/Prxao/+3RwvUkz KzYNO1zRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEykfhnD/NL+SzcL5wQ8Vqj6 Waq6kYthDe9VdoYFi8qO1QVcTy5/MXHheSa7/oa4KYebAA== 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: rpmsg: core: fix race in driver_override_show() and use core helper The driver_override_show function reads the driver_override string without holding the device_lock. However, the store function modifies and frees the string while holding the device_lock. This creates a race condition where the string can be freed by the store function while being read by the show function, leading to a use-after-free. To fix this, replace the rpmsg_string_attr macro with explicit show and store functions. The new driver_override_store uses the standard driver_set_override helper. Since the introduction of driver_set_override, the comments in include/linux/rpmsg.h have stated that this helper must be used to set or clear driver_override, but the implementation was not updated until now. Because driver_set_override modifies and frees the string while holding the device_lock, the new driver_override_show now correctly holds the device_lock during the read operation to prevent the race. Additionally, since rpmsg_string_attr has only ever been used for driver_override, removing the macro simplifies the code. The Linux kernel CVE team has assigned CVE-2025-71274 to this issue. Affected and fixed versions =========================== Issue introduced in 4.18 with commit 39e47767ec9b22f844c2a07c9d329256960d4021 and fixed in 5.10.252 with commit 392c6b68334aa0e0ae9aba95c0a366bcb0d92f5d Issue introduced in 4.18 with commit 39e47767ec9b22f844c2a07c9d329256960d4021 and fixed in 5.15.202 with commit d66b8074c555e8abb0ae19eea1c9f3635498bdde Issue introduced in 4.18 with commit 39e47767ec9b22f844c2a07c9d329256960d4021 and fixed in 6.1.165 with commit 47615557447185917afa432b7958f87583c417cb Issue introduced in 4.18 with commit 39e47767ec9b22f844c2a07c9d329256960d4021 and fixed in 6.6.128 with commit 90c8353f471821d7ccd4fe573a2402e056192494 Issue introduced in 4.18 with commit 39e47767ec9b22f844c2a07c9d329256960d4021 and fixed in 6.12.75 with commit 7654e6e3cd6bdee9602f6063b3c670bd556d7e61 Issue introduced in 4.18 with commit 39e47767ec9b22f844c2a07c9d329256960d4021 and fixed in 6.18.16 with commit 2e4a70f3c30910427e5ea848b799066d67b963d5 Issue introduced in 4.18 with commit 39e47767ec9b22f844c2a07c9d329256960d4021 and fixed in 6.19.6 with commit 954557957177c3c13d7c655976665b1170da5e50 Issue introduced in 4.18 with commit 39e47767ec9b22f844c2a07c9d329256960d4021 and fixed in 7.0 with commit 42023d4b6d2661a40ee2dcf7e1a3528a35c638ca 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-71274 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/rpmsg/rpmsg_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/392c6b68334aa0e0ae9aba95c0a366bcb0d92f5d https://git.kernel.org/stable/c/d66b8074c555e8abb0ae19eea1c9f3635498bdde https://git.kernel.org/stable/c/47615557447185917afa432b7958f87583c417cb https://git.kernel.org/stable/c/90c8353f471821d7ccd4fe573a2402e056192494 https://git.kernel.org/stable/c/7654e6e3cd6bdee9602f6063b3c670bd556d7e61 https://git.kernel.org/stable/c/2e4a70f3c30910427e5ea848b799066d67b963d5 https://git.kernel.org/stable/c/954557957177c3c13d7c655976665b1170da5e50 https://git.kernel.org/stable/c/42023d4b6d2661a40ee2dcf7e1a3528a35c638ca