Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp832198lqg; Sat, 2 Mar 2024 03:53:05 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVSCy5H8MIL3d0oF1CgpthCWPTdpbMzsIgca9IyfQ/LtNStHxQ5araYrhm2ghR6TppCDQ1N5HibR/uBF1KGyET9fbC5S4pQSZMdH2L2LA== X-Google-Smtp-Source: AGHT+IGcel1ffrqULpz+8WXYxOzaPVnp87sJIIuD38bSG/MWz/I/OZqvB9vT/amqTHBZ9S4wB+3n X-Received: by 2002:a05:6358:6f86:b0:17b:f2d0:eac8 with SMTP id s6-20020a0563586f8600b0017bf2d0eac8mr5187070rwn.25.1709380384699; Sat, 02 Mar 2024 03:53:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709380384; cv=pass; d=google.com; s=arc-20160816; b=CqxX1Gsp7bOv8SCIeHtrpNJR2eUbciKB/8CN9mek7qLzrTjdCoPpUeD9X1qUnAA9Eb HDXs6XbxPqVVVeulwoADmjtpnTkANF72mVgx50atnv/GbJ2ZeDmYy78PFNzCMHgSCmrZ Cs85oCJ3lsPtJOGwfvndOCvceS9Eci9sJnOg38T2AqLA38ivstXnxep0Ll4wkGlVmPz3 RYMZ/+Y16evRNnNpq+GDzKYxqm+M42LhEjn1UNEl/4zOAuz+IcHxA+XfVDG4R2Z+OO5X C/RTrWNCXkb5dtmtx4tX/EUNU0ba3+cfFQ/7qu9Cdwj7pWX3zieA9JmdW/7ungGXazWm 11Jw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=XrDzgApnlBKNVQQ9xVENEwbUNeW5a+gJPXH09dsxa0w=; fh=Qeje7cevoWpbglweU+flgGEqGHSpc8te5nXtOwS5Ha8=; b=e4M9kRw8nmCj2P5SCj0pKYpyfqX+Uu3dFa7llIRlUjS39jOaaWEuFLTUpEkuiKqJaQ E0tmcp1IZWEF6MQFTt+lSZfRVKKQkJaQ863S6XzHB/V4X4u3iGfuChtfqIX+LLS9TyIh DiTKSpYjKCC1GM9nCYzTPlnsqYuGkkOvQhxuUk20CRufwONc4fhEMhGd68cOD7/oWN6E 7bttdJLuXdPSzK/C49gFZq7r3DlV65I91NwnqAzEXw2gftFmyI5W2ZvGAinub7JoueWl wgwIqg/p0tXWYFCpcjz4wqSofrRDF5QpUQzBF/vEEVsJC3MkUALwANE4A1slrLmj42JT Eg8g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=strlen.de); spf=pass (google.com: domain of linux-kernel+bounces-89439-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89439-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id br12-20020a05620a460c00b0078815a29e5fsi1744675qkb.577.2024.03.02.03.53.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Mar 2024 03:53:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-89439-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=strlen.de); spf=pass (google.com: domain of linux-kernel+bounces-89439-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89439-linux.lists.archive=gmail.com@vger.kernel.org" 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 6D9BD1C20BF4 for ; Sat, 2 Mar 2024 11:53:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A2F0017573; Sat, 2 Mar 2024 11:52:53 +0000 (UTC) Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [91.216.245.30]) (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 D8B6E10A21; Sat, 2 Mar 2024 11:52:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.216.245.30 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709380373; cv=none; b=nVOkQkEa/VEKIkwMcX8vwLNgpb0U0E8CRKLYjHfrbw0XH+AjgqKJ4oFaiTcIlj7f49vzJjfCK9sZL5XdLuArjeLKcrCMzCpLh/VHa2nhhne/sni+vtyuSrErSBCosqXBgjTBmGEtBuoiBiI0Rs23KEEAoG5MK/Mo0GfZ8TnfqiA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709380373; c=relaxed/simple; bh=8xHNwMMQvUphpw7xYtBL3c+lR7+sHEAbXvlGd+ihcF4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OIe/CkqD6etmlHc9ThNC/lhB9detF15EOOP/1nUbQuMaAei5ST8Ad9Mn1hU04jBqgNvSb0HSj6sqtPPICyj/Z+OBA87zK2/nh+XWP1e3zrIBjDjdWCMO+acOFbDHqoDPjt5Fd3gGu7Qvi4+pO3U4wPN3wFp/MqG6yPmEZK3pck4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strlen.de; spf=pass smtp.mailfrom=strlen.de; arc=none smtp.client-ip=91.216.245.30 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strlen.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=strlen.de Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1rgNuz-00027B-Jh; Sat, 02 Mar 2024 12:52:41 +0100 Date: Sat, 2 Mar 2024 12:52:41 +0100 From: Florian Westphal To: Pablo Neira Ayuso Cc: Lena Wang =?utf-8?B?KOeOi+WonCk=?= , "fw@strlen.de" , "davem@davemloft.net" , "kadlec@netfilter.org" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , "netfilter-devel@vger.kernel.org" Subject: Re: [PATCH net v2] netfilter: Add protection for bmp length out of range Message-ID: <20240302115241.GA7494@breakpoint.cc> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Pablo Neira Ayuso wrote: > > + if (f->sz > 32) > > + return H323_ERROR_RANGE; > > Could you possibly place this in get_bitmap()? IIRC these are the only > two calls to this function. How would you signal the error? I think this patch is fine as-is.