Thread (6 messages) flat view 6 messages, 4 authors, 5d ago

Re: [syzbot] [net?] WARNING in rtmsg_ifinfo_build_skb

From: Eric Dumazet <edumazet@google.com>
Date: 2026-08-18 13:37:20
Also in: lkml

On Sat, Aug 15, 2026 at 1:14 AM Sabrina Dubroca [off-list ref] wrote:
It's not possible to create a macsec device with a key length other
than those 2, but it's true that returning -EMSGSIZE in this case is
not correct (-EINVAL + DEBUG_NET_WARN_ON_ONCE I guess).

The real problem is that we register the netdev before private data
has been fully initialized (macsec_newlink calls register_netdevice,
then macsec_add_dev), so we end up reaching fill_info before key_len
has been set.
SGTM, I let you send a patch.
So I think we should run macsec_add_dev before registering (and maybe
move those allocs to ndo_init), and possibly macsec_changelink_common
too. Setting the sci was intentionally done late, so this bit should
stay where it is.
Thanks
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help