Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1026342iob; Fri, 13 May 2022 20:08:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzukv7BhHQWI+oz/sviTsOs8ruQbvVU945fD31nMFC7NscndUeAI+kVsKDd1f745IEVNcaP X-Received: by 2002:a7b:c199:0:b0:394:26d0:a6a9 with SMTP id y25-20020a7bc199000000b0039426d0a6a9mr17519075wmi.116.1652497723939; Fri, 13 May 2022 20:08:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652497723; cv=none; d=google.com; s=arc-20160816; b=H3GZ8y2gyvTbrDIPOs5hcYbtsw1EJoFLy1oMTb9DyrRynJqoIzb+5Aoq++ar8qOHs9 GY0Osf0pMNuDCkXmHmCfhIuZutwzSNE9Wi0074dfBwDhjqI53ieOg8gpF9N/awu6HI1z ZIBBgVPU+wuSIJM5k6r4xvyh60sYRXiIOjD41kcomdTgdd1xHIw40eiBu+e/3r+7BbJY GUY7qhSSSB6yO7vY4ZbI+4pJAZ31Fy3objbHny9L8BeaKLzossvHeHdNsWCDhzmnTeyO CW1CYMNJlXVUAptCAMNKbKCBqbgRGEtbLfanF+fY0zEtZB2DrK9nZvqYgrncXELAWc4I ayog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:date:message-id :from:subject:content-transfer-encoding:mime-version:dkim-signature; bh=2mWjxOmexopNeuH9LS5sR18lpK4mecDNy7PzAHhLeEc=; b=m+56dXJi0Rt9C/7MsxqdCEltLPiUwI7Dm9bJkRzDjZMePIQnS+ETFx/GreReD2REHQ QKk83uOA0wPbwuaOwt4Bm/Rc5GKe8Z6tMwniY8xu7lbtzkDMivgAB0dDGtirKbFXwM52 oWcdEoukBp+JWxnDTJoX7fGoIScFt5rTC7HuO/e2l8pBy/h9o6v7sSRHMo8zbOQ6X/47 xESlnFN+T6U00LH7Xh2tahpQ7oNLeKwZx97T0nTS4WIehNC4fazxWFAj/huFrocXJEDv UChgMMu40h/5c04UIgthRdjtGIKwZ9Bm2SVJ3hGdyUDxDD5UODlnBk+P6af0hVyQArCq m/Bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=opFUPjRe; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id i1-20020a5d5581000000b0020aab3ac2d3si3654257wrv.757.2022.05.13.20.08.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 20:08:43 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=opFUPjRe; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 18FA93BFE2D; Fri, 13 May 2022 16:49:36 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346964AbiELEa2 (ORCPT + 99 others); Thu, 12 May 2022 00:30:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345901AbiELEaS (ORCPT ); Thu, 12 May 2022 00:30:18 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A68A20F9DD; Wed, 11 May 2022 21:30:16 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 8DB26CE22D7; Thu, 12 May 2022 04:30:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id BC4ACC34100; Thu, 12 May 2022 04:30:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652329812; bh=aSUDcsR6ActHgxCtQdW2ELgUIECy9yx3i/xE5Y6QCxI=; h=Subject:From:Date:References:In-Reply-To:To:Cc:From; b=opFUPjReMDUYYCmDQecy4OQouzSdaSkqyIoUpLXl6g1J4XyxlWGmzVqTfA6qPjnSW 2BB2+ELeBmBBKiGiukS6R96rm+YstHEf7i+/dBA1QVhFvuZbqw2tFPJoJgh7ZRZr13 bxNuaZf8klEV3eqHJ1mzqcQVd1c9S3Wh9Lff6JCMMk5QvI/7jajzFoUvo1AUduwD4m 3E+tzIpw54+bvyY30am5C+k/RxA8N92UdkrdJVWmHuLl9SVmW0/5FEsNx0J+Nl23Vp UrwlEvHrO0gYBPlbA+RbsdUYqR500oPRQj0q+h3WXAR2Zxgro7w6KlJT5UMmbbcP1y 6EHuivsF6rErw== Received: from aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (localhost.localdomain [127.0.0.1]) by aws-us-west-2-korg-oddjob-1.ci.codeaurora.org (Postfix) with ESMTP id 9C340F03928; Thu, 12 May 2022 04:30:12 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH bpf-next] bpf: Fix potential array overflow in bpf_trampoline_get_progs() From: patchwork-bot+netdevbpf@kernel.org Message-Id: <165232981263.16366.10381139437574278926.git-patchwork-notify@kernel.org> Date: Thu, 12 May 2022 04:30:12 +0000 References: <20220430130803.210624-1-ytcoode@gmail.com> In-Reply-To: <20220430130803.210624-1-ytcoode@gmail.com> To: Yuntao Wang Cc: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, kafai@fb.com, songliubraving@fb.com, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, netdev@vger.kernel.org, bpf@vger.kernel.org, linux-kernel@vger.kernel.org X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Hello: This patch was applied to bpf/bpf-next.git (master) by Alexei Starovoitov : On Sat, 30 Apr 2022 21:08:03 +0800 you wrote: > The cnt value in the 'cnt >= BPF_MAX_TRAMP_PROGS' check does not > include BPF_TRAMP_MODIFY_RETURN bpf programs, so the number of > the attached BPF_TRAMP_MODIFY_RETURN bpf programs in a trampoline > can exceed BPF_MAX_TRAMP_PROGS. > > When this happens, the assignment '*progs++ = aux->prog' in > bpf_trampoline_get_progs() will cause progs array overflow as the > progs field in the bpf_tramp_progs struct can only hold at most > BPF_MAX_TRAMP_PROGS bpf programs. > > [...] Here is the summary with links: - [bpf-next] bpf: Fix potential array overflow in bpf_trampoline_get_progs() https://git.kernel.org/bpf/bpf-next/c/a2aa95b71c9b You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html