[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230809202054.GC3325@breakpoint.cc>
Date: Wed, 9 Aug 2023 22:20:54 +0200
From: Florian Westphal <fw@...len.de>
To: Justin Stitt <justinstitt@...gle.com>
Cc: Pablo Neira Ayuso <pablo@...filter.org>,
Jozsef Kadlecsik <kadlec@...filter.org>,
Florian Westphal <fw@...len.de>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
linux-hardening@...r.kernel.org, Kees Cook <keescook@...omium.org>,
netfilter-devel@...r.kernel.org, coreteam@...filter.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 7/7] netfilter: xtables: refactor deprecated strncpy
Justin Stitt <justinstitt@...gle.com> wrote:
> Prefer `strscpy_pad` as it's a more robust interface whilst maintaing
> zero-padding behavior.
>
> There may have existed a bug here due to both `tbl->repl.name` and
> `info->name` having a size of 32 as defined below:
> | #define XT_TABLE_MAXNAMELEN 32
>
> This may lead to buffer overreads in some situations -- `strscpy` solves
> this by guaranteeing NUL-termination of the dest buffer.
I don't think we need to use _pad here.
Powered by blists - more mailing lists