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 B4696145348 for ; Wed, 18 Jun 2025 11:03: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=1750244614; cv=none; b=jbLVczkHHZcEd4dKRTEcOd1illJjJhAIc86e9zlMNNbegz2q4PsQYnzcjTntYn1h5Seehiz+h1VjLIQDgdyryfTrBqhusNoFPxIWGuwpH0mJ+VrJb6PKgVfgqUgHRUBY2QOj4Ex2kcdW/od4sUkjx4Uhsji7YVYj7S+Us1rR7/o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750244614; c=relaxed/simple; bh=7uc9dlZ9iXZpvck3IrI2mtlVFzM55o0EIByP1ijg88Y=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=SpoBif7pmmPlIR6ZcBiBRCJNTQGvSShq3RjUReJsA5PSNGcGfGJXoQqjupJZXY/eScOjAjmE0+cuF52Jvuithh+n3wcCnh/slN9fot8s2GoK3AUQdLazW2LBRvXMf/m3dkwXH7f1gWseac7wxF8hu1PcCs8qa0KW5DbIZShM4i4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mBVl/Uh2; 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="mBVl/Uh2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 442A6C4CEE7; Wed, 18 Jun 2025 11:03:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750244614; bh=7uc9dlZ9iXZpvck3IrI2mtlVFzM55o0EIByP1ijg88Y=; h=From:To:Cc:Subject:Date:Reply-to:From; b=mBVl/Uh2+8EdiJvC9q5knInSh4MI4zGCSIl6yEanY0oQohGoZ+FIMiIIU8i3+JNMH tJiGPmT1p9rRFDclWUzM3U+Fxl+ZFGe+odeZq8HZOeffCWztsoC2WkGZmXeQ1a/Hg/ vD4WY1XuL/rAiYKF21sQNIJYAVUEavDEKT0KwiZ4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49982: media: pvrusb2: fix memory leak in pvr_probe Date: Wed, 18 Jun 2025 13:00:47 +0200 Message-ID: <2025061821-CVE-2022-49982-cb7f@gregkh> X-Mailer: git-send-email 2.49.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=2844; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=jOTOTqYYmuATBod92ul+kWEn9nhzowCaxCg/MOoQEmE=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlBc1yzX8544ZKuyj377VrOiYlBm6WCZY5Z/VWJ+Kd9f clhE4uFHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCR8kyG+Sm3om8xR2cyrnq0 p3Xe9TdyDh7lYgwLNut3bWn53Cs/eVOI2Xb23bYPHrsuAgA= 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: media: pvrusb2: fix memory leak in pvr_probe The error handling code in pvr2_hdw_create forgets to unregister the v4l2 device. When pvr2_hdw_create returns back to pvr2_context_create, it calls pvr2_context_destroy to destroy context, but mp->hdw is NULL, which leads to that pvr2_hdw_destroy directly returns. Fix this by adding v4l2_device_unregister to decrease the refcount of usb interface. The Linux kernel CVE team has assigned CVE-2022-49982 to this issue. Affected and fixed versions =========================== Fixed in 4.9.327 with commit 2fe46195d2f0d5d09ea65433aefe47a4d0d0ff4d Fixed in 4.14.292 with commit ba7dd8a9686a61a34b3a7b922ce721378d4740d0 Fixed in 4.19.257 with commit 491762b3250fb06a0c97b5198656ea48359eaeed Fixed in 5.4.212 with commit 466b67c0543b2ae67814d053f6e29b39be6b33bb Fixed in 5.10.141 with commit bacb37bdc2a21c8f7fdc83dcc0dea2f4ca1341fb Fixed in 5.15.65 with commit f2f6e67522916f53ad8ccd4dbe68dcf76e9776e5 Fixed in 5.19.7 with commit c02d2a91a85c4c4d05826cd1ea74a9b8d42e4280 Fixed in 6.0 with commit 945a9a8e448b65bec055d37eba58f711b39f66f0 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-49982 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/media/usb/pvrusb2/pvrusb2-hdw.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/2fe46195d2f0d5d09ea65433aefe47a4d0d0ff4d https://git.kernel.org/stable/c/ba7dd8a9686a61a34b3a7b922ce721378d4740d0 https://git.kernel.org/stable/c/491762b3250fb06a0c97b5198656ea48359eaeed https://git.kernel.org/stable/c/466b67c0543b2ae67814d053f6e29b39be6b33bb https://git.kernel.org/stable/c/bacb37bdc2a21c8f7fdc83dcc0dea2f4ca1341fb https://git.kernel.org/stable/c/f2f6e67522916f53ad8ccd4dbe68dcf76e9776e5 https://git.kernel.org/stable/c/c02d2a91a85c4c4d05826cd1ea74a9b8d42e4280 https://git.kernel.org/stable/c/945a9a8e448b65bec055d37eba58f711b39f66f0