Bug 2084125 (CVE-2022-1679)

Summary: CVE-2022-1679 kernel: use-after-free in ath9k_htc_probe_device() could cause an escalation of privileges
Product: [Other] Security Response Reporter: Alex <allarkin>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: acaringi, adscvr, airlied, alciregi, bdettelb, bhu, bskeggs, chwhite, crwood, ddepaula, dvlasenk, hdegoede, hkrzesin, hpa, jarod, jarodwilson, jburrell, jfaracco, jferlan, jforbes, jglisse, jlelli, joe.lawrence, jonathan, josef, jshortt, jstancek, jwboyer, jwyatt, kcarcia, kernel-maint, kernel-mgr, lgoncalv, linville, lzampier, masami256, mchehab, nmurray, ptalbert, qzhao, rvrbovsk, scweaver, steved, vkumar, walters, williams
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Linux kernel 5.18-rc7 Doc Type: If docs needed, set a value
Doc Text:
A use-after-free flaw was found in the Linux kernel’s Atheros wireless adapter driver in the way a user forces the ath9k_htc_wait_for_target function to fail with some input messages. This flaw allows a local user to crash or potentially escalate their privileges on the system.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-16 18:51:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2084598, 2084599, 2084600, 2084601, 2086288, 2125518, 2125621    
Bug Blocks: 2083440, 2084412    

Description Alex 2022-05-11 13:33:50 UTC
A vulnerability was found in ath9k_htc_probe_device in drivers/net/wireless/ath/ath9k/htc_drv_init.c in the Linux kernel. In this flaw, a local user may gain access to kernel memory, leading to a system crash or a leak of internal kernel information.
In more details. After ieee80211_alloc_hw executes finished, it saves variable priv into htc_handle->drv_priv. Then, if function ath9k_htc_wait_for_target executes failed, it directly frees variable hw by function ieee80211_free_hw, but it doesn't clear htc_handle->drv_priv. At now, the usb communication channel has been established. Function ath9k_hif_usb_rx_stream is used to process received messages. It calls macro RX_STAT_INC to count packets' number. And this macro uses htc_handle->drv_priv which has been freed before.

Reference:
https://lore.kernel.org/lkml/87ilqc7jv9.fsf@kernel.org/t/

Comment 3 Alex 2022-05-15 10:59:11 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2086288]

Comment 10 Justin M. Forbes 2022-09-23 19:04:18 UTC
This was fixed for Fedora with the 5.18.18 stable kernel update.

Comment 11 errata-xmlrpc 2022-11-15 09:45:02 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2022:7933 https://access.redhat.com/errata/RHSA-2022:7933

Comment 12 errata-xmlrpc 2022-11-15 10:47:54 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

Via RHSA-2022:8267 https://access.redhat.com/errata/RHSA-2022:8267

Comment 16 errata-xmlrpc 2023-05-16 08:04:23 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 17 errata-xmlrpc 2023-05-16 08:33:15 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 18 Product Security DevOps Team 2023-05-16 18:51:21 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-1679

Comment 20 errata-xmlrpc 2024-01-24 16:42:20 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.6 Extended Update Support

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