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 3CDD1433D4 for ; Wed, 1 May 2024 12:57:52 +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=1714568272; cv=none; b=s442gAmdfoNAc3ZdgV9sdAU8DcSXFJv/1mmBftXx4Wm/SU5JAKDNmM7viuIi/Gu+hQEWsHthBANCQRwOn7bhI7uQx5es8Z7NjVKzxKD6y75HNJ1Eh5cGrz4vDUbYMfTb8By/GK5ZVGVkFuqeU1ktqgoSwKVHm+x4ri3V/3JrPh4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714568272; c=relaxed/simple; bh=b6hooOXbLLQwJYeuykBdAMydIshHvcrFklbLOnKVFos=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=RggyrBly+1og9FE5UF8Sp8vmxa/mcthnop5LxlgjfN2B9YOP3W9vTYu4GrYFOSmpTVO2KsdkUaeLTIf/hb6w+otJGZTLIUjHs6ueMaVNYeu32pgZELCYgRQPGOPfr6fCqjZ2EhMdOVBUYAmeIU8CVXavzCiAVfBbGBs6r6ByS/I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=VeWRuUvH; 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="VeWRuUvH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC922C113CC; Wed, 1 May 2024 12:57:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1714568272; bh=b6hooOXbLLQwJYeuykBdAMydIshHvcrFklbLOnKVFos=; h=From:To:Cc:Subject:Date:Reply-to:From; b=VeWRuUvH6D3GoGK0RDgyJ+Y2ROScDbLHIDCfC9ToNdQP9XJyoTH/ldP0z2mtOM4k/ D1FcmO0n2Abp7Yxv7VOVkVOlKZW94mbLzJdm6cAOUZ46sV+TfwT4bZJIgdw8hWKiWV bEwEMtVbcwDVKxoB1vgwSyYzXZr5Sj8entIZewfs= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-27043: media: edia: dvbdev: fix a use-after-free Date: Wed, 1 May 2024 14:57:28 +0200 Message-ID: <2024050113-CVE-2024-27043-f2fb@gregkh> X-Mailer: git-send-email 2.44.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=3630; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=b6hooOXbLLQwJYeuykBdAMydIshHvcrFklbLOnKVFos=; b=owGbwMvMwCRo6H6F97bub03G02pJDGlGNpobLWZMsZpRJWuptn5NItsy0+DHkj5F1To9WXcdV W7UztzdEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABNhXsswz0Tm04129zqLSV9S Kt1ONxRwPA5lYpgfZLzqwOtnWQJ1GxL59H81/i/s0doMAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: media: edia: dvbdev: fix a use-after-free In dvb_register_device, *pdvbdev is set equal to dvbdev, which is freed in several error-handling paths. However, *pdvbdev is not set to NULL after dvbdev's deallocation, causing use-after-frees in many places, for example, in the following call chain: budget_register |-> dvb_dmxdev_init |-> dvb_register_device |-> dvb_dmxdev_release |-> dvb_unregister_device |-> dvb_remove_device |-> dvb_device_put |-> kref_put When calling dvb_unregister_device, dmxdev->dvbdev (i.e. *pdvbdev in dvb_register_device) could point to memory that had been freed in dvb_register_device. Thereafter, this pointer is transferred to kref_put and triggering a use-after-free. The Linux kernel CVE team has assigned CVE-2024-27043 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.21 with commit b61901024776 and fixed in 4.19.311 with commit d0f5c2833382 Issue introduced in 2.6.21 with commit b61901024776 and fixed in 5.4.273 with commit f20c3270f3ed Issue introduced in 2.6.21 with commit b61901024776 and fixed in 5.10.214 with commit 096237039d00 Issue introduced in 2.6.21 with commit b61901024776 and fixed in 5.15.153 with commit 0d3fe80b6d17 Issue introduced in 2.6.21 with commit b61901024776 and fixed in 6.1.83 with commit 437a111f79a2 Issue introduced in 2.6.21 with commit b61901024776 and fixed in 6.6.23 with commit 779e8db7efb2 Issue introduced in 2.6.21 with commit b61901024776 and fixed in 6.7.11 with commit 35674111a043 Issue introduced in 2.6.21 with commit b61901024776 and fixed in 6.8.2 with commit b7586e902128 Issue introduced in 2.6.21 with commit b61901024776 and fixed in 6.9-rc1 with commit 8c64f4cdf4e6 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-2024-27043 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/dvb-core/dvbdev.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/d0f5c28333822f9baa5280d813124920720fd856 https://git.kernel.org/stable/c/f20c3270f3ed5aa6919a87e4de9bf6c05fb57086 https://git.kernel.org/stable/c/096237039d00c839f3e3a5fe6d001bf0db45b644 https://git.kernel.org/stable/c/0d3fe80b6d175c220b3e252efc6c6777e700e98e https://git.kernel.org/stable/c/437a111f79a2f5b2a5f21e27fdec6f40c8768712 https://git.kernel.org/stable/c/779e8db7efb22316c8581d6c229636d2f5694a62 https://git.kernel.org/stable/c/35674111a043b0482a9bc69da8850a83f465b07d https://git.kernel.org/stable/c/b7586e902128e4fb7bfbb661cb52e4215a65637b https://git.kernel.org/stable/c/8c64f4cdf4e6cc5682c52523713af8c39c94e6d5