CVE-2026-74651: staging: rtl8723bs: fix OOB read in rtw_get_wpa_ie()

Greg Kroah-Hartman <[email protected]>
Newsgroups org.kernel.vger.linux-cve-announce
Message-ID <2026082225-CVE-2026-74651-f9b9@gregkh>
From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

staging: rtl8723bs: fix OOB read in rtw_get_wpa_ie()

rtw_get_wpa_ie() reads bytes at fixed offsets into a vendor-specific
information element without checking that the element is long enough,
causing an out-of-bounds read for a short trailing IE.

The function locates a vendor-specific IE (EID 221) with rtw_get_ie()
and then compares a 4-byte OUI+type at pbuf + 2 and reads a 2-byte
version word at pbuf + 6. Those accesses require the IE body to be at
least 6 bytes, but rtw_get_ie() only guarantees that the element fits
within the buffer; it does not enforce a minimum body length. A
vendor-specific IE whose length byte is 0 to 5, placed at the end of
the buffer, therefore makes these reads run past the end of the IE and
past the end of the buffer itself.

The buffer holds information elements taken from received management
frames and from the IE blob passed to rtw_cfg80211_set_wpa_ie(), which
is kmemdup'd to its exact length, so the read can run off the end of
the allocation.

The sibling helpers rtw_get_sec_ie(), rtw_get_wapi_ie() and
rtw_get_wps_ie() in this file already reject too-short vendor-specific
IEs before their OUI memcmp(); rtw_get_wpa_ie() was never brought in
line with them, and needs a minimum of 6 rather than 4 bytes because
of the version word. Add the missing length check.

The Linux kernel CVE team has assigned CVE-2026-74651 to this issue.


Affected and fixed versions
===========================

	Issue introduced in 4.12 with commit 554c0a3abf216c991c5ebddcdb2c08689ecd290b and fixed in 5.10.265 with commit 4fc459c5cd8767ca4d9bf2f7becbd562639ba4d9
	Issue introduced in 4.12 with commit 554c0a3abf216c991c5ebddcdb2c08689ecd290b and fixed in 5.15.216 with commit b45be82387bf759931acdd21ca7dfe740f16eb97
	Issue introduced in 4.12 with commit 554c0a3abf216c991c5ebddcdb2c08689ecd290b and fixed in 6.1.183 with commit c9068f82a0906b29c905e8788edb62c3208c7c8a
	Issue introduced in 4.12 with commit 554c0a3abf216c991c5ebddcdb2c08689ecd290b and fixed in 6.6.152 with commit 0d19f0600fbb610c42f2a86f95c35706dc04691b
	Issue introduced in 4.12 with commit 554c0a3abf216c991c5ebddcdb2c08689ecd290b and fixed in 6.12.104 with commit 42c5a0d454aa5b54fec17162d9a1f8c30f8af45a
	Issue introduced in 4.12 with commit 554c0a3abf216c991c5ebddcdb2c08689ecd290b and fixed in 6.18.45 with commit e167a38a8a8f50f137721fef1a1fbba0f4588b5d
	Issue introduced in 4.12 with commit 554c0a3abf216c991c5ebddcdb2c08689ecd290b and fixed in 7.1.9 with commit 01ab275f8f3e497a13ebbe4ded44ec0623bccde3
	Issue introduced in 4.12 with commit 554c0a3abf216c991c5ebddcdb2c08689ecd290b and fixed in 7.2 with commit 1c3e23e78862493e8cf1adad02b10ffcb8b9921c

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-2026-74651
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_ieee80211.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/4fc459c5cd8767ca4d9bf2f7becbd562639ba4d9
	https://git.kernel.org/stable/c/b45be82387bf759931acdd21ca7dfe740f16eb97
	https://git.kernel.org/stable/c/c9068f82a0906b29c905e8788edb62c3208c7c8a
	https://git.kernel.org/stable/c/0d19f0600fbb610c42f2a86f95c35706dc04691b
	https://git.kernel.org/stable/c/42c5a0d454aa5b54fec17162d9a1f8c30f8af45a
	https://git.kernel.org/stable/c/e167a38a8a8f50f137721fef1a1fbba0f4588b5d
	https://git.kernel.org/stable/c/01ab275f8f3e497a13ebbe4ded44ec0623bccde3
	https://git.kernel.org/stable/c/1c3e23e78862493e8cf1adad02b10ffcb8b9921c
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.