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 67667233D8E for ; Sat, 9 Nov 2024 10:15:45 +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=1731147345; cv=none; b=V6eNxWV8vUzK9lJrnWLG2g2/EU5/TcqGQkbFT677kwoDbE8iGXcO352m/xJdv542m7dGJFELjqIUk/AMo/Vt0SwlvH3lUZU/867c0i9OL5ecCTj4zSVB2eXT7W1zMPDMExe97DNGsLMfKK+jaYQztKoPFhm3e6VatD8XKMostnM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731147345; c=relaxed/simple; bh=U+IQJCnmTpvrYKbf9aTs/BDh+Nqlcna0AY+OVWsm/3c=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=qzOAfAlVIbcedxKHHW8wxLwNSdCPjR4YI8N4bVvTP3/MUgWvF6A4mmv5KI96XePtc4XIb40v+M1fblMsGXxdSkSINJXs9OiLzVohNDBDkPw8RV5xErDI19d4AbgtREvNIx1nbZNoo5yUJWw/bXB7NmVXgFScxwiwq2e5YRP1+Ms= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=nKsZvau6; 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="nKsZvau6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 76E7BC4CECE; Sat, 9 Nov 2024 10:15:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1731147344; bh=U+IQJCnmTpvrYKbf9aTs/BDh+Nqlcna0AY+OVWsm/3c=; h=From:To:Cc:Subject:Date:Reply-to:From; b=nKsZvau6PWN0XAxAylgjROhImYnpTRud466rRmvW1wNtI4OhorIVG/BkhO+u87i2K 3Sq5xxX3JJA2rD5nc+NqItdtNM7F/BCH+jzQvkq3MYC6XaITALb9Ni6LiUpvQAvUBw hHriu3+6pjF4PW1YAKKKjfNaH2HbFp0+S5KCnqMI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50213: drm/tests: hdmi: Fix memory leaks in drm_display_mode_from_cea_vic() Date: Sat, 9 Nov 2024 11:15:21 +0100 Message-ID: <2024110923-CVE-2024-50213-6347@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=2829; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=U+IQJCnmTpvrYKbf9aTs/BDh+Nqlcna0AY+OVWsm/3c=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn6Zta+f527Jyw8ZlzIzlT5gmVX9LKGM7t1Py3M/2D2f GHehx2tHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjARPUmGeUqyohMZZpd163wM XLDJdX3MggUFhQzz01KVzS7fF/2eaMR1fKr0ndSZp7fsBgA= 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/tests: hdmi: Fix memory leaks in drm_display_mode_from_cea_vic() modprobe drm_hdmi_state_helper_test and then rmmod it, 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 0xffffff80ccd18100 (size 128): comm "kunit_try_catch", pid 1851, jiffies 4295059695 hex dump (first 32 bytes): 57 62 00 00 80 02 90 02 f0 02 20 03 00 00 e0 01 Wb........ ..... ea 01 ec 01 0d 02 00 00 0a 00 00 00 00 00 00 00 ................ backtrace (crc c2f1aa95): [<000000000f10b11b>] kmemleak_alloc+0x34/0x40 [<000000001cd4cf73>] __kmalloc_cache_noprof+0x26c/0x2f4 [<00000000f1f3cffa>] drm_mode_duplicate+0x44/0x19c [<000000008cbeef13>] drm_display_mode_from_cea_vic+0x88/0x98 [<0000000019daaacf>] 0xffffffedc11ae69c [<000000000aad0f85>] kunit_try_run_case+0x13c/0x3ac [<00000000a9210bac>] kunit_generic_run_threadfn_adapter+0x80/0xec [<000000000a0b2e9e>] kthread+0x2e8/0x374 [<00000000bd668858>] 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-50213 to this issue. Affected and fixed versions =========================== Issue introduced in 6.11 with commit 4af70f19e559 and fixed in 6.11.7 with commit 3bc3fae8a0f2 Issue introduced in 6.11 with commit 4af70f19e559 and fixed in 6.12-rc6 with commit add4163aca0d 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-50213 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_hdmi_state_helper_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/3bc3fae8a0f22e0e713729b50e2111f6a8c64724 https://git.kernel.org/stable/c/add4163aca0d4a86e9fe4aa513865e4237db8aef