From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: "Miguel García" <miguelgarciaroman8@gmail.com>, netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, willemdebruijn.kernel@gmail.com,
jasowang@redhat.com, andrew+netdev@lunn.ch, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
skhan@linuxfoundation.org,
"Miguel García" <miguelgarciaroman8@gmail.com>
Subject: Re: [PATCH net-next v2] tun: replace strcpy with strscpy for ifr_name
Date: Wed, 13 Aug 2025 09:06:06 -0400 [thread overview]
Message-ID: <689c8dbe91cf3_125e46294ae@willemb.c.googlers.com.notmuch> (raw)
In-Reply-To: <20250812082244.60240-1-miguelgarciaroman8@gmail.com>
Miguel García wrote:
> Replace the strcpy() calls that copy the device name into ifr->ifr_name
> with strscpy() to avoid potential overflows and guarantee NULL termination.
>
> Destination is ifr->ifr_name (size IFNAMSIZ).
>
> Tested in QEMU (BusyBox rootfs):
> - Created TUN devices via TUNSETIFF helper
> - Set addresses and brought links up
> - Verified long interface names are safely truncated (IFNAMSIZ-1)
>
> Signed-off-by: Miguel García <miguelgarciaroman8@gmail.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
next prev parent reply other threads:[~2025-08-13 13:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-12 8:22 [PATCH net-next v2] tun: replace strcpy with strscpy for ifr_name Miguel García
2025-08-13 13:06 ` Willem de Bruijn [this message]
2025-08-13 13:58 ` Miguel García Román
2025-08-13 14:08 ` Willem de Bruijn
2025-08-14 0:30 ` patchwork-bot+netdevbpf
2025-08-14 10:32 ` Miguel García Román
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=689c8dbe91cf3_125e46294ae@willemb.c.googlers.com.notmuch \
--to=willemdebruijn.kernel@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jasowang@redhat.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miguelgarciaroman8@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=skhan@linuxfoundation.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox