From: Ido Schimmel <idosch@nvidia.com>
To: Ren Wei <weir@nebusec.ai>
Cc: netdev@vger.kernel.org, dsahern@kernel.org, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
horms@kernel.org, jiri@resnulli.us, vega@nebusec.ai,
milkory@outlook.com
Subject: Re: [PATCH net 1/1] net: arp: reject unterminated device names
Date: Sun, 20 Sep 2026 10:03:14 +0300 [thread overview]
Message-ID: <20260920070314.GA1791430@shredder> (raw)
In-Reply-To: <7f570426c2fe95743f017cf1a14cdc7ace42851a.1789648438.git.milkory@outlook.com>
On Fri, Sep 18, 2026 at 05:32:16PM +0800, Ren Wei wrote:
> From: Zijie Huang <milkory@outlook.com>
>
> The ARP ioctl copies a user-provided struct arpreq into a stack object. Its
> arp_dev field may contain IFNAMSIZ bytes without a NUL terminator.
>
> Such input is passed to dev_get_by_name_rcu() or __dev_get_by_name(), where
> strcmp() can read past the end of the stack object when a matching
> alternative interface name exists.
>
> Reject non-terminated device names with -EINVAL before the lookup to
> prevent the out-of-bounds read.
Other ioctl handlers (e.g., devinet_ioctl(), dev_ioctl(),
br_ioctl_stub()) simply add a NUL at the end. Is there a good reason for
doing something different here?
>
> Fixes: ff92741270bf ("net: introduce name_node struct to be used in hashlist")
Nit: Blaming 36fbf1e52bd3 would be more accurate.
next prev parent reply other threads:[~2026-09-20 7:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-18 9:32 [PATCH net 0/1] net: arp: fix stack out-of-bounds read via unterminated device name Ren Wei
2026-09-18 9:32 ` [PATCH net 1/1] net: arp: reject unterminated device names Ren Wei
2026-09-20 7:03 ` Ido Schimmel [this message]
2026-09-20 12:45 ` Zijie Huang
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=20260920070314.GA1791430@shredder \
--to=idosch@nvidia.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=milkory@outlook.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vega@nebusec.ai \
--cc=weir@nebusec.ai \
/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