Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1858299lqb; Sun, 26 May 2024 22:43:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX2xxr2XP2g6FPrSOYNtgUK3pk25gedObDJl2/eA7CNDID3+uFTbty6Alg2DNgxhqu4SQzBWhd65yeWPF2quIb0UhS1/JkDlH8Tqw858g== X-Google-Smtp-Source: AGHT+IEhT0Ht+7p/eQzql4RPmpJaxGorHej3KXgqDaQQJrOHjz+Vrz9PD3qxljOdxYPgv9xKmn8y X-Received: by 2002:a17:902:ea06:b0:1f4:a552:7e88 with SMTP id d9443c01a7336-1f4a55281ddmr10507465ad.61.1716788592735; Sun, 26 May 2024 22:43:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716788592; cv=pass; d=google.com; s=arc-20160816; b=OOBE7hfu7paYoO4KzSUeAi8AJu8SMvRqHsyXtG6uz8PTpEnSv5lpgWb5hZmmtEGood zxulB16i1vYDriUfvlvHeobbvzmu9THKVbDtmFlBorQNCaR+smIyV9WnDD6to/92SW78 rJd86KbVIljFTSpV2VcK08NPaMOWoCLIvFmC5ZB1agX+QfGefMfPB7jwSuyuuNKrwCeR iZgfuihIJk/JGXi9qKN+WOcG1rIkzaihsI4sJE4VQuDJebUXVTSuPrx47k7hjibKrLCf yddF0kFkhNsokpH1p5wWerWSWD1Z8bfA6ytc9cf95qC6ga52Qhpm2YthwI14RhLBKX8E SjVA== 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:to :from:subject:message-id:dkim-signature; bh=7Zgy3yIwyj97/6Z9pGrgGBjg3cjGtk/SS+82VeVmqRU=; fh=Uwe2J84mAhWpAiECTn7sEM+sdLibwaPuqBca6gkuaTo=; b=VhTuJh2psKWQlPxTJJWF0Abt146x2pCnSM/IDhpZpPptS0pA9eBRdYdPWiMCynjC/x bT/RvvTvfotwhwKl7Va4napiSUQGYEOW/1TIQ2wMy/G65ACqavngBm6BuVTdlk5ceD1T a/ElkTeZ2ViFsh1GLuVixosIgeJp08PGiU8nMxGSNu/+z+V5sP3OVLXP5UPwy1aqVC42 HxqE4FklBbxstkr3v9UMDqLGbvmDE+f1ZuksIWV6W6nO0lver/aOmCy54uiBon6QKYvo uqTfY+KhEPVllgeDNuOLDLRo3p7wc4/+wF9aCcz/dWM9CU1VhOjDrT6iDpB2zu7IEpZU ubJw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=kAJchzDk; 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-8072-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8072-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f44c970570si53152025ad.315.2024.05.26.22.43.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 May 2024 22:43:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8072-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=kAJchzDk; 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-8072-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8072-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id BF707B210BF for ; Mon, 27 May 2024 05:41:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B6249D266; Mon, 27 May 2024 05:41:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="kAJchzDk" 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 2DB871A2C28 for ; Mon, 27 May 2024 05:41:31 +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=1716788496; cv=none; b=heKrwBhjnY0C8kYU0NIeOsjbRaN0B+RJxD4bwcbrsJhS61o6hTPr5ax/Sz4RwUqrlkLIEYh29dMTwXcEn+KiK2bJ/RgskpId/keucQA+ZjOKFknR0obab8ipDdyXxz/FRypFEy2GxwMu5hHQsbaXSQE7B8lxHVOt4csg59Hft4c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716788496; c=relaxed/simple; bh=7Zgy3yIwyj97/6Z9pGrgGBjg3cjGtk/SS+82VeVmqRU=; h=Message-ID:Subject:From:To:Date:In-Reply-To:References: Content-Type:MIME-Version; b=Cj6sVi/pJjt+83lTzqc84SMSKVnB2H/rCtKHGnQLKXmki0+gSLEIP1Ki6tjbMsbgARLvMfHHi17277R0WCZs0VZcahc7mxpw4UEb+ru/ucx2BI5x4D0zBDyEZOOzteV82tR6NRN9S6dzfy6X8A7mhtaQG/j5d2sNc267c6w0GUk= 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=kAJchzDk; 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:To:From:Subject:Message-ID:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=7Zgy3yIwyj97/6Z9pGrgGBjg3cjGtk/SS+82VeVmqRU=; t=1716788493; x=1717998093; b=kAJchzDk1QjKmC6SFTFlWKCJHRzBr5Zf1GjyQ9/IQyCLv9U 2EXxlFu38zs62yBUEBpKh8MTdUW4FIp8ScmmDvFrTZhKGDvxrVs1TBFJcNOJ+8t/0JiVhxzuttJ2r Jxg85zxT5R3i6mmcWvCcAR+vVVhGnseTf43eyTRUi8z4TDHl5fpATDZn0HbGkVM7PnGxa1l7QZtny oKfbHY4nUYq88s6mnYUnJkViZHPU8NoIKms1ToMUyiMYTu2fYNbkZFN0dC7KnJB75w1K32AyyWyGJ 6jeax0ujcZIQ8MdLzMPMSnjEA03y1objNom7H0mjf2Ywhc6nQQVEbHnnA/XGsT7w==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sBT6o-0000000COk7-3uEo; Mon, 27 May 2024 07:41:23 +0200 Message-ID: Subject: Re: [PATCH] wifi: mac80211: add input validation to sta_stats_decode_rate() From: Johannes Berg To: James Dutton , linux-wireless@vger.kernel.org Date: Mon, 27 May 2024 07:41:22 +0200 In-Reply-To: References: 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 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. johannes