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 A85C931B804 for ; Mon, 15 Sep 2025 14:22:58 +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=1757946178; cv=none; b=jsg+tuk1HaeOb0ucCjJ1tx+q+BdvbGTrHGF5Fflkhi4KI67JrNCcSAW3VR8FniykdmgNUfDpvZ6q8fD/DFkZ7vlxbHPESDdTTlp7tOYbOZvAHdrg/vzGzQoeCeZ417JTjCK0rGFFwAWp1+V1NcxhsXDXC5BFN2/IsLnfoVtWBtc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757946178; c=relaxed/simple; bh=WEPo9XOYCHy2xzD+fd74dTVzmkynhj45mu/WWtDZFso=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=nYNwg/216g1BMBpbwawpiSoxHPEj6hOBkMHPgPzTDStNYREuKyK9q4LYi9LUSa8DKCU8XWTUd/Hzs8aIihuoGPAu2409E/hnrC3cz/OgYT0uqhbIyAi5cAkWV29hxwJde7zL5Q/UoCHtKz9ziHtaj5OWH43r04j7gmj7i1jCXWs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=19Z4XLpv; 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="19Z4XLpv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2DBDC4CEF1; Mon, 15 Sep 2025 14:22:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757946178; bh=WEPo9XOYCHy2xzD+fd74dTVzmkynhj45mu/WWtDZFso=; h=From:To:Cc:Subject:Date:Reply-to:From; b=19Z4XLpvNDgTAMVeGpfk+17LSdgntZtCbrH4OekTrjnfwZQjCL64mnZAB1+gZJShX n2oH3oC9cSYE7PB1ORwRiJsET4hVSD/a+EVJfLG5Q6kBmCsWCTLvRqPnD8jOXSjDD3 6wN4Xo0KG+nFBj8F7XcJYlg5ThCZ31QSd2ejZe9w= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50288: qlcnic: prevent ->dcb use-after-free on qlcnic_dcb_enable() failure Date: Mon, 15 Sep 2025 16:21:30 +0200 Message-ID: <2025091508-CVE-2022-50288-3421@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=3985; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=be1gbLQxXXXhCk+AxDXJVGJK2Pr55M5OpWlj/JTYv/Q=; b=owGbwMvMwCRo6H6F97bub03G02pJDBknFK4Ump6eEJU6ub1FPibp3sYPFc8qdvonzC/lOvwr4 0rMwfnXO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAieUkMC5ZvdGfX6PSI+Pud 97rJ01vPFDtOcTPMFTPlrr38r0Xz7Pk3/vd5di94EuetCwA= 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: qlcnic: prevent ->dcb use-after-free on qlcnic_dcb_enable() failure adapter->dcb would get silently freed inside qlcnic_dcb_enable() in case qlcnic_dcb_attach() would return an error, which always happens under OOM conditions. This would lead to use-after-free because both of the existing callers invoke qlcnic_dcb_get_info() on the obtained pointer, which is potentially freed at that point. Propagate errors from qlcnic_dcb_enable(), and instead free the dcb pointer at callsite using qlcnic_dcb_free(). This also removes the now unused qlcnic_clear_dcb_ops() helper, which was a simple wrapper around kfree() also causing memory leaks for partially initialized dcb. Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. The Linux kernel CVE team has assigned CVE-2022-50288 to this issue. Affected and fixed versions =========================== Issue introduced in 3.14 with commit 3c44bba1d270cb1620b4fe76786d0968118cb86b and fixed in 4.14.303 with commit 36999236f0b12d5de21a6f40e93b570727b9ceb2 Issue introduced in 3.14 with commit 3c44bba1d270cb1620b4fe76786d0968118cb86b and fixed in 4.19.270 with commit d12a7510293d3370b234b0b7c5eda33e58786768 Issue introduced in 3.14 with commit 3c44bba1d270cb1620b4fe76786d0968118cb86b and fixed in 5.4.229 with commit 8f97eeb02a553cdc78c83a0596448a370e1518c4 Issue introduced in 3.14 with commit 3c44bba1d270cb1620b4fe76786d0968118cb86b and fixed in 5.10.163 with commit 513787ff9a331b461115e8a145a983d650a84fcb Issue introduced in 3.14 with commit 3c44bba1d270cb1620b4fe76786d0968118cb86b and fixed in 5.15.87 with commit 95df720e64a6409d8152827a776c43f615e3321a Issue introduced in 3.14 with commit 3c44bba1d270cb1620b4fe76786d0968118cb86b and fixed in 6.0.19 with commit 8df1dc04ce0e4c03b51a756749c250a9cb17d707 Issue introduced in 3.14 with commit 3c44bba1d270cb1620b4fe76786d0968118cb86b and fixed in 6.1.5 with commit a2a694e6edbdb3efb34e1613a31fdcf6cf444a55 Issue introduced in 3.14 with commit 3c44bba1d270cb1620b4fe76786d0968118cb86b and fixed in 6.2 with commit 13a7c8964afcd8ca43c0b6001ebb0127baa95362 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-2022-50288 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/qlcnic/qlcnic_83xx_init.c drivers/net/ethernet/qlogic/qlcnic/qlcnic_dcb.h drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.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/36999236f0b12d5de21a6f40e93b570727b9ceb2 https://git.kernel.org/stable/c/d12a7510293d3370b234b0b7c5eda33e58786768 https://git.kernel.org/stable/c/8f97eeb02a553cdc78c83a0596448a370e1518c4 https://git.kernel.org/stable/c/513787ff9a331b461115e8a145a983d650a84fcb https://git.kernel.org/stable/c/95df720e64a6409d8152827a776c43f615e3321a https://git.kernel.org/stable/c/8df1dc04ce0e4c03b51a756749c250a9cb17d707 https://git.kernel.org/stable/c/a2a694e6edbdb3efb34e1613a31fdcf6cf444a55 https://git.kernel.org/stable/c/13a7c8964afcd8ca43c0b6001ebb0127baa95362