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 4BE2945009 for ; Sat, 4 Oct 2025 07:34:02 +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=1759563243; cv=none; b=jRmK9mF1L6b15dLn8ROyqalzqthOOoJG2w1Gj4Y2bI2Q85xx27I9RFb9ACUcKyE1u4jye/1wg8WPxdE9I1AJcGBCQkCaQxIgjgzRqWzc/8oaAOXGz8qtyLM/zNWNOsEnbKu8jw/LLTNtpCpRvKSsjL2jEwoXU/immPJ9rFe/ckA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759563243; c=relaxed/simple; bh=dtMkmEgWYc6yQmVL2y84hJhmaWpp638NifciU4qd7IE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=RhHFa0IlmOLdxowPlSrWJPKCj3zYgl113EojaFecHtvC6dpkDTXwgSGpC9e6mVrjGEFkc9YNESwrs0JksmXEgmnF37WqUDsbHHujzPVMTVJDcjadZsq+zWb299oUiq7UuoX3mnz02ez/YZiElCxAdFHifo/mvVk/S1SkV06PSos= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=HLdl90hv; 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="HLdl90hv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 81D50C4CEF1; Sat, 4 Oct 2025 07:34:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1759563241; bh=dtMkmEgWYc6yQmVL2y84hJhmaWpp638NifciU4qd7IE=; h=From:To:Cc:Subject:Date:Reply-to:From; b=HLdl90hvrIytPcGPtHRWtzgzaaN4SPWkyKdnjD0oV11kSFYkoMvy2thMQXNm0IXu8 1EBO/bDMLoQyPrh7EokeHkuGd9qwMl+ayxWnw/nHZl77qeaaOfdBV2o+a2y7r9ljpr EzMbantw/sgTWBD3+oz247L/yoUvz3wdfMl40xmI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-39949: qed: Don't collect too many protection override GRC elements Date: Sat, 4 Oct 2025 09:33:33 +0200 Message-ID: <2025100420-CVE-2025-39949-d909@gregkh> X-Mailer: git-send-email 2.51.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=4569; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=wf+iGu/lgAMrzLIg9bNyZfaX9Nn5cFLrc4xawo6L0U8=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkPzh54oSs5rzhvZcLcKwGRK+JOmLz44le9LaH+mV/8h zavtcdWd8SyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBELNsY5srY7Tp0SeoY+7eK 80Uv18peURU2r2BYcPHMpd16LqYxOtWfErYLHp67cpX0RQA= 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: qed: Don't collect too many protection override GRC elements In the protection override dump path, the firmware can return far too many GRC elements, resulting in attempting to write past the end of the previously-kmalloc'ed dump buffer. This will result in a kernel panic with reason: BUG: unable to handle kernel paging request at ADDRESS where "ADDRESS" is just past the end of the protection override dump buffer. The start address of the buffer is: p_hwfn->cdev->dbg_features[DBG_FEATURE_PROTECTION_OVERRIDE].dump_buf and the size of the buffer is buf_size in the same data structure. The panic can be arrived at from either the qede Ethernet driver path: [exception RIP: qed_grc_dump_addr_range+0x108] qed_protection_override_dump at ffffffffc02662ed [qed] qed_dbg_protection_override_dump at ffffffffc0267792 [qed] qed_dbg_feature at ffffffffc026aa8f [qed] qed_dbg_all_data at ffffffffc026b211 [qed] qed_fw_fatal_reporter_dump at ffffffffc027298a [qed] devlink_health_do_dump at ffffffff82497f61 devlink_health_report at ffffffff8249cf29 qed_report_fatal_error at ffffffffc0272baf [qed] qede_sp_task at ffffffffc045ed32 [qede] process_one_work at ffffffff81d19783 or the qedf storage driver path: [exception RIP: qed_grc_dump_addr_range+0x108] qed_protection_override_dump at ffffffffc068b2ed [qed] qed_dbg_protection_override_dump at ffffffffc068c792 [qed] qed_dbg_feature at ffffffffc068fa8f [qed] qed_dbg_all_data at ffffffffc0690211 [qed] qed_fw_fatal_reporter_dump at ffffffffc069798a [qed] devlink_health_do_dump at ffffffff8aa95e51 devlink_health_report at ffffffff8aa9ae19 qed_report_fatal_error at ffffffffc0697baf [qed] qed_hw_err_notify at ffffffffc06d32d7 [qed] qed_spq_post at ffffffffc06b1011 [qed] qed_fcoe_destroy_conn at ffffffffc06b2e91 [qed] qedf_cleanup_fcport at ffffffffc05e7597 [qedf] qedf_rport_event_handler at ffffffffc05e7bf7 [qedf] fc_rport_work at ffffffffc02da715 [libfc] process_one_work at ffffffff8a319663 Resolve this by clamping the firmware's return value to the maximum number of legal elements the firmware should return. The Linux kernel CVE team has assigned CVE-2025-39949 to this issue. Affected and fixed versions =========================== Issue introduced in 4.18 with commit d52c89f120de849575f6b2e5948038f2be12ce6f and fixed in 6.1.154 with commit 8141910869596b7a3a5d9b46107da2191d523f82 Issue introduced in 4.18 with commit d52c89f120de849575f6b2e5948038f2be12ce6f and fixed in 6.6.108 with commit ea53e6a47e148b490b1c652fc65d2de5a086df76 Issue introduced in 4.18 with commit d52c89f120de849575f6b2e5948038f2be12ce6f and fixed in 6.12.49 with commit 660b2a8f5a306a28c7efc1b4990ecc4912a68f87 Issue introduced in 4.18 with commit d52c89f120de849575f6b2e5948038f2be12ce6f and fixed in 6.16.9 with commit 70affe82e38fd3dc76b9c68b5a1989f11e7fa0f3 Issue introduced in 4.18 with commit d52c89f120de849575f6b2e5948038f2be12ce6f and fixed in 6.17 with commit 56c0a2a9ddc2f5b5078c5fb0f81ab76bbc3d4c37 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-39949 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/net/ethernet/qlogic/qed/qed_debug.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/8141910869596b7a3a5d9b46107da2191d523f82 https://git.kernel.org/stable/c/ea53e6a47e148b490b1c652fc65d2de5a086df76 https://git.kernel.org/stable/c/660b2a8f5a306a28c7efc1b4990ecc4912a68f87 https://git.kernel.org/stable/c/70affe82e38fd3dc76b9c68b5a1989f11e7fa0f3 https://git.kernel.org/stable/c/56c0a2a9ddc2f5b5078c5fb0f81ab76bbc3d4c37