From mboxrd@z Thu Jan 1 00:00:00 1970 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 814B81FBA for ; Thu, 22 Sep 2022 04:19:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4C3BEC433D6; Thu, 22 Sep 2022 04:18:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663820344; bh=8xodEWMTndBecZO1JG0sANGtdcIZJhdCKz1ZoOkxjMk=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=uW+exXsXSGrew87ZojaTnnu2Pv1UtGXzQqjjLX2b7oGph4+PQelJUJX11FgjpqatQ ELoqv5pR8bSV3/7535PDpBw6BVY4bi59s4BaKlJSIYVXzNRY6aDLmLKhJLPFtzieTO iB7297vU052/FKz0Dc21FYTixE1ykO1VrtaDUUK3SkYuK3biSXS0J7OKhhQjo/eWra 7mj2sPUPAmfSHWCc1MV6VYkGtcRnMWzr/LNBb6lPibVdaMWLqUzHsztksp0W4hjZYv zIN6846mujkb0CwMdnKoomN+OWU5pYCeMqp4QWw7CJvtecSieKja+ya7GWiRyAj90B 2nqT/vaz2aB1w== From: Kalle Valo To: Kees Cook Cc: Vlastimil Babka , Gregory Greenman , Johannes Berg , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Pekka Enberg , David Rientjes , Joonsoo Kim , Andrew Morton , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Greg Kroah-Hartman , Nick Desaulniers , Alex Elder , Josef Bacik , David Sterba , Sumit Semwal , Christian =?utf-8?Q?K=C3=B6nig?= , Jesse Brandeburg , Daniel Micay , Yonghong Song , Marco Elver , Miguel Ojeda , Jacob Shin , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-btrfs@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-fsdevel@vger.kernel.org, intel-wired-lan@lists.osuosl.org, dev@openvswitch.org, x86@kernel.org, llvm@lists.linux.dev, linux-hardening@vger.kernel.org Subject: Re: [PATCH 10/12] iwlwifi: Track scan_cmd allocation size explicitly References: <20220922031013.2150682-1-keescook@chromium.org> <20220922031013.2150682-11-keescook@chromium.org> Date: Thu, 22 Sep 2022 07:18:51 +0300 In-Reply-To: <20220922031013.2150682-11-keescook@chromium.org> (Kees Cook's message of "Wed, 21 Sep 2022 20:10:11 -0700") Message-ID: <87fsgk6nys.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Kees Cook writes: > In preparation for reducing the use of ksize(), explicitly track the > size of scan_cmd allocations. This also allows for noticing if the scan > size changes unexpectedly. Note that using ksize() was already incorrect > here, in the sense that ksize() would not match the actual allocation > size, which would trigger future run-time allocation bounds checking. > (In other words, memset() may know how large scan_cmd was allocated for, > but ksize() will return the upper bounds of the actually allocated memory, > causing a run-time warning about an overflow.) > > Cc: Gregory Greenman > Cc: Kalle Valo > Cc: Johannes Berg > Cc: linux-wireless@vger.kernel.org > Cc: netdev@vger.kernel.org > Signed-off-by: Kees Cook Via which tree is this iwlwifi patch going? Normally via wireless-next or something else? -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches