From: Sabrina Dubroca <sd@queasysnail.net>
To: Haseeb Malik via B4 Relay <devnull+haseebulhaq55.gmail.com@kernel.org>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
linux-kernel@vger.kernel.org, edumazet@google.com,
horms@kernel.org, kuba@kernel.org, andrew+netdev@lunn.ch,
hangbin.liu@linux.dev, pabeni@redhat.com,
syzkaller-bugs@googlegroups.com, felix.walter@cloudandheat.com,
syzbot+f2f6312ad1b5a0bfe316@syzkaller.appspotmail.com,
Haseeb Malik <haseebulhaq55@gmail.com>
Subject: Re: [PATCH net v3] macsec: initialize SecY before registering the netdevice
Date: Thu, 24 Sep 2026 12:42:08 +0200 [thread overview]
Message-ID: <arT-gJcnJww-6cjV@krikkit> (raw)
In-Reply-To: <20260921-fix-macsec-net-v3-1-accf94f93f5e@gmail.com>
2026-09-21, 16:40:30 -0400, Haseeb Malik via B4 Relay wrote:
> From: Haseeb Malik <haseebulhaq55@gmail.com>
>
> Creating a MACsec device with MAC offload over an LRO-capable lower
> device triggers a warning in rtmsg_ifinfo_build_skb() when IPv4
> forwarding is enabled by default.
>
> register_netdevice() invokes inetdev_init(), which disables LRO and emits
> a NETDEV_FEAT_CHANGE notification. This reaches macsec_fill_info() before
> macsec_add_dev() initializes the SecY. key_len is still zero, so
> macsec_fill_info() returns -EMSGSIZE and trips the WARN_ON in
> rtmsg_ifinfo_build_skb(), even though the skb has enough space.
>
> Even without the warning, notifications during registration can report
> uninitialized SecY attributes, including the SCI. This ordering has existed
> since the driver was introduced.
>
> Initialize the SecY and apply the new-link attributes before registration.
> Move MAC address inheritance into macsec_newlink() so the SCI can also be
> initialized before registration-time notifications report it. Move the
> per-CPU statistics and metadata destination allocation into ndo_init(),
> and release partial allocations on failure.
>
> Fixes: c09440f7dcb3 ("macsec: introduce IEEE 802.1AE driver")
> Reported-by: syzbot+f2f6312ad1b5a0bfe316@syzkaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=f2f6312ad1b5a0bfe316
> Suggested-by: Sabrina Dubroca <sd@queasysnail.net>
> Link: https://lists.openwall.net/linux-kernel/2026/08/19/552
> Signed-off-by: Haseeb Malik <haseebulhaq55@gmail.com>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Thanks for taking care of this.
--
Sabrina
next prev parent reply other threads:[~2026-09-24 10:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 20:40 Haseeb Malik via B4 Relay
2026-09-24 10:42 ` Sabrina Dubroca [this message]
2026-09-24 13:21 ` patchwork-bot+netdevbpf
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=arT-gJcnJww-6cjV@krikkit \
--to=sd@queasysnail.net \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=devnull+haseebulhaq55.gmail.com@kernel.org \
--cc=edumazet@google.com \
--cc=felix.walter@cloudandheat.com \
--cc=hangbin.liu@linux.dev \
--cc=haseebulhaq55@gmail.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=syzbot+f2f6312ad1b5a0bfe316@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/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
all inboxes | Powered by JetHome®