Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp14946740rwd; Sun, 25 Jun 2023 07:18:17 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7OTUOCJEMTmhD0ZYH9aejiGNXlCWinF8LCdVOVq84S1sLombE5GGwzwpeSOPvCBS7ty1lJ X-Received: by 2002:a17:902:ec8f:b0:1b6:4bc2:74bc with SMTP id x15-20020a170902ec8f00b001b64bc274bcmr6339178plg.2.1687702697525; Sun, 25 Jun 2023 07:18:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687702697; cv=none; d=google.com; s=arc-20160816; b=v9DwQxnZ+6YjfVG3fuhmEFV04qjwXMZF8DxKK7tG4dh5IQ0G8FS1cMW4fI4T+V0/E7 mXCTpyE6s0r/lES+15UMEXvgVl/B33OSt4Z9kXZCf8ByrDFqUyJIAfQCVFxJyHT2h6oM w4DoI9gUnFwr0aQ6YMqhWUd3RxLcFHouseuSyUeBbXcWogrO998nez6tAAQwj5aBn5sV z1/sQBf6lM0HlJT5A8dm7lwUfO8auTC4hKnqBIWW5Gpp70p3+GPd1gZqCuex2fX8AlHm vREYRoG8eVW+9BOMLBICzu7T/nVsPNp6nGHf2BrtLBCgFuZi+aLEj64nWgPW4OM145U4 8OGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=ZuAG9jAdxVasKdX2usI2xLW6Z40/NeC0yYSwBQqZYDc=; fh=Db+aT7a09PSItqIBHKHaIPhiFQQEVr5ofrM0wp2TDmo=; b=BnJUhpprh90tg513rW+otZ3Ep3ZY/2u0a45i3aSkXHkcMhYT4eVZ070qxWMB3nMPBm 7u4buZ6edAqZ1kbRE6FYObmR1ZMtEfqGUAoLj1t02kZmDQxAJnyLOZjCPzao9Y7B1ea4 E0/YQmM6zE/Ow6C9W/Vyn0dRlqlXzXNKho0+2TFWaoTfW9ukYrmZhPLrke0h/zUnDPAN /daKCtJLEu2K7p+7z0Qa0V0k1sc0DZ86RfA+sL3kjL2N3eoZo9wW6yN0tvJ/1GeVjXjO r7pNMEdhDFa5S/K8vTxMwI7MuDyfE3obGpLba106r0FXoMqzuLAcGnmUPmwg0PBUf9gt Bu2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=HowsnPGW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x11-20020a17090300cb00b001ae5e5c275asi3021890plc.364.2023.06.25.07.18.04; Sun, 25 Jun 2023 07:18:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=HowsnPGW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229864AbjFYOHf (ORCPT + 99 others); Sun, 25 Jun 2023 10:07:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229824AbjFYOHc (ORCPT ); Sun, 25 Jun 2023 10:07:32 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0813810D1; Sun, 25 Jun 2023 07:07:16 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-51d9124e1baso1340898a12.2; Sun, 25 Jun 2023 07:07:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687702034; x=1690294034; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=ZuAG9jAdxVasKdX2usI2xLW6Z40/NeC0yYSwBQqZYDc=; b=HowsnPGWbWKV8NnSpGwN385ujM0UcLFoA+AF/IgiJeJHXVmqLvEz4tyWpfe34UD0TU WskYE082R+k7JWgnV0tJ4VfvCKWQcVwkMPZrQUKwCgUEcRxVJXqEcwv4IFwYRUkTEgNn gXL1LPq0oeY9BBOAN8pCPm/XGNXvAvbSrMUADsvHzwD+mVjMe3zhNoGJYMoBzr0A9OXt cXIUgLFRH0n1Fh09i6+BtWIgBamHSvw7xxsYWCxCHGUQxm6AgxdOhXqoh/A+OmE2TRav CVVTZN+mNAe8rsBGtG/hyFCQ54NPSyJciEnK7r/4Oq5f4wetnXT35YcMMOuxsCyWFmDI ClGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687702034; x=1690294034; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZuAG9jAdxVasKdX2usI2xLW6Z40/NeC0yYSwBQqZYDc=; b=GkoEmzislPgC0Sah3p47MWoQEQi2lHcuAPOzomBufXoBS8z+FDhPf2lfUDAL4NqVON fQuvOICMRidpHzUC7mwI0i//L08czJBhgcHvPEV5s/mXI7BPD95yjX7AZYwIGiSa4a0h mRAi3RsGJ0+PqObH0ATbZpOh67J5/sV1y+v8vTNUoBBK2JJ4J1P9p2qbva4RFaMG6I1a mhd1DyfXVBLdAMWkKBKcJTzAPslOiRIxf4nw+0HF4DLtHz67bwbm2BmFjr5cJliKHn1N lVVYUnqo0eweHCdK06WujnafDcYrIHE9UwpwRGIo/86m+cBzgsw8WKgGMosvWxdKS1th lv6w== X-Gm-Message-State: AC+VfDw2nPcSp5Gp1dNzbOWZM7rGunGPe+Kc2CXpqIpIbxMy+RjbK1hj pv5ehPq92Dw1luedBXBEg0XnkZbyCA== X-Received: by 2002:aa7:ca4f:0:b0:51d:96de:af6f with SMTP id j15-20020aa7ca4f000000b0051d96deaf6fmr980161edt.0.1687702034115; Sun, 25 Jun 2023 07:07:14 -0700 (PDT) Received: from p183 ([46.53.249.169]) by smtp.gmail.com with ESMTPSA id x26-20020aa7dada000000b0051be4cb7f54sm1793067eds.84.2023.06.25.07.07.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Jun 2023 07:07:13 -0700 (PDT) Date: Sun, 25 Jun 2023 17:07:11 +0300 From: Alexey Dobriyan To: Lin Ma Cc: steffen.klassert@secunet.com, herbert@gondor.apana.org.au, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, simon.horman@corigine.com Subject: Re: [PATCH v2] net: xfrm: Fix xfrm_address_filter OOB read Message-ID: <8a80ec0b-154a-4e6c-8fb8-916f506cd26d@p183> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > + if (filter->splen >= (sizeof(xfrm_address_t) << 3) || > + filter->dplen >= (sizeof(xfrm_address_t) << 3)) { Please multiply by 8 if you want to multiply by 8. Should it be "splen > 8 * sizeof()" ?