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 E608B339B24 for ; Wed, 24 Dec 2025 13:07:57 +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=1766581678; cv=none; b=Fw36JWlFLXd1w0cbC0ZUAXm6FlqjwDXRdPao4p9hT2OPzPCcacy0E4nMtabPZNc5683CaklJRd7yIIzRYgBny61tc71Y8+c4u8eWkhKstbAWTfUWGHUytRx87DXYEqx5ESwij+H9+MJxKGt49FYQlJ1T6v5dRhmx47KlFGVrzw8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766581678; c=relaxed/simple; bh=RbEn9Wa+7s7suYlI3+i8jjJ28YkMSDt7+Dp7P4is6vM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=WWW5kYRYerWp+XpuIJ6nk72zZKzSSC2n4q6lS3dzunCKXQZCtXf3o3dIJuRQCxMLnTohwJa6SIwj4xJN+nAjJgNVFKdPjD7Ujkq3YUy07g2PPYYfRChtbzS6eH3wpzFoMt26m0W7QLyaJi4H/Tn+nU5a5jSRysAL4VsWzc+xVV0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=LRdMhfVN; 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="LRdMhfVN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31AE7C116D0; Wed, 24 Dec 2025 13:07:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1766581677; bh=RbEn9Wa+7s7suYlI3+i8jjJ28YkMSDt7+Dp7P4is6vM=; h=From:To:Cc:Subject:Date:Reply-To:From; b=LRdMhfVNNJVDPUQHJmHXN7Zusd1r4mkpB3DxgDoNGRXlhUZ0zdl0em1jcErqC9EUL +Q6qqZjzt+i1eSRnKRqcJKj8oMLy/laOIbt/iZ7VaL2SpDXV871tGq6nOMTPwrSfuQ vneWbjE7sTZgL/3Av32zJ15QbsVeFOr8ppKiftcI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50745: staging: media: tegra-video: fix device_node use after free Date: Wed, 24 Dec 2025 14:05:56 +0100 Message-ID: <2025122450-CVE-2022-50745-af5c@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=3186; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=uApfVxqc1JEic/YRV5XtZSNsudno7vDAHA81FglWjvU=; b=owGbwMvMwCRo6H6F97bub03G02pJDJneT/WEz/q0TP1mMfkB59cCPz5V7jVaG42dWc95hO94O /s299KqjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjItHsM80zntR/aYm+bfbVV fNONlsBJcx4/MGNYcCw99NCbWMXbP78oNCcKluznY/LfCAA= 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: staging: media: tegra-video: fix device_node use after free At probe time this code path is followed: * tegra_csi_init * tegra_csi_channels_alloc * for_each_child_of_node(node, channel) -- iterates over channels * automatically gets 'channel' * tegra_csi_channel_alloc() * saves into chan->of_node a pointer to the channel OF node * automatically gets and puts 'channel' * now the node saved in chan->of_node has refcount 0, can disappear * tegra_csi_channels_init * iterates over channels * tegra_csi_channel_init -- uses chan->of_node After that, chan->of_node keeps storing the node until the device is removed. of_node_get() the node and of_node_put() it during teardown to avoid any risk. The Linux kernel CVE team has assigned CVE-2022-50745 to this issue. Affected and fixed versions =========================== Issue introduced in 5.10 with commit 1ebaeb09830f36c1111b72a95420814225bd761c and fixed in 5.10.163 with commit 5451efb2ca30f3c42b9efb8327ce35b62870dbd3 Issue introduced in 5.10 with commit 1ebaeb09830f36c1111b72a95420814225bd761c and fixed in 5.15.87 with commit ce50c612458091d926ccb05d7db11d9f93532db2 Issue introduced in 5.10 with commit 1ebaeb09830f36c1111b72a95420814225bd761c and fixed in 6.0.18 with commit 6512c9498fcb97e7c760e3ef86b2272f2c0f765f Issue introduced in 5.10 with commit 1ebaeb09830f36c1111b72a95420814225bd761c and fixed in 6.1.4 with commit 0fd003d3c708c80350a815eaf37b8e1114b976cf Issue introduced in 5.10 with commit 1ebaeb09830f36c1111b72a95420814225bd761c and fixed in 6.2 with commit c4d344163c3a7f90712525f931a6c016bbb35e18 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-50745 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/staging/media/tegra-video/csi.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/5451efb2ca30f3c42b9efb8327ce35b62870dbd3 https://git.kernel.org/stable/c/ce50c612458091d926ccb05d7db11d9f93532db2 https://git.kernel.org/stable/c/6512c9498fcb97e7c760e3ef86b2272f2c0f765f https://git.kernel.org/stable/c/0fd003d3c708c80350a815eaf37b8e1114b976cf https://git.kernel.org/stable/c/c4d344163c3a7f90712525f931a6c016bbb35e18