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 5175A2989BC for ; Tue, 30 Dec 2025 12:13:50 +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=1767096830; cv=none; b=eaIWPwaaAB1s9U+lH9cHZC4cnvcvh23n484jvxYMEJyeINh6lJYxOkuO7SkZBEJDhxdc1C+CMtv7sVWw1ibPmJaWTKoW3NGv8f06O4uBzgcBjOJL6Ixf1Z667HFMjy2RwNZGbm5hgx3m9lzrtmqhVRN9WdQWaFBe/2VP+/bcRyk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767096830; c=relaxed/simple; bh=n/ZkIsTHvOlc06du5uJ+FC53tHA64r0tN++RIzKEXAs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=gcn3wp4939yuxMW9WKRLNWpwbXkbhs08PkLrqVmuDuyIylQO1jfEnxCj2/m48UvYmqDrYTZ4PVvnYWJHN5AV+Lv1I+m6agFsjLuFf7qhNSPS6JNTiJjTtT7feDWQta2rLGg0wia+v1dH7YfgOjwpmn6C+BqiASpQnwicL2aCIqo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=KQ6Npimf; 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="KQ6Npimf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C35C6C4CEFB; Tue, 30 Dec 2025 12:13:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1767096830; bh=n/ZkIsTHvOlc06du5uJ+FC53tHA64r0tN++RIzKEXAs=; h=From:To:Cc:Subject:Date:Reply-To:From; b=KQ6Npimfc5VmqGreEGwnM5Y3eQWOoIJmJJsaIZDnDnN53Kw0xKWbt+/mTBSMDeX+u 1XSkVT7fvUlZM1rAhOF86Cdsv+LIcEAt+tVqp4+4Hc+p9zTROBQ9vxm6ovbpXOVNOT 2qvAz7H8KeckV83xtPFEfP9nlbIvHQLspJXyY57A= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50829: wifi: ath9k: hif_usb: Fix use-after-free in ath9k_hif_usb_reg_in_cb() Date: Tue, 30 Dec 2025 13:13:15 +0100 Message-ID: <2025123015-CVE-2022-50829-2142@gregkh> X-Mailer: git-send-email 2.52.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3910; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=WHD7g5Ab8JCPVPBNsRRH2dTgQgGbrYJQau1D74JXUyg=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnBB++UrL8g3a9acH/RpVJziY933/yX5nK97y0txPR/d dM9xYM6HbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRjQ0Mc6Ucz8lyN12yqIw2 1yyfdLZ+u8eCIIYFE+0Ej7SybHzNeUKbb2mx4G7jDqMFAA== 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: wifi: ath9k: hif_usb: Fix use-after-free in ath9k_hif_usb_reg_in_cb() It is possible that skb is freed in ath9k_htc_rx_msg(), then usb_submit_urb() fails and we try to free skb again. It causes use-after-free bug. Moreover, if alloc_skb() fails, urb->context becomes NULL but rx_buf is not freed and there can be a memory leak. The patch removes unnecessary nskb and makes skb processing more clear: it is supposed that ath9k_htc_rx_msg() either frees old skb or passes its managing to another callback function. Found by Linux Verification Center (linuxtesting.org) with Syzkaller. The Linux kernel CVE team has assigned CVE-2022-50829 to this issue. Affected and fixed versions =========================== Issue introduced in 3.0 with commit 3deff76095c4ac4252e27c537db3041f619c23a2 and fixed in 4.9.337 with commit 5e8751a977a49a6e00cce1a8da5ca16da83f9c8c Issue introduced in 3.0 with commit 3deff76095c4ac4252e27c537db3041f619c23a2 and fixed in 4.14.303 with commit f127c2b4c967025e5c3a4ce7e13b79135d46a33d Issue introduced in 3.0 with commit 3deff76095c4ac4252e27c537db3041f619c23a2 and fixed in 4.19.270 with commit 0c8dd2ea4b419da96ab4953e4967e9363e2f8a4f Issue introduced in 3.0 with commit 3deff76095c4ac4252e27c537db3041f619c23a2 and fixed in 5.4.229 with commit 988bd27de2484faf17afe0408db2e3d9e5ac61fc Issue introduced in 3.0 with commit 3deff76095c4ac4252e27c537db3041f619c23a2 and fixed in 5.10.163 with commit 98d9172822dc6f38138333941984bd759a89d419 Issue introduced in 3.0 with commit 3deff76095c4ac4252e27c537db3041f619c23a2 and fixed in 5.15.86 with commit 355f16f756aad0c95cdaa0c14a34ab4137d32815 Issue introduced in 3.0 with commit 3deff76095c4ac4252e27c537db3041f619c23a2 and fixed in 6.0.16 with commit 53b9bb1a00c4285ee7f58a11129dbea015db61bc Issue introduced in 3.0 with commit 3deff76095c4ac4252e27c537db3041f619c23a2 and fixed in 6.1.2 with commit 71fc0ad671a62c494d2aec731baeabd3bfe6c95d Issue introduced in 3.0 with commit 3deff76095c4ac4252e27c537db3041f619c23a2 and fixed in 6.2 with commit dd95f2239fc846795fc926787c3ae0ca701c9840 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-2022-50829 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/net/wireless/ath/ath9k/hif_usb.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/5e8751a977a49a6e00cce1a8da5ca16da83f9c8c https://git.kernel.org/stable/c/f127c2b4c967025e5c3a4ce7e13b79135d46a33d https://git.kernel.org/stable/c/0c8dd2ea4b419da96ab4953e4967e9363e2f8a4f https://git.kernel.org/stable/c/988bd27de2484faf17afe0408db2e3d9e5ac61fc https://git.kernel.org/stable/c/98d9172822dc6f38138333941984bd759a89d419 https://git.kernel.org/stable/c/355f16f756aad0c95cdaa0c14a34ab4137d32815 https://git.kernel.org/stable/c/53b9bb1a00c4285ee7f58a11129dbea015db61bc https://git.kernel.org/stable/c/71fc0ad671a62c494d2aec731baeabd3bfe6c95d https://git.kernel.org/stable/c/dd95f2239fc846795fc926787c3ae0ca701c9840