NetBSD Problem Report #58635
From www@netbsd.org Sat Aug 24 20:48:51 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id DD1C81A923F
for <gnats-bugs@gnats.NetBSD.org>; Sat, 24 Aug 2024 20:48:50 +0000 (UTC)
Message-Id: <20240824204849.680401A9241@mollari.NetBSD.org>
Date: Sat, 24 Aug 2024 20:48:49 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: iwi(4): uninitialized stack data used in iwi_config
X-Send-Pr-Version: www-1.0
>Number: 58635
>Category: kern
>Synopsis: iwi(4): uninitialized stack data used in iwi_config
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Aug 24 20:50:01 +0000 2024
>Originator: Taylor R Campbell
>Release: current, 10, 9, ...
>Organization:
The NetIWI Poweration
>Environment:
>Description:
*** CID 1597786: Uninitialized variables (UNINIT)
/sys/dev/pci/if_iwi.c: 2395 in iwi_config()
2389 nchan++;
2390 }
2391 power.nchan = nchan;
2392
2393 power.mode = IWI_MODE_11G;
2394 DPRINTF(("Setting .11g channels tx power\n"));
>>> CID 1597786: Uninitialized variables (UNINIT)
>>> Using uninitialized value "power". Field "power.chan" is uninitialized when calling "iwi_cmd".
2395 error = iwi_cmd(sc, IWI_CMD_SET_TX_POWER, &power, sizeof power, 0);
2396 if (error != 0)
2397 return error;
2398
2399 power.mode = IWI_MODE_11B;
2400 DPRINTF(("Setting .11b channels tx power\n"));
>How-To-Repeat:
code inspection
>Fix:
memset(&power, 0, sizeof(power));
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.