lkml.org 
[lkml]   [2023]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH net v2] tipc: Fix uninit-value access in tipc_nl_node_reset_link_stats()
From
On Mon, 23 Oct 2023 15:53:14 -0700, Jakub Kicinski wrote:
> On Sat, 21 Oct 2023 01:34:15 +0900 Shigeru Yoshida wrote:
>> Link names must be null-terminated strings. If a link name which is not
>> null-terminated is passed through netlink, strstr() and similar functions
>> can cause buffer overrun. This causes the above issue.
>
> If strings need to be null-terminated you should switch the policy here
> https://elixir.bootlin.com/linux/v6.6-rc6/source/net/tipc/netlink.c#L91
> from NLA_STRING to NLA_NUL_STRING, no?

Thank you so much for the feedback. As I'm not so familiar with
Netlink, I'll study NLA_NUL_STRING a bit more and make an updated
patch.

Thanks,
Shigeru

> --
> pw-bot: cr
>

\
 
 \ /
  Last update: 2023-10-24 16:22    [W:0.068 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site