Bug 2134451 (CVE-2022-42720) - CVE-2022-42720 kernel: use-after-free in bss_ref_get in net/wireless/scan.c
Summary: CVE-2022-42720 kernel: use-after-free in bss_ref_get in net/wireless/scan.c
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2022-42720
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2134458 2134459 2134460 2134461 2134470
Blocks: 2133534
TreeView+ depends on / blocked
 
Reported: 2022-10-13 12:57 UTC by Rohit Keshri
Modified: 2024-03-12 16:24 UTC (History)
54 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-05-16 19:45:33 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2023:2148 0 None None None 2023-05-09 07:12:00 UTC
Red Hat Product Errata RHSA-2023:2458 0 None None None 2023-05-09 07:51:43 UTC
Red Hat Product Errata RHSA-2023:2736 0 None None None 2023-05-16 08:05:22 UTC
Red Hat Product Errata RHSA-2023:2951 0 None None None 2023-05-16 08:34:11 UTC
Red Hat Product Errata RHSA-2024:1188 0 None None None 2024-03-06 12:36:37 UTC

Description Rohit Keshri 2022-10-13 12:57:02 UTC
There are multiple refcounting bugs related to multi-BSSID:
 - In bss_ref_get(), if the BSS has a hidden_beacon_bss, then
   the bss pointer is overwritten before checking for the
   transmitted BSS, which is clearly wrong. Fix this by using
   the bss_from_pub() macro.

 - In cfg80211_bss_update() we copy the transmitted_bss pointer
   from tmp into new, but then if we release new, we'll unref
   it erroneously. We already set the pointer and ref it, but
   need to NULL it since it was copied from the tmp data.

 - In cfg80211_inform_single_bss_data(), if adding to the non-
   transmitted list fails, we unlink the BSS and yet still we
   return it, but this results in returning an entry without
   a reference. We shouldn't return it anyway if it was broken
   enough to not get added there.

Comment 3 Marian Rehak 2022-10-13 13:21:48 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2134470]

Comment 11 errata-xmlrpc 2023-05-09 07:11:56 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2023:2148 https://access.redhat.com/errata/RHSA-2023:2148

Comment 12 errata-xmlrpc 2023-05-09 07:51:39 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2023:2458 https://access.redhat.com/errata/RHSA-2023:2458

Comment 13 errata-xmlrpc 2023-05-16 08:05:18 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2023:2736 https://access.redhat.com/errata/RHSA-2023:2736

Comment 14 errata-xmlrpc 2023-05-16 08:34:07 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2023:2951 https://access.redhat.com/errata/RHSA-2023:2951

Comment 15 Product Security DevOps Team 2023-05-16 19:45:28 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2022-42720

Comment 18 errata-xmlrpc 2024-03-06 12:36:33 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.6 Extended Update Support

Via RHSA-2024:1188 https://access.redhat.com/errata/RHSA-2024:1188


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