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 A4CB512CDA8 for ; Fri, 24 May 2024 15:10:23 +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=1716563423; cv=none; b=lUCVXF0BQwuDuAf+8VgLfGlGEK6Ir59FrZfxjje0ImncyjD+CltgptBaRRKtPdqn9pE8I20xUXRlJ/qI2pQyBcyLj2sDcrCb+cW/Tk1y29+aioistWAme5W0NgqfY8b1mx1cKJ6Q3xGRxQKanz+36HfC/aiSm2A4kTIpQLK24rc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716563423; c=relaxed/simple; bh=XOghLzeF2I3hORNMvhdY6MODc3my0vz5JAbZ0F9vRvk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=aUxHHjcBMVqLjo1RM8qrHKKNj89R2IaJpRPGSk+nT0YFIfqWDjq6Bmv/lYJcOEkHE8q7zqMa0tEsvmlEaV88/bYxNKHQmVGA6d8FJuyG4rA+QfJhbBtDw/yY2nzIvjz6q68/x/k/t9V59sRqkKMRx6DDev9iCm3bdu038J73/Ck= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=SaDwMzQC; 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="SaDwMzQC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D3605C2BBFC; Fri, 24 May 2024 15:10:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716563423; bh=XOghLzeF2I3hORNMvhdY6MODc3my0vz5JAbZ0F9vRvk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=SaDwMzQCBYk1iYUo0f5IGr4Gb5iMNokl9QM8kmZul4nxn7nFptlmta4xpq1K/76mw emfioagUngIOQdrn4XCzOQyM9oiDZ8FHvfdI3gL0okMojWFNcIIkyuFg1KSuyTiVZm PiQgja3M5d3rbYzLARE9QNwCLO+l2LZzdkyXi8S8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47528: usb: cdnsp: Fix a NULL pointer dereference in cdnsp_endpoint_init() Date: Fri, 24 May 2024 17:09:48 +0200 Message-ID: <2024052435-CVE-2021-47528-da4e@gregkh> X-Mailer: git-send-email 2.45.1 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=2509; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=XOghLzeF2I3hORNMvhdY6MODc3my0vz5JAbZ0F9vRvk=; b=owGbwMvMwCRo6H6F97bub03G02pJDGkBa9dbzLO4Z2TTVs389OfNN0EmNUFyYQob94YkfeqT2 3LzvufxjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZgIy2mGOXxXN9zZYfJ26bvX 2bN/haak/lTPOcww373OR2ei89xUf02zC7d3v4o3ff4hAgA= 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: usb: cdnsp: Fix a NULL pointer dereference in cdnsp_endpoint_init() In cdnsp_endpoint_init(), cdnsp_ring_alloc() is assigned to pep->ring and there is a dereference of it in cdnsp_endpoint_init(), which could lead to a NULL pointer dereference on failure of cdnsp_ring_alloc(). Fix this bug by adding a check of pep->ring. This bug was found by a static analyzer. The analysis employs differential checking to identify inconsistent security operations (e.g., checks or kfrees) between two code paths and confirms that the inconsistent operations are not recovered in the current function or the callers, so they constitute bugs. Note that, as a bug found by static analysis, it can be a false positive or hard to trigger. Multiple researchers have cross-reviewed the bug. Builds with CONFIG_USB_CDNSP_GADGET=y show no new warnings, and our static analyzer no longer warns about this code. The Linux kernel CVE team has assigned CVE-2021-47528 to this issue. Affected and fixed versions =========================== Issue introduced in 5.12 with commit 3d82904559f4 and fixed in 5.15.7 with commit 7d94bc8e335c Issue introduced in 5.12 with commit 3d82904559f4 and fixed in 5.16 with commit 37307f7020ab 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-2021-47528 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/usb/cdns3/cdnsp-mem.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/7d94bc8e335cb33918e52efdbe192c36707bfa24 https://git.kernel.org/stable/c/37307f7020ab38dde0892a578249bf63d00bca64