Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2179157lqb; Mon, 27 May 2024 10:15:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVJgXyHmqRAPf5OKvu9dLUcX4nIrCsEfwKUdNBIBKij9sVJrY/K6aMdBFBg8Xf6h8xU10st2NHygNAv8kbtPVAGxkiJ3CVMOZ+3W6jVSQ== X-Google-Smtp-Source: AGHT+IFq7K4qOqD2qZ16imvp7WVQvzLig6NYa9r9b7xAWkmMj7NB26pA7nJt04F6stQ1N6HiGvas X-Received: by 2002:a05:6a21:1518:b0:1b1:d591:d24 with SMTP id adf61e73a8af0-1b212d2a8f5mr11412456637.16.1716830138555; Mon, 27 May 2024 10:15:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716830138; cv=pass; d=google.com; s=arc-20160816; b=gX2r/0fuo7TuhF6/YMlBsJ53emKQPRQXW/bFGi0g/DqaQKG9qA6y3/2tsXinr8tzZv m8G1zlqUifiVpTxPR0JPMBt0pLx05tz3h6kgOb3tcBUMclwSkF5TBEBh8dWZmNlZFE1C ubc1sZv3YQHVQ1TYL/Kw4u7p90ZIY28pBmLL6iLI1tsRvOwRUs1dl8EAhWYAuKcWTlV5 pXSmNs9LhOAo0uRqiOf1du/5t6ddAIDWsVXqqEwdmqH0oqqUkLebWipqvy0Htxebq9Xn E44P9rLniL4bA5ulMcI5/6+7aMcsQuQZw3xDeNWwZ1JR3vY9JBx/q6iq9G6l2fVXff95 cJuQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=4qry9sYDGajJeY4fVsirha9eAWJAMinOGzf9tAKKrEU=; fh=kiH9BsJ+TyHZ/0f9lp96S1R8k/374lMiI4doNuDXH6k=; b=vqg7Jzgzc9rSYzeqQqfYCewvSSaTBrK0nhnW4uW8+xgxs3+1E39slan/0ILfM+FFdk ciV6cfw9Oc+5/JZmz/bDOA0gjo40dsNDBkgRYZqe+Hk617O03GFK8+XfmoaCG9bp1Rgz U8syPLVz/aSXOWdrKzPSb9vcfrXfNfv2maC4KcYr6tR4P9APxJ+uDlkCrhZ75AQkxRfz +5PhjgmexDZ1oNVCbuARwYO2wVJb48hA0GY+ahFNYzbfczZNs1jifIx/h50/abtBBlNI ClPHMVLUVtVRYyRLfwJEFFBpSRQqj2dMK7fIGYZja8vvzrEncATh4U2oruwyLGrQn4j8 WRsA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=CLoJjkT3; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-wireless+bounces-8136-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8136-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-682289de76dsi6880513a12.546.2024.05.27.10.15.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 10:15:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8136-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=@gmail.com header.s=20230601 header.b=CLoJjkT3; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-wireless+bounces-8136-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8136-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 D4A94282081 for ; Mon, 27 May 2024 17:15:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F23721DA58; Mon, 27 May 2024 17:15:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CLoJjkT3" X-Original-To: linux-wireless@vger.kernel.org Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 398C417E8FA for ; Mon, 27 May 2024 17:15:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716830127; cv=none; b=MeU+37Z1d65RrAve5ti+ca7H6tg6KrowNa9jzE6LqDA9MYd6FQWn6pefLmRyp+/zgPL6ELhEmwqi4DnaPiTxkZ+xB8Ng5L6OOaNtYiDAzLyq0UeKWLcfS+cDjuiylJ95k5o7PVanM/+3Er/Mx+rfRNIphQ81nemivoGcwBCWCS0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716830127; c=relaxed/simple; bh=4qry9sYDGajJeY4fVsirha9eAWJAMinOGzf9tAKKrEU=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=nZ1Th66cXzEj0E4MytME1zDeeJt9XgkTUpY7m0enxrxOXdisOXrP+CRm3sj8/zWIwXsDZsq1iqRh6iVYYWc8ppO9xf7rX39TF5EAshTYGBQ1Zulb65Z5K33thuXbUxy/bPZisE6s96bvUIJnBbew3+fcT2EGJxBAOUtdEYmLG7U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=CLoJjkT3; arc=none smtp.client-ip=209.85.208.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-579cd80450fso2134585a12.0 for ; Mon, 27 May 2024 10:15:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716830124; x=1717434924; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=4qry9sYDGajJeY4fVsirha9eAWJAMinOGzf9tAKKrEU=; b=CLoJjkT3PerAGWAbuDDZ6EcMu4Ox/YX2gS5+91mIVnYbvz0UZz7vtGPrHrcR7clTTr lmHKMPg2vsQynAhMVq61CzZNylDc6nb1WuTYOPqj/ySK539VbVjQ3YQ7oPdAKZ6+kG/u mSDPiAxM0b59RCB6MifPVir+Qr2wUb4wbHBj5YM40PhfHuLx4YH6wQtJf5rtjSZr5Q9i /nk7GxIbEQCkx+A4C1G+W9vpfIGdVKycmpA4JBtCPBmxsMTjXl/5vzDmmQffv0moTvss tp/kKYAQpRJBPRNuYsvmlanZxmPM3gI6rMcQ6o8nAgBnRYoV4nq5AAfWct6mXLrf3Ge/ xf8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716830124; x=1717434924; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4qry9sYDGajJeY4fVsirha9eAWJAMinOGzf9tAKKrEU=; b=w0Q0IQUP+82tEv3trIIcKpK+i0SR2UqwT11/YQvIVX6Z602iUNAUCntU4bCEv57E2I lpDfzUh/DADvsKObUd/O+p8pb9Rh6FomUW4hL2SrFO89LemaZECEo90PpS/yzIG1ci3y h8aGfKFzTCrWVRDKI6ogcB9V/42GVX+h0wB9O/A7zCZ0GcnGM4X2o4piCNcuXRl2P9BZ i8IVKAGLMYBgQTvkKGqvG9sMze7flKgme7KpzKL768Sew+9jJkRlQ9Pj3Iqv8dThJjh7 DVudyDIw94Y2gP3hA596AZH+QE1g84fArthghKhedhAMTmuVv7sgvRaJCMCiI8xyhsmo 142w== X-Gm-Message-State: AOJu0YxLw0Mif9dsFiCFn9ZuFsy6h0IqjwPaYTjiuv4dNV6cK0FfVOJC /Q8h9aE6v6POJZpRUjL7ZNrLAYjV6fClJCAkg+UWHGKTraTOVLaPd7hkAZHJx6jIvCxU9g3keee 0OTRf9+CwQMfXiGbHJCyomIPyBYw= X-Received: by 2002:a17:906:4a91:b0:a59:cd1e:2012 with SMTP id a640c23a62f3a-a623e9d499cmr974628366b.23.1716830124226; Mon, 27 May 2024 10:15:24 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: In-Reply-To: From: James Dutton Date: Mon, 27 May 2024 18:14:47 +0100 Message-ID: Subject: Re: [PATCH] wifi: mac80211: add input validation to sta_stats_decode_rate() To: Johannes Berg Cc: linux-wireless@vger.kernel.org Content-Type: text/plain; charset="UTF-8" On Mon, 27 May 2024 at 06:41, Johannes Berg wrote: > > On Mon, 2024-05-27 at 00:43 +0100, James Dutton wrote: > > Validation is required as a result of parameters derived from > > received wifi packets. > > I don't think I fully agree with that. First of all, this data is never > actually directly derived from the wifi packet (certainly not any > pointers or the band enum!), even the PLCP contains different encodings. > Thus there's always already a translation in driver or firmware. > > Now of course we shouldn't trust firmware either, but even then there > are a lot of places, I'd think this is better done at the driver level. > Hi johannes, You mention "certainly not any pointers or the band enum!". How certain are you about that statement? I ask because received wifi packets can and do result in unwelcome values for the pointers here. I did not say "directly derived". Kind Regards James