Bug 2348059 (CVE-2022-49326) - CVE-2022-49326 kernel: rtl818x: Prevent using not initialized queues
Summary: CVE-2022-49326 kernel: rtl818x: Prevent using not initialized queues
Keywords:
Status: NEW
Alias: CVE-2022-49326
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-02-26 03:16 UTC by OSIDB Bzimport
Modified: 2025-02-27 20:30 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-02-26 03:16:11 UTC
In the Linux kernel, the following vulnerability has been resolved:

rtl818x: Prevent using not initialized queues

Using not existing queues can panic the kernel with rtl8180/rtl8185 cards.
Ignore the skb priority for those cards, they only have one tx queue. Pierre
Asselin (pa) reported the kernel crash in the Gentoo forum:

https://forums.gentoo.org/viewtopic-t-1147832-postdays-0-postorder-asc-start-25.html

He also confirmed that this patch fixes the issue. In summary this happened:

After updating wpa_supplicant from 2.9 to 2.10 the kernel crashed with a
"divide error: 0000" when connecting to an AP. Control port tx now tries to
use IEEE80211_AC_VO for the priority, which wpa_supplicants starts to use in
2.10.

Since only the rtl8187se part of the driver supports QoS, the priority
of the skb is set to IEEE80211_AC_BE (2) by mac80211 for rtl8180/rtl8185
cards.

rtl8180 is then unconditionally reading out the priority and finally crashes on
drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c line 544 without this
patch:
	idx = (ring->idx + skb_queue_len(&ring->queue)) % ring->entries

"ring->entries" is zero for rtl8180/rtl8185 cards, tx_ring[2] never got
initialized.

Comment 1 Avinash Hanwate 2025-02-26 13:09:25 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025022638-CVE-2022-49326-7834@gregkh/T

Comment 2 Avinash Hanwate 2025-02-27 20:19:46 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025022638-CVE-2022-49326-7834@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.