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 4A9CD20CCD9 for ; Tue, 1 Apr 2025 15:48:40 +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=1743522520; cv=none; b=cUg8GlwOlJkrXeGPU0aeH1i9+p5Ie7XtLXpRCV7kKddF8eaXmi3eciczJsF3O0n2uAZLiR9qq4cFJpX0ZcdxWLDa3IsNfRcKWHDRJ+i+EGIDeVTBYu/zekkpfBpt+JbkFM3KzZH9pB+v33Mke8pjMr/ejw927cEbKgiP8ORovU8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743522520; c=relaxed/simple; bh=rD5cQWOG4S6XN8LqviOi6ayw5fJ1k/d/Of9u1wueGz4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=aTYrZbQ2evpJY5ezZV0Pig2i3CvoI5xgoKf+ncujT8OHFrEd2mTbT0vjiQ+ffS7lHji8RfVQoYXHOaoA2C6FfXCeA/UkYNQABYS5Y5zBWE78utduQd+owzjMHlh19t0fgW+wD/S8MJ/q2wPucVfCod48/ovXbAybGlvKmjqjDRE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=KThqPgPd; 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="KThqPgPd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3E59C4CEE4; Tue, 1 Apr 2025 15:48:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1743522520; bh=rD5cQWOG4S6XN8LqviOi6ayw5fJ1k/d/Of9u1wueGz4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=KThqPgPdlPqKVG98QCSndqeRHyN4JN+EBrcA7p5x2pekpcDN9fLMWKF+H3tlJ/fVG M0OsAwe8HNJvQ0eisw6yem/eU/ev/5V58ITwSHE/5AJOgjKU+NpCW6aa+ZSfE+onmJ /+53UPzTF1/uKgsCv35p4GzW/qPdLKmqp71XcdqI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21976: fbdev: hyperv_fb: Allow graceful removal of framebuffer Date: Tue, 1 Apr 2025 16:46:01 +0100 Message-ID: <2025040147-CVE-2025-21976-340d@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=3265; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=rD5cQWOG4S6XN8LqviOi6ayw5fJ1k/d/Of9u1wueGz4=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlvuLRl7wvuCOftd/0wh1n5WvmNU6nGrAFn54i5rdv3M 33GPscLHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRP4wM85Otb29L0pPdzGAT IOcfuzgoSkWmhGHBYgHLrq38P29lx92IXzL9b9aupIV1AA== 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: fbdev: hyperv_fb: Allow graceful removal of framebuffer When a Hyper-V framebuffer device is unbind, hyperv_fb driver tries to release the framebuffer forcefully. If this framebuffer is in use it produce the following WARN and hence this framebuffer is never released. [ 44.111220] WARNING: CPU: 35 PID: 1882 at drivers/video/fbdev/core/fb_info.c:70 framebuffer_release+0x2c/0x40 < snip > [ 44.111289] Call Trace: [ 44.111290] [ 44.111291] ? show_regs+0x6c/0x80 [ 44.111295] ? __warn+0x8d/0x150 [ 44.111298] ? framebuffer_release+0x2c/0x40 [ 44.111300] ? report_bug+0x182/0x1b0 [ 44.111303] ? handle_bug+0x6e/0xb0 [ 44.111306] ? exc_invalid_op+0x18/0x80 [ 44.111308] ? asm_exc_invalid_op+0x1b/0x20 [ 44.111311] ? framebuffer_release+0x2c/0x40 [ 44.111313] ? hvfb_remove+0x86/0xa0 [hyperv_fb] [ 44.111315] vmbus_remove+0x24/0x40 [hv_vmbus] [ 44.111323] device_remove+0x40/0x80 [ 44.111325] device_release_driver_internal+0x20b/0x270 [ 44.111327] ? bus_find_device+0xb3/0xf0 Fix this by moving the release of framebuffer and assosiated memory to fb_ops.fb_destroy function, so that framebuffer framework handles it gracefully. While we fix this, also replace manual registrations/unregistration of framebuffer with devm_register_framebuffer. The Linux kernel CVE team has assigned CVE-2025-21976 to this issue. Affected and fixed versions =========================== Issue introduced in 3.10 with commit 68a2d20b79b105f02dcbc52c211d7e62f98996b7 and fixed in 6.12.20 with commit 4545e2aa121aea304d33903099c03e29ed4fe50a Issue introduced in 3.10 with commit 68a2d20b79b105f02dcbc52c211d7e62f98996b7 and fixed in 6.13.8 with commit a7b583dc99c6cf4a96877017be1d08247e1ef2c7 Issue introduced in 3.10 with commit 68a2d20b79b105f02dcbc52c211d7e62f98996b7 and fixed in 6.14 with commit ea2f45ab0e53b255f72c85ccd99e2b394fc5fceb 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-2025-21976 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/video/fbdev/hyperv_fb.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/4545e2aa121aea304d33903099c03e29ed4fe50a https://git.kernel.org/stable/c/a7b583dc99c6cf4a96877017be1d08247e1ef2c7 https://git.kernel.org/stable/c/ea2f45ab0e53b255f72c85ccd99e2b394fc5fceb