diff options
| author | Stanislav Fomichev <[email protected]> | 2025-07-23 22:47:14 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-07-25 18:03:46 +0000 |
| commit | 0349659fd72f662c054ff20d432559bfaa228ce4 (patch) | |
| tree | 450006df784013e939e6523c6ad942005268cbb9 /drivers/platform/x86/intel/pmt/class.c | |
| parent | net: hibmcge: support for statistics of reset failures (diff) | |
| download | kernel-0349659fd72f662c054ff20d432559bfaa228ce4.tar.gz kernel-0349659fd72f662c054ff20d432559bfaa228ce4.zip | |
macsec: set IFF_UNICAST_FLT priv flag
Cosmin reports the following locking issue:
# BUG: sleeping function called from invalid context at
kernel/locking/mutex.c:275
# dump_stack_lvl+0x4f/0x60
# __might_resched+0xeb/0x140
# mutex_lock+0x1a/0x40
# dev_set_promiscuity+0x26/0x90
# __dev_set_promiscuity+0x85/0x170
# __dev_set_rx_mode+0x69/0xa0
# dev_uc_add+0x6d/0x80
# vlan_dev_open+0x5f/0x120 [8021q]
# __dev_open+0x10c/0x2a0
# __dev_change_flags+0x1a4/0x210
# netif_change_flags+0x22/0x60
# do_setlink.isra.0+0xdb0/0x10f0
# rtnl_newlink+0x797/0xb00
# rtnetlink_rcv_msg+0x1cb/0x3f0
# netlink_rcv_skb+0x53/0x100
# netlink_unicast+0x273/0x3b0
# netlink_sendmsg+0x1f2/0x430
Which is similar to recent syzkaller reports in [0] and [1] and triggers
because macsec does not advertise IFF_UNICAST_FLT although it has proper
ndo_set_rx_mode callback that takes care of pushing uc/mc addresses
down to the real device.
In general, dev_uc_add call path is problematic for stacking
non-IFF_UNICAST_FLT because we might grab netdev instance lock under
addr_list_lock spinlock, so this is not a systemic fix.
0: https://lore.kernel.org/netdev/[email protected]
1: https://lore.kernel.org/netdev/[email protected]/
Reviewed-by: Simon Horman <[email protected]>
Tested-by: Simon Horman <[email protected]>
Link: https://lore.kernel.org/netdev/[email protected]
Fixes: 7e4d784f5810 ("net: hold netdev instance lock during rtnetlink operations")
Reported-by: Cosmin Ratiu <[email protected]>
Tested-by: Cosmin Ratiu <[email protected]>
Signed-off-by: Stanislav Fomichev <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/platform/x86/intel/pmt/class.c')
0 files changed, 0 insertions, 0 deletions
