Thread View: linux.kernel.netdev
3 messages
3 total messages
Started by Dave Seddon
Tue, 24 Nov 2026 05:55
[PATCH iproute2] rt_names: do not write past the end of the name tables
Author: Dave Seddon
Date: Tue, 24 Nov 2026 05:55
Date: Tue, 24 Nov 2026 05:55
26 lines
11113 bytes
11113 bytes
rtnl_tab_initialize() accepts id == size, so an id of 256 in rt_protos, rt_scopes, rt_realms, rt_dsfield or rt_addrprotos writes one entry past the 256-entry table. Use >=. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Dave Seddon <dave.seddon.ca@gmail.com> --- lib/rt_names.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rt_names.c b/lib/rt_names.c index 3dba9642..97f520ff 100644 --- a/lib/rt_names.c +++ b/lib/rt_names.c @@ -115,7 +115,7 @@ static int rtnl_tab_initialize(const char *file, char **tab, int size) fclose(fp); return -EINVAL; } - if (id < 0 || id > size) + if (id < 0 || id >= size) continue; tab[id] = strdup(namebuf); -- 2.56.0
Re: [PATCH iproute2] rt_names: do not write past the end of the name tables
Author: Stephen Hemminger
Date: Wed, 25 Nov 2026 00:51
Date: Wed, 25 Nov 2026 00:51
14 lines
11344 bytes
11344 bytes
On Mon, 23 Nov 2026 21:55:49 -0800 Dave Seddon <dave.seddon.ca@gmail.com> wrote: > rtnl_tab_initialize() accepts id == size, so an id of 256 in rt_protos, > rt_scopes, rt_realms, rt_dsfield or rt_addrprotos writes one entry past > the 256-entry table. Use >=. > > Assisted-by: Claude:claude-opus-5-5 > Signed-off-by: Dave Seddon <dave.seddon.ca@gmail.com> > --- Iproute2 follows kernel conventions and the kernel maintainers decided to drop use of Assisted-by.
Re: [PATCH iproute2] rt_names: do not write past the end of the name tables
Author: patchwork-bot+netdevbpf
Date: Fri, 27 Nov 2026 16:10
Date: Fri, 27 Nov 2026 16:10
24 lines
8515 bytes
8515 bytes
Hello:
This patch was applied to iproute2/iproute2.git (main)
by Stephen Hemminger <stephen@networkplumber.org>:
On Mon, 23 Nov 2026 21:55:49 -0800 you wrote:
> rtnl_tab_initialize() accepts id == size, so an id of 256 in rt_protos,
> rt_scopes, rt_realms, rt_dsfield or rt_addrprotos writes one entry past
> the 256-entry table. Use >=.
>
> Assisted-by: Claude:claude-opus-5-5
> Signed-off-by: Dave Seddon <dave.seddon.ca@gmail.com>
>
> [...]
Here is the summary with links:
- [iproute2] rt_names: do not write past the end of the name tables
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=22f67c8b7332
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads