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 2C3B72820D9 for ; Wed, 18 Jun 2025 09:30:04 +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=1750239004; cv=none; b=WYYAsWXO8smTu0WYpHJhlynb2fG1LZUdmzU9U0eG15DDmN2e/K5Zyfo9c4sFLIyBSrK9hid4BmL2kaEeoh2BrLcP6+MopV6brFz3+jqIRJ6Q+njRMMbzqsc8mvuuW7JMlAGjZktALvMtfZ7BVVWk19Cu2jnk5xImC10mWbx1hM0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750239004; c=relaxed/simple; bh=tLjks5Nw9dQoZGCbv07Eh3R8UZ0nhdArkXUipMTSWOI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=a0SFPMx+atfuiR+zAPLNXKiw6JM5Dsay/zH6M5ZbX7L/LtHnyxyO+JZokLWB9OGHaSckxw6l/mQIPspBrdhryREGFZpePGWRYT6QhFog34pt9XwI8/ZFWwv2iXjjL89Ijbq18sw5THGd+t0fIQBTx67Z3jTqMbFq+TjI0Q3UZ2U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Et9AAM82; 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="Et9AAM82" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8CFACC4CEED; Wed, 18 Jun 2025 09:30:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1750239004; bh=tLjks5Nw9dQoZGCbv07Eh3R8UZ0nhdArkXUipMTSWOI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Et9AAM82IebzdZYwUkWrqrTRrnLzP1MHF5ebPTB692+H8qiipjun+UmlkQTIg2RHy xjWfgyAzQpRsVxD96aSw6lKKcZcTVxmCxamxagMXubUWs8bfSJnFovP5klxI2wZhhf BGf30V7kVo9jK2b+gE7bKio1SlQoobfCsou+w7Oc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38013: wifi: mac80211: Set n_channels after allocating struct cfg80211_scan_request Date: Wed, 18 Jun 2025 11:28:47 +0200 Message-ID: <2025061843-CVE-2025-38013-eef6@gregkh> X-Mailer: git-send-email 2.49.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2722; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=KV5StZp8WkQTMd7QaCsfI57TCrYieqPKY+Xj0AUDt/4=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlBbadZvkeZL4oX/XKQ49ppEbkPDvvirtnYHu/Kc7/B8 yqvXq67I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACayKpNhDm+Pd25qrs6NgIwL p/fPXr9VhC3zDMOCXcoqx09rz/tp+zKsbLZY2KIe58YeAA== 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: mac80211: Set n_channels after allocating struct cfg80211_scan_request Make sure that n_channels is set after allocating the struct cfg80211_registered_device::int_scan_req member. Seen with syzkaller: UBSAN: array-index-out-of-bounds in net/mac80211/scan.c:1208:5 index 0 is out of range for type 'struct ieee80211_channel *[] __counted_by(n_channels)' (aka 'struct ieee80211_channel *[]') This was missed in the initial conversions because I failed to locate the allocation likely due to the "sizeof(void *)" not matching the "channels" array type. The Linux kernel CVE team has assigned CVE-2025-38013 to this issue. Affected and fixed versions =========================== Issue introduced in 6.6 with commit e3eac9f32ec04112b39e01b574ac739382469bf9 and fixed in 6.6.92 with commit fde33ab3c052a302ee8a0b739094b88ceae4dd67 Issue introduced in 6.6 with commit e3eac9f32ec04112b39e01b574ac739382469bf9 and fixed in 6.12.30 with commit 07c737d9ab02c07b562aefcca16aa95077368e24 Issue introduced in 6.6 with commit e3eac9f32ec04112b39e01b574ac739382469bf9 and fixed in 6.14.8 with commit e3192e999a0d05ea0ba2c59c09afaf0b8ee70b81 Issue introduced in 6.6 with commit e3eac9f32ec04112b39e01b574ac739382469bf9 and fixed in 6.15 with commit 82bbe02b2500ef0a62053fe2eb84773fe31c5a0a 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-2025-38013 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: net/mac80211/main.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/fde33ab3c052a302ee8a0b739094b88ceae4dd67 https://git.kernel.org/stable/c/07c737d9ab02c07b562aefcca16aa95077368e24 https://git.kernel.org/stable/c/e3192e999a0d05ea0ba2c59c09afaf0b8ee70b81 https://git.kernel.org/stable/c/82bbe02b2500ef0a62053fe2eb84773fe31c5a0a