From nobody Tue Nov 18 00:19:08 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4d9QG54lfDz6HDZr; Tue, 18 Nov 2025 00:19:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d9QG50nfhz3tXK; Tue, 18 Nov 2025 00:19:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763425149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JVH528Gw675DaZAUEaGqUC9XAfIZ9l28//DpqH5Uh8A=; b=bkxerkbHwgdc7VzQDQm1iq6RtEs2yjtMsXSowESPJdjDZBHCNhpunPOOVTvKQm+9Mp9FOg ruV4mASafPROLUtD7L36WZhiTSRfP0o2lNNrjHnBeKEtccvYMdgwLiqI1SPYFRVILppYCq J0Z1WNMFQKKhrVHe+F7LrC9d4xTM/z2Rpwayo9MbCJTXwa+FijDvx2NYwND2tjwHHO58XA kl9LX4ExMm31Ai5u9sTjcPKdmRZ4s+UzCd3hUW1sTqydIF89KqOSHcQHSCvnUsfBOefGiP cjoqcrL86W2hP91liCMC/GtwvFCLiZKgRDFMwV88x6C8pYazHsByCa0Bs3YKug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763425149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JVH528Gw675DaZAUEaGqUC9XAfIZ9l28//DpqH5Uh8A=; b=AXVvXteOxTcmUcvHvLxDiG1sll3N3UBQMjXzhaJ0OzN1FAgWIdL58If13DnkAkhjb0vLuF N17e6UqTTndkbGc7yI7xguThW4LFrMuZcZCZWBvCC5WNdVMR6rIs3HG7BuQvsDNEHK+ipB cTYAjzLthqW+dpWcrvh9oghD3CASr6vum8d4GxuNbP0tPIAW2m/OlW4FuZSEAuLWFuiQnq Ll8/FRCUlmzKjNldBw4YI3eQHXKo53+5LshgTf3O0gOyzGh1+4Em+41xRyqyEWFCN6YNAa x7rCyeqatpN4jO+n3GdMiMZt1LnGiKZaz9c0EsB0hHez2ie2crcYFfEqwzq7hA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763425149; a=rsa-sha256; cv=none; b=ietuUYicXMfZRDnCQOsAjYP0HRzZ62D58Lv1bEohACzisM+aQpmHNeK1DACa26dbGRU0aG +vPnqQey/Mjifbp44inYbAPRKDUNvKphzE7M2x7pK+m+jkQodtovyakT9+VwCT5F/wALpt nvagv1JP8Sr25e468AIIN11m8aIKoZ02QBhHqpNEzNkDjTEk4vMTjZaDU5fAF6brAK1jmK a9Rk6hantuMa3/tgJjE54zyaCpftHJJ4AUMuymnifYQjuj8P9Zc6/DNq04L5isFe8jOhlz Y7XGhUUpna2mu1p276ldd0vBX9MxWRelKFE78iQOHzl5ngalej1zHUNG/+6qGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4d9QG50KRRzTl1; Tue, 18 Nov 2025 00:19:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 5AI0J8Ed077151; Tue, 18 Nov 2025 00:19:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AI0J8cd077148; Tue, 18 Nov 2025 00:19:08 GMT (envelope-from git) Date: Tue, 18 Nov 2025 00:19:08 GMT Message-Id: <202511180019.5AI0J8cd077148@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 640205bc22c8 - main - LinuxKPI: 802.11: initialize the passed in chandef in cfg80211_chandef_create List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 640205bc22c8b2bd31c766f4d0c409c183a8b8dc Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=640205bc22c8b2bd31c766f4d0c409c183a8b8dc commit 640205bc22c8b2bd31c766f4d0c409c183a8b8dc Author: Bjoern A. Zeeb AuthorDate: 2025-11-17 22:54:07 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-11-17 22:54:07 +0000 LinuxKPI: 802.11: initialize the passed in chandef in cfg80211_chandef_create cfg80211_chandef_create() gets passed a pointer to a cfg80211_chan_def. It seems that several users are passing in an uninitialized variable from the stack and expect cfg80211_chandef_create() to initialize it. Run memset() on the struct, which for all callers currently seems to do the right thing, to avoid later accesses to uninitialized struct members like "punctured". Reported by: CI (gcc build) MFC after: 3 days Sponsonred by: The FreeBSD Foundation --- sys/compat/linuxkpi/common/include/net/cfg80211.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/include/net/cfg80211.h b/sys/compat/linuxkpi/common/include/net/cfg80211.h index f769cfdd4075..305026b34451 100644 --- a/sys/compat/linuxkpi/common/include/net/cfg80211.h +++ b/sys/compat/linuxkpi/common/include/net/cfg80211.h @@ -1450,7 +1450,7 @@ cfg80211_chandef_create(struct cfg80211_chan_def *chandef, KASSERT(chandef != NULL, ("%s: chandef is NULL\n", __func__)); KASSERT(chan != NULL, ("%s: chan is NULL\n", __func__)); - /* memset(chandef, 0, sizeof(*chandef)); */ + memset(chandef, 0, sizeof(*chandef)); chandef->chan = chan; chandef->center_freq1 = chan->center_freq; /* chandef->width, center_freq2, punctured */