| Message ID | 20260910203948.443913-2-Chaitanya.Tata@nordicsemi.no |
|---|---|
| State | New |
| Headers | show
Return-Path:
<hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>
X-Original-To: incoming@patchwork.ozlabs.org
Delivered-To: patchwork-incoming@legolas.ozlabs.org
Authentication-Results: legolas.ozlabs.org;
dkim=pass (2048-bit key;
secure) header.d=lists.infradead.org header.i=@lists.infradead.org
header.a=rsa-sha256 header.s=bombadil.20210309 header.b=f19Hrcs7;
dkim=fail reason="signature verification failed" (2048-bit key;
unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256
header.s=20251104 header.b=sareWolx;
dkim-atps=neutral
Authentication-Results: legolas.ozlabs.org;
spf=pass (sender SPF authorized) smtp.mailfrom=lists.infradead.org
(client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;
envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;
receiver=patchwork.ozlabs.org)
Received: from bombadil.infradead.org (bombadil.infradead.org
[IPv6:2607:7c80:54:3::133])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)
(No client certificate requested)
by legolas.ozlabs.org (Postfix) with ESMTPS id 4hgqMj3FpGz1xxw
for <incoming@patchwork.ozlabs.org>; Fri, 11 Sep 2026 06:41:21 +1000 (AEST)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.infradead.org; s=bombadil.20210309; h=Sender:
Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post:
List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:
Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:
Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:
List-Owner; bh=LHiGDwfAKtLjmfWTT2GTlXpIkFGlE3BwbY+qxSXOyn4=; b=f19Hrcs7AgUwqg
VLtc7RpgGg6Sfkz8ABTyB9zBweEBPPV8clvYiaSKGNxmkYRFu7FHNNvCAoYfDKSRvefXHMEWh7Ob5
tjLEzymuIWABceVAOtixPdwQT3/glOoNR0154cD9AW2wD8D/Qw1B6iPzzOTzV8rCNvHyfmuMgEbKO
ANCW19cl2waE4I4y7eEthOcG6Cf9S6PUxSM2FtKFqYGMq0tnojAd3TV0nnQtUo67Y7H2br24EMrN6
SKrMMDqJq4FwDQ8Rke3ag/F6ZG1jhrM7l9vNLdCwhe6PPurSSjt1ovcwAsHqeBpdodiIwCbkcFHip
lj+/Zqz1I3lt+k6hfszg==;
Received: from localhost ([::1] helo=bombadil.infradead.org)
by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux))
id 1x4lYs-0000000FLt8-3gYM;
Thu, 10 Sep 2026 20:39:59 +0000
Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a])
by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux))
id 1x4lYp-0000000FLsX-4AG9
for hostap@lists.infradead.org;
Thu, 10 Sep 2026 20:39:57 +0000
Received: by mail-pj1-x102a.google.com with SMTP id
98e67ed59e1d1-3856d6fbcb3so160773a91.2
for <hostap@lists.infradead.org>;
Thu, 10 Sep 2026 13:39:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20251104; t=1789072795; x=1789677595;
darn=lists.infradead.org;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=EkH7so80a7aIk0NYZdzkE+14DHLF55GpUd8v10lnZsc=;
b=sareWolx/Oejj27iXL6vpLvoyU1aC1LJDyrL2yZx3X4VKMh7gIyXHyV3YkTYIQVmjl
ddbfqyYUoICHEz995CJukIihTmiOR9bJ70tAjJEwYNMAmH3U5s6lRi85h87mZtWAXHlu
fQ/jg8jnkfLVksahywLVX5ABTJ4uzJPzTTUhYyBdqnCAjmE7y6WeyyFZAyg5X9dFGW1f
1oo+lEBsLlg6UyFU0C6N4zVo+RpXo5eOGc6ZdmgQhpAjAFNZw9IHJ1yscBiRvMbBJ6Qw
tGMmDUv5/rcfstXemfQEEuFviuIGiLHlGGeKyuTkyKNfnkSERI0XLDuclq4X+dr9+ZT2
l6BQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20251104; t=1789072795; x=1789677595;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from
:to:cc:subject:date:message-id:reply-to:content-type;
bh=EkH7so80a7aIk0NYZdzkE+14DHLF55GpUd8v10lnZsc=;
b=clUVl7SUkPMcsACtogoJlImFF+x0spgwLK3LhevvLdXk5GP0kR20yV5LkXYP33WSCP
XkGrMco4PqUUVqg3N82Qct5qyoWqUztLtkjbFv52Am2g1vtEcRAy59OudtIj8mSO15Ss
8GrcGobRbWo5F/Bxj7lm5lToYssTnNLYGa+MzUp4qv2fA2nnhuA6g2laTB4OtgjJuYMZ
PiJ+GrpD8oQ7aprnIN5BK7OIqX6dsTPDxyhhnzQ8dmY4XZxlCv7LRS4ibWYMu88K9bJK
pCXeCG5zwA9EnpQRPKeZUhulylWND9UWua9D2Aaq/RBO9ulWydyx4jFp7EELN/ICE2dl
VxQQ==
X-Gm-Message-State: AFuF++kEI3kkNXmzTDV2VMKQ9hdSQ2ZnUIxmzvvt2AUMhqzffctku6i5
A3fRcxMqFAKhMjXjIuv8yjWEr7MTQJelp4Uz86a1ZZLGHz9sobuo22Ce/IDDSg==
X-Gm-Gg: AYBFou1Bw/B5hCGPWKmMCQrUdjXCbbbJo04e39KPFTgLz86Cberh+tL5wuy30zEsiQC
h+G5mmknEEFSUyES0JP9jIrxf8EGRS698flJ7o1IflCdJmZ0yC9quGz3h5Jq/bUVuW9Nzm07E2T
f4q+1ezilwRwHga65uPxuBzT9VuAcZ0B74RnSpKmFW1eGgKKBQ/QElYnBzT+LClj7r8NoiMavTQ
rhFWooNLC26xxkt1WNuzPGxETD9qaz7fe313WeZhLkc1Hiw4o7hs/0zLAobNNYOBndG9iGKKGa8
6KOXNeLKURQYh7cS0LAn97vs6T1J+DUT6SC2QZXhDWjgVHwUhpuvfwkv580ts0g9QtAm1vyxJd7
iw6+fkRuRa6CyYEKcHI8y2pBMJA9Eq+iUIzBOrkM6LM9IpcSM1b48BjjoPuZ9j0I2oFHui5uYzz
1pPsPSckFehfVXw5DEg0VWSiozJt/60v5NCkzxJwmUjVnne3lkKY+ZwC8LmPBE+uCmpX8x7zBt1
zUCM0vxnZA7+P2muFHBSgc=
X-Received: by 2002:a17:90b:39af:b0:398:bf7e:b267 with SMTP id
98e67ed59e1d1-39d9bc0cdcfmr796093a91.2.1789072795145;
Thu, 10 Sep 2026 13:39:55 -0700 (PDT)
Received: from tach01.nordicsemi.no ([183.83.138.150])
by smtp.gmail.com with ESMTPSA id
a92af1059eb24-14365ba71cesm1010807c88.13.2026.09.10.13.39.53
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Thu, 10 Sep 2026 13:39:54 -0700 (PDT)
From: Chaitanya Tata <chaitanya.mgit@gmail.com>
X-Google-Original-From: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
To: hostap@lists.infradead.org
Cc: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Subject: [PATCH 2/2] NAN: Fix maybe-uninitialized warning in nan_sec_rx()
Date: Fri, 11 Sep 2026 02:09:48 +0530
Message-ID: <20260910203948.443913-2-Chaitanya.Tata@nordicsemi.no>
X-Mailer: git-send-email 2.43.0
In-Reply-To: <20260910203948.443913-1-Chaitanya.Tata@nordicsemi.no>
References: <20260910203948.443913-1-Chaitanya.Tata@nordicsemi.no>
MIME-Version: 1.0
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20260910_133956_054046_222FE075
X-CRM114-Status: GOOD ( 11.59 )
X-Spam-Score: -2.1 (--)
X-Spam-Report: Spam detection software,
running on the system "bombadil.infradead.org",
has NOT identified this incoming email as spam. The original
message has been attached to this so you can view it or label
similar future email. If you have any questions, see
the administrator of that system for details.
Content preview: instance_id and capab are only set by nan_parse_sec() on
some
paths (the else branch sources them from ndp_sec instead), which is enough
to defeat GCC's flow analysis at -Os: it flags both as possibly [...]
Content analysis details: (-2.1 points, 5.0 required)
pts rule name description
---- ----------------------
--------------------------------------------------
-0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no
trust
[2607:f8b0:4864:20:0:0:0:102a listed in]
[list.dnswl.org]
-0.0 SPF_PASS SPF: sender matches SPF record
0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record
-0.1 DKIM_VALID Message has at least one valid DKIM or DK
signature
-0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from
author's
domain
0.1 DKIM_SIGNED Message has a DKIM or DK signature,
not necessarily valid
-0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from
envelope-from domain
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
provider
[chaitanya.mgit(at)gmail.com]
-0.0 DMARC_PASS DMARC pass policy
X-BeenThere: hostap@lists.infradead.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: <hostap.lists.infradead.org>
List-Unsubscribe: <http://lists.infradead.org/mailman/options/hostap>,
<mailto:hostap-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/hostap/>
List-Post: <mailto:hostap@lists.infradead.org>
List-Help: <mailto:hostap-request@lists.infradead.org?subject=help>
List-Subscribe: <http://lists.infradead.org/mailman/listinfo/hostap>,
<mailto:hostap-request@lists.infradead.org?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: "Hostap" <hostap-bounces@lists.infradead.org>
Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org
|
| Series |
[1/2] NAN: Use __builtin_ffs() instead of ffs()
|
expand
|
diff --git a/src/nan/nan_sec.c b/src/nan/nan_sec.c index 8561c7cd3..2ea267717 100644 --- a/src/nan/nan_sec.c +++ b/src/nan/nan_sec.c @@ -596,7 +596,7 @@ int nan_sec_rx(struct nan_data *nan, struct nan_peer *peer, size_t shared_key_desc_len; u16 info, desc, key_data_len; size_t total_len; - u8 instance_id, cipher, capab, gtk_csid = NAN_CS_NONE; + u8 instance_id = 0, cipher, capab = 0, gtk_csid = NAN_CS_NONE; u8 *pos; int ret;
instance_id and capab are only set by nan_parse_sec() on some paths (the else branch sources them from ndp_sec instead), which is enough to defeat GCC's flow analysis at -Os: it flags both as possibly used uninitialized when copied into ndp_sec->i_instance_id/i_capab, which is fatal for any -Werror build. Reproduced with plain gcc -Os -Wall -Werror=maybe-uninitialized (GCC 13.3.0), no special build options required. Initialize both at declaration to keep such builds working. Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no> --- src/nan/nan_sec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)