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 179FE2E2DD8 for ; Wed, 1 Oct 2025 11:52:39 +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=1759319559; cv=none; b=j84/C1EQ8K0gRCq8ic/m+Ilkc2DEk2nyZgbMoOytw3l60kyDCNwrL2dkXxwh2JMGpiparIEhkVVeyKIOcdNdexCdb5xOFP5gZYwrdLvq/aDuI4dC1xupLbZaXVPJ6ys+n7WCeaiWvikq6lJtSPeBBZHbFoJnjHhOWfe7dwXVbyk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759319559; c=relaxed/simple; bh=giLRIcpsH4Hc8X0+V6vd70usigEYCYr76wN3gS0cCy0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=L9FH1cUHk5p2YI8wdph8CKsbUYyNzc6IDA0p40bNzVTPvVwpU0Hu0bKEw7nS0VHOIdlYuQhL24Xk36ff5GuWkstHPl9xFkTvz0qPJ5wsxlJvUGv877OBDbaDjhGvkPDXVCF5wc/TZGunWBXqPe/Q2AIwRS3UtkaTejJDSgAMZgA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ta9/xHAt; 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="ta9/xHAt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8BEE7C4CEF4; Wed, 1 Oct 2025 11:52:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1759319559; bh=giLRIcpsH4Hc8X0+V6vd70usigEYCYr76wN3gS0cCy0=; h=From:To:Cc:Subject:Date:Reply-to:From; b=ta9/xHAtSWs0nG+bC9AAzIPzZqGoTt/lMkqsF6qf4S4lOQqa5qwnvwKEZFNe+QOQ/ sc5UfX7t0p4yneiEQBd8WQjBv54BjKHjfv50Vnlk6n2FA4m/xR8Kj6kfP6V7F/2oW9 Zyi7zDF07sBL52+vvdsl90zoDwOZ5wy7g3kg15V4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50426: remoteproc: imx_dsp_rproc: Add mutex protection for workqueue Date: Wed, 1 Oct 2025 13:41:59 +0200 Message-ID: <2025100156-CVE-2022-50426-a61b@gregkh> X-Mailer: git-send-email 2.51.0 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=3133; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=fptEkBMEVrtKN1JjYgPJwL2nnqO9xvdPELemEkX9JOo=; b=owGbwMvMwCRo6H6F97bub03G02pJDBl3hVvCH3z8kW9m3fWaOXhdhmVY0g7P+KecEREy2df/a lXmiqd1xLIwCDIxyIopsnzZxnN0f8UhRS9D29Mwc1iZQIYwcHEKwERcwhkWbJ0XWXx7+YdrxT3L Gh0j7bv3MpjWMsyz/1u5s3Up6xwZpY9HY36LGc7czB8OAA== 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: imx_dsp_rproc: Add mutex protection for workqueue The workqueue may execute late even after remoteproc is stopped or stopping, some resources (rpmsg device and endpoint) have been released in rproc_stop_subdevices(), then rproc_vq_interrupt() accessing these resources will cause kennel dump. Call trace: virtqueue_add_split+0x1ac/0x560 virtqueue_add_inbuf+0x4c/0x60 rpmsg_recv_done+0x15c/0x294 vring_interrupt+0x6c/0xa4 rproc_vq_interrupt+0x30/0x50 imx_dsp_rproc_vq_work+0x24/0x40 [imx_dsp_rproc] process_one_work+0x1d0/0x354 worker_thread+0x13c/0x470 kthread+0x154/0x160 ret_from_fork+0x10/0x20 Add mutex protection in imx_dsp_rproc_vq_work(), if the state is not running, then just skip calling rproc_vq_interrupt(). Also the flush workqueue operation can't be added in rproc stop for the same reason. The call sequence is rproc_shutdown -> rproc_stop ->rproc_stop_subdevices ->rproc->ops->stop() ->imx_dsp_rproc_stop ->flush_work -> rproc_vq_interrupt The resource needed by rproc_vq_interrupt has been released in rproc_stop_subdevices, so flush_work is not safe to be called in imx_dsp_rproc_stop. The Linux kernel CVE team has assigned CVE-2022-50426 to this issue. Affected and fixed versions =========================== Issue introduced in 5.16 with commit ec0e5549f3586d2cb99a05edd006d722ebad912c and fixed in 6.0.18 with commit 4a3e1fa7a77838617bdbcd95127ce93a959fad44 Issue introduced in 5.16 with commit ec0e5549f3586d2cb99a05edd006d722ebad912c and fixed in 6.1.4 with commit b9693304b7133b81741add5bfb56f022596df012 Issue introduced in 5.16 with commit ec0e5549f3586d2cb99a05edd006d722ebad912c and fixed in 6.2 with commit 47e6ab07018edebf94ce873cf50a05ec76ff2dde 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-2022-50426 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/imx_dsp_rproc.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/4a3e1fa7a77838617bdbcd95127ce93a959fad44 https://git.kernel.org/stable/c/b9693304b7133b81741add5bfb56f022596df012 https://git.kernel.org/stable/c/47e6ab07018edebf94ce873cf50a05ec76ff2dde