macsec: restrict to ethernet devices
authorWillem de Bruijn <willemb@google.com>
Sun, 22 Mar 2020 17:51:13 +0000 (13:51 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Mar 2020 04:34:59 +0000 (21:34 -0700)
commitb06d072ccc4b1acd0147b17914b7ad1caa1818bb
tree935503ae935ebc291e8da754cbfb1929a33bd415
parent55b474c41e586a5c21c7ab81ff474eb6bacb4322
macsec: restrict to ethernet devices

Only attach macsec to ethernet devices.

Syzbot was able to trigger a KMSAN warning in macsec_handle_frame
by attaching to a phonet device.

Macvlan has a similar check in macvlan_port_create.

v1->v2
  - fix commit message typo

Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macsec.c