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 71806274FDB for ; Wed, 1 Oct 2025 11:57:31 +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=1759319851; cv=none; b=SNOgdYap5cNZbRh2N0/o5mlV852wEml3PFJv1RRUmlApb/8TWQUoAfEDgRe/xB+ThZH8NuHk63fGYcdkv5aqgKwiMQ8DHOIb0i/9ZK8rKx2S83tbBois4kxgPiBRabEBbguzfMKbmEsT7Pv0eK6dbYHWX0eiLTJLdtuYLA6oKlI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1759319851; c=relaxed/simple; bh=ABrkGSw9Tbe1aan0EmMF/Q9mtqa7FCkPG+KQT1njJfU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=htBjdV4383IRsDzndyILTFLKfq0A140UZuR/UjWfDnFULS1uT3YQDzDyRJPT+j4nbCVthcom6xWl5NAlABr8D9YXuy7gXKFGYhpOBrZe61S/fH66uvEuwJLxSGJFOmJfW53ixf/sPXhM/b0Z7vr/xNmOI8YfoMJBplnFAgG0Y0g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Yl33KepF; 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="Yl33KepF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EA1E7C4CEF4; Wed, 1 Oct 2025 11:57:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1759319851; bh=ABrkGSw9Tbe1aan0EmMF/Q9mtqa7FCkPG+KQT1njJfU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Yl33KepFinAKRMIPqnsQ0M9N3c46LaJfeYt411Zs6hcaPz05rTA/UkUHgexJTbbIH 3ogb+vhQll3NRpNdaPBuE6HaVqtenhR0JFAMogm6hxnRuvhniPZwZMaAOwF2B593cv FVqqFpv6JZ3G+5xVu0WYJkarhFm+CMD4Lw2zhrho= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50469: staging: rtl8723bs: fix potential memory leak in rtw_init_drv_sw() Date: Wed, 1 Oct 2025 13:45:39 +0200 Message-ID: <2025100122-CVE-2022-50469-bbc4@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=2489; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Vi6ylnsnKmH/Tfx9mGYEkt7XpPYWdXNUl3CRRQQQ+rA=; b=owGbwMvMwCRo6H6F97bub03G02pJDBl3RYIUUr0b7txbt/ubXqR+Ys3MBU2eSm9dn0VUMjxb2 cwW+/93RywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzkkTrDgiO/Z8UKG28Nmbc8 QTXw32mmGSrbORkWTPG75mh47M5X7TdLjog5nvxsIlbBDgA= 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: staging: rtl8723bs: fix potential memory leak in rtw_init_drv_sw() In rtw_init_drv_sw(), there are various init functions are called to populate the padapter structure and some checks for their return value. However, except for the first one error path, the other five error paths do not properly release the previous allocated resources, which leads to various memory leaks. This patch fixes them and keeps the success and error separate. Note that these changes keep the form of `rtw_init_drv_sw()` in "drivers/staging/r8188eu/os_dep/os_intfs.c". As there is no proper device to test with, no runtime testing was performed. The Linux kernel CVE team has assigned CVE-2022-50469 to this issue. Affected and fixed versions =========================== Fixed in 5.15.75 with commit b4573a2bad3c3e2643ef3939079eb7035a30e6ee Fixed in 5.19.17 with commit 6b2052b365f8035ab7f09ac24b5b499002b298cb Fixed in 6.0.3 with commit d95d1526d9f06978c1a7186810a5490d72c62742 Fixed in 6.1 with commit 5a5aa9cce621e2c0e25a1e5d72d6be1749167cc0 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-50469 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/staging/rtl8723bs/os_dep/os_intfs.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/b4573a2bad3c3e2643ef3939079eb7035a30e6ee https://git.kernel.org/stable/c/6b2052b365f8035ab7f09ac24b5b499002b298cb https://git.kernel.org/stable/c/d95d1526d9f06978c1a7186810a5490d72c62742 https://git.kernel.org/stable/c/5a5aa9cce621e2c0e25a1e5d72d6be1749167cc0