Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp1222056rdb; Fri, 19 Jan 2024 11:51:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IGtJekFgxTJIXhlg4Wa3gKlSeDwuq8MvflASs8X70jVcK8MHLbE+PbV0TxVIed3jrLL62MK X-Received: by 2002:a05:6a20:4329:b0:199:89a0:9f2b with SMTP id h41-20020a056a20432900b0019989a09f2bmr496915pzk.26.1705693875841; Fri, 19 Jan 2024 11:51:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705693875; cv=pass; d=google.com; s=arc-20160816; b=mseZjgsdpuI2L8V+Ynlf6n0ZV0ofjWbmSu9XvyyyRimam1rfum5n3KnT3p0Ei4OBtJ wFhetQmPu9Aer9SeCo0pmJDSlSQye9G4rH3KKjn6yDPJ2mNimvYFjwS7Uid54bkOdPlf wHNXTxdw+c4fkOBqS3eG/o+7S+Yd0sZXDte/RaaYjOOW+0XPWHLnv0BffxgAzy1hBXIm F+4Lz6IAlw86jeqEevSlvs3BEI1xtjVQ2efRfFDXwSVMYCXG9YOGqS6bHD3ZFwVbKJEL SvRWKeo68IIXdANRjtQ2Bao1gt4y54VNrnDZ70T1ePTP7EMBE457b966oCFDlqvTkzye de3g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=IlJpRJYybWyL7yVtmrpWwEcrl048buzmY0OoIbz/rPM=; fh=6PKTxnF6Jnk1EaogrGSZj8jDVdoUhmxLWn/Y4DAbVgo=; b=g9yxjb3C5fMOaanyI8LRWtjhi8mGyZbHfBX4bOTIsgd49Zs08TzvXSQFtOC7KlGesh heoFDK0mukQavjZvthOjgKkA78mCgNnrEoHtMxfJcGuO+96GB9LwKBhU7ROVHe9eXD4S 77KTzjXSCH5c8ndpj5Z5mJoz8iW8w6v+IzIN5JOuy23mTfrsf+rUMezZh+YegTIOa6ES RbstD8uQuMNe82f4STDrHUsGxjqeGYs2KKjNQrCSBjaL0wvJKqjzV/nSin8muxIQAfW+ dRPJctN6V11vQYkuHyKPNZYj55x+CsJRq6F0GxWDzIXfUzcr7zYuO7PWq1iqTobvGFYg 89Qw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CdoKhSdr; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-31525-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31525-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d21-20020a634f15000000b005ce418d5dd5si3907179pgb.145.2024.01.19.11.51.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 11:51:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31525-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=@kernel.org header.s=k20201202 header.b=CdoKhSdr; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-31525-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31525-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 865C2B23D6D for ; Fri, 19 Jan 2024 19:51:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6EC9F56472; Fri, 19 Jan 2024 19:51:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CdoKhSdr" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9631955E52; Fri, 19 Jan 2024 19:51:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705693864; cv=none; b=lfADv2cyk5VhDr8VDfpL+wu7Fcx0iRqMYMZE7/uQYvIjMY2HjhU6dUOwrALjckqoPqh7qEBfWiBeMOFrOmxXpsFBaoVRmI82ULf9zhWUiyH2ZL6hpcf64Xm8y56pC7s1xh3+ETDTfTdJPpf3IpBB+ZYodTr7SmvnEDstcbrHDy0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705693864; c=relaxed/simple; bh=SzCF2j0Up5YH6JQzgE2/Na1H4YvwWZv6qYQ4tIsQh8w=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Y8kVd2J8ZdwX5tiLKq3tS0oux7I7jflNlnCHJ5K4D8yk1eojpP/ha/W6ASPYFPJGg8vQP+ESCSwrwsajNhytc3ls4RErU7MKkCG3qCRfFvXEl2UPBkeD5XOMCDSo3gxFgbuDQq7KV8v4MZyUHygizEgQ5VDzW3ZoXBi4KQ5lzCs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CdoKhSdr; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 38D87C433C7; Fri, 19 Jan 2024 19:51:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705693863; bh=SzCF2j0Up5YH6JQzgE2/Na1H4YvwWZv6qYQ4tIsQh8w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CdoKhSdrnMfM/E7IRTaV5soF3wxuSoSzE5IAevQO4gia0EcdgcwFFVOOFP6gJHoS+ 7iwMHhbJeqY+DdMwVf6PEhrebd0VnvE9RF/0TyCPpU9RNkWfnSlkDTYMTya4O6jLTA fJLmZFETTzHkOpF81yHNJAuWSCWYeO/g58VimGZ17oftrpmIy57K3OlDsoJajO1pKi vuZ8ELQ9/tt8JXOo4aNSl2cRGKqRQ8hfJVr948UsgcyFzjcd6Vlv1b87Ako/z0yIiM OAYUo1LLZ8Xi1WJfSRFf9guHP8WXEeCvggrcGV0u97SB5Or/iqCgVvUQ27TTCJQCUn cqQWRuF5yDuEg== Date: Fri, 19 Jan 2024 19:50:58 +0000 From: Simon Horman To: Lin Ma Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, dsahern@kernel.org, razor@blackwall.org, leon@kernel.org, haleyb.dev@gmail.com, ja@ssi.bg, judyhsiao@chromium.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v1] neighbour: complement nl_ntbl_parm_policy Message-ID: <20240119195058.GA105385@kernel.org> References: <20240119070847.5402-1-linma@zju.edu.cn> 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: <20240119070847.5402-1-linma@zju.edu.cn> On Fri, Jan 19, 2024 at 03:08:47PM +0800, Lin Ma wrote: > In the neightbl_set function, the attributes array is parsed and validated > using the nl_ntbl_parm_policy policy. However, this policy overlooks the > NDTPA_QUEUE_LENBYTES attribute since the commit 6b3f8674bccb ("[NEIGH]: > Convert neighbour table modification to new netlink api"). > As a result, no validation is performed when accessing the > NDTPA_QUEUE_LENBYTES attribute. > > This patch addresses this issue by complementing the policy to ensure that > every attribute being accessed is properly validated. > > Signed-off-by: Lin Ma > --- > net/core/neighbour.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/net/core/neighbour.c b/net/core/neighbour.c > index 552719c3bbc3..ece0447cf409 100644 > --- a/net/core/neighbour.c > +++ b/net/core/neighbour.c > @@ -2293,6 +2293,7 @@ static const struct nla_policy nl_neightbl_policy[NDTA_MAX+1] = { > static const struct nla_policy nl_ntbl_parm_policy[NDTPA_MAX+1] = { > [NDTPA_IFINDEX] = { .type = NLA_U32 }, > [NDTPA_QUEUE_LEN] = { .type = NLA_U32 }, > + [NPTPA_QUEUE_LEN_BYTES] = { .type = NLA_U32 }, This does not compile because NPTPA_QUEUE_LEN_BYTES is not present in net-next. > [NDTPA_PROXY_QLEN] = { .type = NLA_U32 }, > [NDTPA_APP_PROBES] = { .type = NLA_U32 }, > [NDTPA_UCAST_PROBES] = { .type = NLA_U32 }, ## Form letter - net-next-closed [adapted from text by Jakub] The merge window for v6.8 has begun and therefore net-next is closed for new drivers, features, code refactoring and optimizations. We are currently accepting bug fixes only. Please repost when net-next reopens on or after 22nd January. RFC patches sent for review only are obviously welcome at any time. See: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#development-cycle -- pw-bot: defer