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 C23FC334C16 for ; Wed, 24 Dec 2025 12:28:23 +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=1766579303; cv=none; b=o4ydc4xFDcggxzx2KkV0qeNvjcHEBNBROVv6frg6PfqXehOLmHTVF93iOs++LK842Iybhn/TTznbZGRd3UYc1/eC92x8JP8/etpRrqql+j7x5Nt6cZo2OqAdkQ5zL0Gjq39rZi1mSc6gtQZqOecw1XLC3U4neCwvgGbKEvLkqU8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766579303; c=relaxed/simple; bh=T4BWrVrA7UeSMxGD/4izSHukIkvsOSGd/rZbAaJpH48=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=eB5c5AOxD0WV7bvxioJx5nd+0FGmVJFOoAWp9nQ1qYoqLAn2CcABu2cpWV5eXzaH30ePl2Ab6j/FoPltlMSwcLvjfmHlASEuwA6y8aSqfDIlf8kPWklp9Tp9dXiCSgzd/jQHzOCoQLBXBjsshwmGjfeqpTyLM8xRaYpXD0Dr0YE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ECMKilty; 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="ECMKilty" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 117F1C4CEFB; Wed, 24 Dec 2025 12:28:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1766579303; bh=T4BWrVrA7UeSMxGD/4izSHukIkvsOSGd/rZbAaJpH48=; h=From:To:Cc:Subject:Date:Reply-To:From; b=ECMKiltyVPsx0irq9DqYv5vZ4yfwdXqAZ86KtmriO7Y9YSb0BaMfBrKMPcKGTAqRN 4bn7QVz85m2bv+Lwcl/JN0S1ee+2Oq/QdRmGLOE0gGQk/g9UQoUbb2k2UjTIlj/dul lw1l3Fp9JcAiDvQqhPeIScSytJEeG2C8aFsE5fj8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50721: dmaengine: qcom-adm: fix wrong calling convention for prep_slave_sg Date: Wed, 24 Dec 2025 13:26:20 +0100 Message-ID: <2025122417-CVE-2022-50721-9683@gregkh> X-Mailer: git-send-email 2.52.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=2712; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=aeoaqB5VqxaQfQT9e+ZOFhqzFZsUsafP384dBdIKAcQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnet19qtGVkOIQUxtxbIMr4LmzpURfDM6UbUhUK3vIaH uT7kh7QEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABPh+cEwT8uQWUvfsmnHH7+w PONj63ceczjzhmF+/ARv9gOVDU8dnL2+HpygG3pi4l5zAA== 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: dmaengine: qcom-adm: fix wrong calling convention for prep_slave_sg The calling convention for pre_slave_sg is to return NULL on error and provide an error log to the system. Qcom-adm instead provide error pointer when an error occur. This indirectly cause kernel panic for example for the nandc driver that checks only if the pointer returned by device_prep_slave_sg is not NULL. Returning an error pointer makes nandc think the device_prep_slave_sg function correctly completed and makes the kernel panics later in the code. While nandc is the one that makes the kernel crash, it was pointed out that the real problem is qcom-adm not following calling convention for that function. To fix this, drop returning error pointer and return NULL with an error log. The Linux kernel CVE team has assigned CVE-2022-50721 to this issue. Affected and fixed versions =========================== Issue introduced in 5.11 with commit 5c9f8c2dbdbe53818bcde6aa6695e1331e5f841f and fixed in 5.19.17 with commit 5653bd0200944e5803fa8e32dc36aa49931312f9 Issue introduced in 5.11 with commit 5c9f8c2dbdbe53818bcde6aa6695e1331e5f841f and fixed in 6.0.3 with commit 9a041174c58a226e713f6cebd41eccec7a5cfa72 Issue introduced in 5.11 with commit 5c9f8c2dbdbe53818bcde6aa6695e1331e5f841f and fixed in 6.1 with commit b9d2140c3badf4107973ad77c5a0ec3075705c85 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-50721 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/dma/qcom/qcom_adm.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/5653bd0200944e5803fa8e32dc36aa49931312f9 https://git.kernel.org/stable/c/9a041174c58a226e713f6cebd41eccec7a5cfa72 https://git.kernel.org/stable/c/b9d2140c3badf4107973ad77c5a0ec3075705c85