From: sashiko-bot@kernel.org
To: "Hangbin Liu" <hangbin.liu@linux.dev>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH net-next v3 5/6] netlink: specs: rt-route: describe lwt BPF program options
Date: Thu, 01 Oct 2026 01:51:34 +0000 [thread overview]
Message-ID: <20261001015135.488BE1F00899@smtp.kernel.org> (raw)
In-Reply-To: <20260930-ynl_rt_encap-v3-5-4106c21b9ee7@kylinos.cn>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] netlink: missing max-len validation constraint for string attribute
--
commit f56da32d0f53d2458e2f20c65435e7f6e11b64a4
Author: Hangbin Liu <liuhangbin@kylinos.cn>
netlink: specs: rt-route: describe lwt BPF program options
This patch replaces binary BPF attributes with a nested lwt-bpf-prog to
support lwt bpf prog options in the rt-route netlink specification.
> diff --git a/Documentation/netlink/specs/rt-route.yaml b/Documentation/netlink/specs/rt-route.yaml
> index 7649797602eb7..afec0375661f5 100644
> --- a/Documentation/netlink/specs/rt-route.yaml
> +++ b/Documentation/netlink/specs/rt-route.yaml
[ ... ]
> @@ -621,6 +624,16 @@ attribute-sets:
> -
> name: hwid
> type: u8
> + -
> + name: lwt-bpf-prog
> + name-prefix: lwt-bpf-prog-
> + attributes:
> + -
> + name: fd
> + type: u32
> + -
> + name: name
> + type: string
[Severity: Low]
Does this string attribute need a maximum length validation constraint?
The kernel's LWT_BPF_PROG_NAME policy restricts the length to MAX_PROG_NAME
(which is 256). For netlink string specifications, this usually means adding
a checks section with max-len: 255.
Without this declarative constraint, the generated userspace tooling will not
restrict the string length prior to constructing the netlink message, forcing
the kernel to reject over-sized strings. This bypasses client-side validation.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260930-ynl_rt_encap-v3-0-4106c21b9ee7@kylinos.cn?part=5
next prev parent reply other threads:[~2026-10-01 1:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-30 1:50 [PATCH net-next v3 0/6] netlink: add lwtunnel encap sub-message support to rt-route Hangbin Liu
2026-09-30 1:50 ` [PATCH net-next v3 1/6] net: lwtunnel: change encap fill order Hangbin Liu
2026-10-01 14:09 ` Ido Schimmel
2026-09-30 1:50 ` [PATCH net-next v3 2/6] tools: ynl: convert enum selector to string for sub-message parsing Hangbin Liu
2026-10-01 1:51 ` sashiko-bot
2026-10-03 6:23 ` Hangbin Liu
2026-10-05 22:33 ` Jakub Kicinski
2026-09-30 1:50 ` [PATCH net-next v3 3/6] netlink: specs: rt-route: add lwtunnel encap sub-message support Hangbin Liu
2026-09-30 1:50 ` [PATCH net-next v3 4/6] netlink: specs: rt-route: describe lwtunnel IP options Hangbin Liu
2026-09-30 1:50 ` [PATCH net-next v3 5/6] netlink: specs: rt-route: describe lwt BPF program options Hangbin Liu
2026-10-01 1:51 ` sashiko-bot [this message]
2026-10-03 6:09 ` Hangbin Liu
2026-09-30 1:50 ` [PATCH net-next v3 6/6] netlink: specs: rt-route: describe seg6-local attrs Hangbin Liu
2026-10-01 1:51 ` sashiko-bot
2026-10-03 6:17 ` Hangbin Liu
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=20261001015135.488BE1F00899@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=hangbin.liu@linux.dev \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.