Received: by 2002:a05:7412:1703:b0:e2:908c:2ebd with SMTP id dm3csp4128706rdb; Wed, 30 Aug 2023 17:15:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE3ompswbUHcwwftScfLr+kLIw6ePfzvNPZ9SaReT/tpwAOWXK4fzMAV4Sg03Z2oVneSvlQ X-Received: by 2002:a05:6402:2cd:b0:525:6588:b624 with SMTP id b13-20020a05640202cd00b005256588b624mr2993360edx.37.1693440946116; Wed, 30 Aug 2023 17:15:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693440946; cv=none; d=google.com; s=arc-20160816; b=NhrJ6qdDT+EkOhlmiY1meoWxXCdSD7UBKpROdOAJoKM4780O9HlknN95JOeANWvLNS 7+hp/1vLyA1eJl0oChw8lM5prZQLtmtBGZqtIOdxghDPTfT6PnLC2Qmb74nYgDBvmpPq ZwshT8FrzoSc/YPrfsOsMZrormoh2hRRYxI/EWlit/3VIWCiNhAHTHot9SyIjInP7KrH 1BJtLIPIAaKbHOK3Xn+FVbzPqiaAjNNfepF6jYykQFIphwnprMlv3yQq8IJxd5JWQcYh Sb5u/WJkXqCNtKZtYk78hGCK4KR0h6InC5jU2bN/u+W7yxpb2gGDIcYLLufTJhY+6Cr2 VXLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=lHfAtqes1Pr2Mwqdamq+AFVolSBaH8irxhhq0GPYL1c=; fh=BLnIxtQ0kZlNzsjgC9xGvS/bnB+YLuvQ3KifJYiLN/0=; b=Wqb3OtOFzBEM0EEiAp48qeZ0oN6bqlCGdzqt8WDjKjfyRJCjh3ONTjQL4i/6ICYcZ2 mLFiwlZX3W5bJGF5yebdHRTthJ1iBZIvrUHXEpJoYFqQBN4qCqSfIGAsjnmSQ9hAGRtm KFwvI2u5YhgAq8myIvDktbt3dlaofJtkCsjbGR2RtG//dfOaxwQhrk0CxABJt95Rcn9b WuTkTYxPPFOkBH0IqGvlaUQdDbKdVDlvP8tjbXJB3G9/RBhYnk7WuHdDxkUsa88gDZUK L2OanEJw/6Vvmz0i0E3T8dQmE44MLojZ0TJSp2pkmYiAq5ScKjsb6ebkRg5XdJniNx+/ 8Kiw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e12-20020a056402088c00b00523703a8793si243580edy.181.2023.08.30.17.15.13; Wed, 30 Aug 2023 17:15:46 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244210AbjH3Sxk (ORCPT + 99 others); Wed, 30 Aug 2023 14:53:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245616AbjH3Pme (ORCPT ); Wed, 30 Aug 2023 11:42:34 -0400 X-Greylist: delayed 1478 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 30 Aug 2023 08:42:31 PDT Received: from ganesha.gnumonks.org (ganesha.gnumonks.org [IPv6:2001:780:45:1d:225:90ff:fe52:c662]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6531122 for ; Wed, 30 Aug 2023 08:42:31 -0700 (PDT) Received: from [78.30.34.192] (port=59344 helo=gnumonks.org) by ganesha.gnumonks.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qbMwz-002KTX-WE; Wed, 30 Aug 2023 17:17:48 +0200 Date: Wed, 30 Aug 2023 17:17:44 +0200 From: Pablo Neira Ayuso To: Wander Lairson Costa Cc: Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Harald Welte , "open list:NETFILTER" , "open list:NETFILTER" , "open list:NETWORKING [GENERAL]" , open list , Lucas Leong , stable@kernel.org Subject: Re: [PATCH nf] netfilter/xt_sctp: validate the flag_info count Message-ID: References: <20230828221255.124812-1-wander@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230828221255.124812-1-wander@redhat.com> X-Spam-Score: -1.9 (-) X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS autolearn=no 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 On Mon, Aug 28, 2023 at 07:12:55PM -0300, Wander Lairson Costa wrote: > sctp_mt_check doesn't validate the flag_count field. An attacker can > take advantage of that to trigger a OOB read and leak memory > information. > > Add the field validation in the checkentry function. Applied to nf, thanks