From: Simon Horman <horms@kernel•org>
To: Lin Ma <linma@zju•edu.cn>
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
Date: Fri, 19 Jan 2024 19:50:58 +0000 [thread overview]
Message-ID: <20240119195058.GA105385@kernel.org> (raw)
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 <linma@zju•edu.cn>
> ---
> 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
next prev parent reply other threads:[~2024-01-19 19:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-19 7:08 [PATCH net-next v1] neighbour: complement nl_ntbl_parm_policy Lin Ma
2024-01-19 19:50 ` Simon Horman [this message]
2024-01-20 0:53 ` Lin Ma
2024-01-20 11:41 ` Simon Horman
2024-01-19 23:37 ` kernel test robot
2024-01-20 15:11 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240119195058.GA105385@kernel.org \
--to=horms@kernel$(echo .)org \
--cc=davem@davemloft$(echo .)net \
--cc=dsahern@kernel$(echo .)org \
--cc=edumazet@google$(echo .)com \
--cc=haleyb.dev@gmail$(echo .)com \
--cc=ja@ssi$(echo .)bg \
--cc=judyhsiao@chromium$(echo .)org \
--cc=kuba@kernel$(echo .)org \
--cc=leon@kernel$(echo .)org \
--cc=linma@zju$(echo .)edu.cn \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=razor@blackwall$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox