Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp745110lqo; Thu, 16 May 2024 23:25:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUzDi6JHSbeuz/KHSRKFpT0Tv80i1nxlzNJkz80nE9bKOMt7v/a2Fabgom1KpVlr2obhM7twhb95uBHe53/ZnM201DV/egBXdsAc4OG0g== X-Google-Smtp-Source: AGHT+IEvQ7mMJ5GOCw76YWUTBcn98N8HzmITPCMWgB2UiS6b7KaKSIwFiajpe26Spb1Wo1FT3FfL X-Received: by 2002:a17:90b:1110:b0:2ba:3ed8:5113 with SMTP id 98e67ed59e1d1-2ba3ed85204mr4103679a91.3.1715927140386; Thu, 16 May 2024 23:25:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715927140; cv=pass; d=google.com; s=arc-20160816; b=aPEUKJiRnkM4vZeTzHeIvLmNnLwHG7wfYGG+KeqpWzNXUsqzM1olv2lVMQi9NhEoh6 BTTr9ZBAZVy5Gdsiot7HvYRs9B1fX9VEuRTb1NOTkKrMv7/SIwxftH6emA+0PhHxzxfP zVqWVC3YIB13rY0E/bVxn5KKdijcYpf/wzA7c484LHQIVo3Cx3c2IEOhBLwWq2dGEFLT ZXPHEpKBoVkoX0NVAeSHoMLZ6BIAew6IBtILbqcHjLIDdGkIrG2pJCuCZ4FTWIMfkPf7 /3FGHNlki3auXuQ0ujyBzySP53OisMwbEzFJRZz3DXTMABzqhoKLzHoORwRf+y/lUW5H jUkg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=qt28qpGihbsLNTy0QXcH6ifyS6+qu1VlVPg9r03RQhY=; fh=l4EiH6unKEU5thu2oUeTxQbuTyX8f0MQ5UUEyrP6vNM=; b=t5hFm4ZOY3x+t08hpSItFH7nrJEKysRPbvgXK4TT3QsdNGOvdFUn5iI/Cr1//8g+G+ U9cSQLOtx/+J3tlShxxC0sFUf7e/yvSXrtIXZVHoorElrp1Vshhc75RLWa3uLYK7d1+s gAO2ZuN8pHF8YUZmNBWDc00rqSadypYbuBdVqljczKRAL+aeg/9bKPBl+lUpIno/jKj7 AflSbVPHiPN8gvm64Z3X5SWEmKTw7GRuK6DS+kPTcXCZkrKgXFgZAO7BcxjvK7VyahY+ PFPqsMZzbLQdznFcUJ9j8pyd6dRrdL39yKY1GEbY3bvbi+GhmLWU3o3LUy3MZX+UAJh9 iqgQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=tk+gIjdr; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-7766-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7766-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b6714724d7si18441002a91.98.2024.05.16.23.25.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 23:25:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-7766-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=tk+gIjdr; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-7766-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7766-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id F024F2827D8 for ; Fri, 17 May 2024 06:25:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C721B134BF; Fri, 17 May 2024 06:25:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="tk+gIjdr" X-Original-To: linux-wireless@vger.kernel.org Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 99B4A134A6; Fri, 17 May 2024 06:25:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715927135; cv=none; b=CDC+OMVSYHrEjggq5ct3byF/0CdJYcx3dBbjRj+2ntJeCtDvO2eNYoiM0boo9iBaS8KnMgZ4SDUHF/STHvdb8HzwRMoYcM2NIEq8eaLcSqGmkRl/iafQIZ5jaoKBx/ApGSy2HL7d9zKWmZvVnPrQE4ZcnoViz7eIzNXQ4OrQAGE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715927135; c=relaxed/simple; bh=qt28qpGihbsLNTy0QXcH6ifyS6+qu1VlVPg9r03RQhY=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=Yoto5i5D+3PU4geFUPi1iG+Y0m1VIdZQ7+m/70HpksE81gSOipgozfIFwhHMkyxKgjoXbYvsBEDrs5s8M0b8g+UUqYd6BckJyOo2QRpljqdecci3kSv9hGTTNA3HakZRxdZXWqY9fldqDJMZBbTMMXLWzOGXcoAfWwFo/v25x1A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=tk+gIjdr; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=qt28qpGihbsLNTy0QXcH6ifyS6+qu1VlVPg9r03RQhY=; t=1715927132; x=1717136732; b=tk+gIjdrr8g9u5ZUUYdHSRIKOd4JG17w4s2NoFRnogztVV8 S0z2JARR68+V3lgZQMwqEV6BV94SQiGHcBEaBo0axNfx7WXFf3i2jYS2L3tw2uNaEEuHJkDVUMpN9 xtkZNLERmiwppVIegzpN4Cbr6f/3593ecjYD0ukSmZP8yXNDwvrFXZ1AJS9u+8FtFQcZK1Xbz7hZ7 0Fx/B11q+/jiy3h6ESPl1Ldz3PAKI6W0EGDz7TpLRkMSYOC9XRD3mBlFG5GSkJue0JHn3EowTprP9 aeX5ujB0cKzkWn1y3cEkg4Tvmd1HOrUVQi8xdALnCMIqHAHFpxZFhn4txBm0OGAQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1s7r1p-0000000AVQj-3PVg; Fri, 17 May 2024 08:25:18 +0200 Message-ID: Subject: Re: [PATCH 1/1] wifi: mac80211: Avoid address calculations via out of bounds array indexing From: Johannes Berg To: Kenton Groombridge Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, keescook@chromium.org, linux-hardening@vger.kernel.org Date: Fri, 17 May 2024 08:25:16 +0200 In-Reply-To: <20240517002352.12717-1-concord@gentoo.org> References: <20240517002352.12717-1-concord@gentoo.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.4 (3.50.4-1.fc39) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-malware-bazaar: not-scanned On Thu, 2024-05-16 at 20:23 -0400, Kenton Groombridge wrote: > req->n_channels must be set before req->channels[] can be used. > Additionally, memory addresses after the "channels" array need to be > calculated from the allocation base ("request") instead of the first > "out of bounds" index of "channels" to avoid a runtime bounds check > warning. Thanks. Can you please drop the cfg80211 parts from this to match the subject, the code there is broken in other ways too, I have a fix for all of that: https://patchwork.kernel.org/project/linux-wireless/patch/20240510113738.41= 90692ef4ee.I0cb19188be17a8abd029805e3373c0a7777c214c@changeid/ johannes