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 E0B7A148318 for ; Sat, 9 Nov 2024 10:16:06 +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=1731147367; cv=none; b=X0KJoPQdfFOEmrMwbxNRkufYCMDja5OaRGAImxqThLj4cCc3LP01edVWR5u6mHxGDQfiQALRCyRNrfxEGWQgdW4V0i4gZ6ExvSU56wf0Of4rOYIBIXI+Veqz2k6jLOJC4vyGdWAWrHSZo/OOmzRXTYkQ0ML38vNd+ci6RK6lTaI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731147367; c=relaxed/simple; bh=rGhH/AfZBzGpBwugcxi4sKzJ28qaQvqEPlSagM1xFcw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=VPrHa/+u1sdgqjH7lW4pQa9V6W+iYaaWv31K1cZwnVxNR0oCloOnnlp/w+8AS5FYUaOeHVQ9wRagywWRH++KoaFJ7YVBMSPmaedhUo6J5eztkw81xvFHSVBXiGm1Tk4WDYvGVoagp2ltjfNEEbHpEHZyqsT9FrW1beRtitdCAKg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=If0iku3q; 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="If0iku3q" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0AAE3C4CECE; Sat, 9 Nov 2024 10:16:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1731147366; bh=rGhH/AfZBzGpBwugcxi4sKzJ28qaQvqEPlSagM1xFcw=; h=From:To:Cc:Subject:Date:Reply-to:From; b=If0iku3qe1/COct87SCkCjiGlGFYWRs9hhwGJ4cg7AgWwqP7l5mhS9PINhl+Pvgum LMKAf5RFyl6cyt4d0XNtm6Z7XatSc5dzCdZNtkuEYPAkT6nVVXa2M3F/B2P1IUqFIl MaxhdU8ZPMnDXS/0jdd5OshBctx8+NP33UEi0O+4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50214: drm/connector: hdmi: Fix memory leak in drm_display_mode_from_cea_vic() Date: Sat, 9 Nov 2024 11:15:22 +0100 Message-ID: <2024110923-CVE-2024-50214-12f6@gregkh> X-Mailer: git-send-email 2.47.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=2832; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=rGhH/AfZBzGpBwugcxi4sKzJ28qaQvqEPlSagM1xFcw=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn6Zjbr//LvfZIucMPM3CLN9fnb38GHjttKet/+UhfRd +j77Vu3O2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAij3cxzK83rD76fO6EQ3VX fpUZ2n4yUTObK8Ywi0lYIZv/SF5jWs2KM5/r7H0XfdGoAQA= 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: drm/connector: hdmi: Fix memory leak in drm_display_mode_from_cea_vic() modprobe drm_connector_test and then rmmod drm_connector_test, the following memory leak occurs. The `mode` allocated in drm_mode_duplicate() called by drm_display_mode_from_cea_vic() is not freed, which cause the memory leak: unreferenced object 0xffffff80cb0ee400 (size 128): comm "kunit_try_catch", pid 1948, jiffies 4294950339 hex dump (first 32 bytes): 14 44 02 00 80 07 d8 07 04 08 98 08 00 00 38 04 .D............8. 3c 04 41 04 65 04 00 00 05 00 00 00 00 00 00 00 <.A.e........... backtrace (crc 90e9585c): [<00000000ec42e3d7>] kmemleak_alloc+0x34/0x40 [<00000000d0ef055a>] __kmalloc_cache_noprof+0x26c/0x2f4 [<00000000c2062161>] drm_mode_duplicate+0x44/0x19c [<00000000f96c74aa>] drm_display_mode_from_cea_vic+0x88/0x98 [<00000000d8f2c8b4>] 0xffffffdc982a4868 [<000000005d164dbc>] kunit_try_run_case+0x13c/0x3ac [<000000006fb23398>] kunit_generic_run_threadfn_adapter+0x80/0xec [<000000006ea56ca0>] kthread+0x2e8/0x374 [<000000000676063f>] ret_from_fork+0x10/0x20 ...... Free `mode` by using drm_kunit_display_mode_from_cea_vic() to fix it. The Linux kernel CVE team has assigned CVE-2024-50214 to this issue. Affected and fixed versions =========================== Issue introduced in 6.11 with commit abb6f74973e2 and fixed in 6.11.7 with commit df2b00685cd3 Issue introduced in 6.11 with commit abb6f74973e2 and fixed in 6.12-rc6 with commit 926163342a2e 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-50214 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/gpu/drm/tests/drm_connector_test.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/df2b00685cd33cd85be8910c7d6d22c4ebbf18bb https://git.kernel.org/stable/c/926163342a2e7595d950e84c17c693b1272bd491