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 1ADBD824A3 for ; Tue, 16 Sep 2025 08:13: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=1758010382; cv=none; b=tl9gEWqLCYaPokRELn9Xx324lr184QbMAWYKX/y20M9sX6OSJfvGSDdbj8KOZGf2N2gWwzikloC2DPjpUHlGpxPZQQF3mNe0NjaLeMcMHrsfbsIB6mtWgGrmg703xJMKij58xczpBsVZv09EhX2PF8rigKWxtLHgjoceGukUeWg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1758010382; c=relaxed/simple; bh=ktCVTuB/BJHzfrSelWW4HW7IAubnR6gHg5wGlplNlTk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=OuYLlK7n+H/f/8yd1PrZlz+Zgrm76iw4iMQBJ3X4I8f+H/VLLfKfQiiVNnyGTp8XQ0SEPOOtF1fghnq1RSwM91pCqGNBDTF3bpAi7ZI/EKjMSO2gPjyWAJB44FMqUwq/n0b03QGimR8oS8EjQ8rnRw0CWA6kSVq/veWjrwZMgpY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=zc3Stias; 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="zc3Stias" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90031C4CEEB; Tue, 16 Sep 2025 08:13:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1758010382; bh=ktCVTuB/BJHzfrSelWW4HW7IAubnR6gHg5wGlplNlTk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=zc3StiasftkNYDT6cksXotFLO+ztLENd4s/zpaEm/ysS4LcF/7YsYsrnv7Q7qW1C0 o0VI0p85/64xY+Tl7RZ8EaznGUWhvJf0u5hEATaOsxEG87H/VVyJhJEv9+/TdWxSr8 0KoZkwjF3CoXixM9BvmFZmcIsBGl6KGkwhhHP3iY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2023-53281: drivers: staging: rtl8723bs: Fix locking in _rtw_join_timeout_handler() Date: Tue, 16 Sep 2025 10:11:31 +0200 Message-ID: <2025091624-CVE-2023-53281-7e00@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=3919; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=E35PNDIp6Ohy+Rsf8fO0M2r9b90k7fCkUN06B95ci4c=; b=owGbwMvMwCRo6H6F97bub03G02pJDBknpdds97MKf80m8JrhxOHt730rjVX3OSyaGu7EIZnka 7fnctXWjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjIoS0MCyb7F7Hv/P7ny5Et GoeqdqmETk3aI82w4LS2mIE204e9Nj+YJDU6GtsF/Z82AgA= 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: drivers: staging: rtl8723bs: Fix locking in _rtw_join_timeout_handler() Commit 041879b12ddb ("drivers: staging: rtl8192bs: Fix deadlock in rtw_joinbss_event_prehandle()") besides fixing the deadlock also modified _rtw_join_timeout_handler() to use spin_[un]lock_irq() instead of spin_[un]lock_bh(). _rtw_join_timeout_handler() calls rtw_do_join() which takes pmlmepriv->scanned_queue.lock using spin_[un]lock_bh(). This spin_unlock_bh() call re-enables softirqs which triggers an oops in kernel/softirq.c: __local_bh_enable_ip() when it calls lockdep_assert_irqs_enabled(): [ 244.506087] WARNING: CPU: 2 PID: 0 at kernel/softirq.c:376 __local_bh_enable_ip+0xa6/0x100 ... [ 244.509022] Call Trace: [ 244.509048] [ 244.509100] _rtw_join_timeout_handler+0x134/0x170 [r8723bs] [ 244.509468] ? __pfx__rtw_join_timeout_handler+0x10/0x10 [r8723bs] [ 244.509772] ? __pfx__rtw_join_timeout_handler+0x10/0x10 [r8723bs] [ 244.510076] call_timer_fn+0x95/0x2a0 [ 244.510200] __run_timers.part.0+0x1da/0x2d0 This oops is causd by the switch to spin_[un]lock_irq() which disables the IRQs for the entire duration of _rtw_join_timeout_handler(). Disabling the IRQs is not necessary since all code taking this lock runs from either user contexts or from softirqs, switch back to spin_[un]lock_bh() to fix this. The Linux kernel CVE team has assigned CVE-2023-53281 to this issue. Affected and fixed versions =========================== Issue introduced in 5.15.47 with commit ae60744d5fad840b9d056d35b4b652d95e755846 and fixed in 5.15.111 with commit 209850f17717a3b5cc558578bef5631ac7045539 Issue introduced in 5.19 with commit 041879b12ddb0c6c83ed9c0bdd10dc82a056f2fc and fixed in 6.1.28 with commit 2a50e44a66d268ee5db3d177f1fdc1503dbce6e7 Issue introduced in 5.19 with commit 041879b12ddb0c6c83ed9c0bdd10dc82a056f2fc and fixed in 6.2.15 with commit dc327e87c6d9bfd9ee08e76396b3c0ba848ec554 Issue introduced in 5.19 with commit 041879b12ddb0c6c83ed9c0bdd10dc82a056f2fc and fixed in 6.3.2 with commit 4ab1bace1dd3875371b481ef4301c4671bddea22 Issue introduced in 5.19 with commit 041879b12ddb0c6c83ed9c0bdd10dc82a056f2fc and fixed in 6.4 with commit 215792eda008f6a1e7ed9d77fa20d582d22bb114 Issue introduced in 5.17.15 with commit 1f6c99b94ca3caad346876b3e22e3ca3d25bc8ee Issue introduced in 5.18.4 with commit eca9748d9267a38d532464e3305a38629e9c35a9 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-2023-53281 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/core/rtw_mlme.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/209850f17717a3b5cc558578bef5631ac7045539 https://git.kernel.org/stable/c/2a50e44a66d268ee5db3d177f1fdc1503dbce6e7 https://git.kernel.org/stable/c/dc327e87c6d9bfd9ee08e76396b3c0ba848ec554 https://git.kernel.org/stable/c/4ab1bace1dd3875371b481ef4301c4671bddea22 https://git.kernel.org/stable/c/215792eda008f6a1e7ed9d77fa20d582d22bb114