netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/4] Avoid using WARN_ON() on allocation failure in device_rename()
@ 2025-03-25 14:17 Ivan Abramov
  2025-03-25 14:17 ` [PATCH net 1/4] ieee802154: Restore initial state on failed device_rename() in cfg802154_switch_netns() Ivan Abramov
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Ivan Abramov @ 2025-03-25 14:17 UTC (permalink / raw)
  To: David S. Miller
  Cc: Ivan Abramov, Jakub Kicinski, netdev, linux-kernel, lvc-project

This patch series is based on
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/ and is
intended for the generic netdev maintainers, as it affects multiple
networking subsystems.

There are a couple of Syzkaller reports about WARN_ON() being triggered
by failed device_rename().

They are triggered by fuzzer's fault injection and subsequent allocation
failure in kstrdup(). Failure of kstrdup() in device_rename() should not
lead to WARN_ON(), so means to avoid it are introduced in this series.

If it is possible to reverse the changes done prior to failed
device_rename(), do that. Otherwise ignore -ENOMEM return code in
WARN_ON().

Ivan Abramov (4):
  ieee802154: Restore initial state on failed device_rename() in
    cfg802154_switch_netns()
  ieee802154: Avoid calling WARN_ON() on -ENOMEM in
    cfg802154_pernet_exit()
  cfg80211: Avoid calling WARN_ON() on -ENOMEM in
    cfg80211_switch_netns()
  net: Avoid calling WARN_ON() on -ENOMEM in
    __dev_change_net_namespace()

 net/core/dev.c        |  2 +-
 net/ieee802154/core.c | 51 ++++++++++++++++++++++++-------------------
 net/wireless/core.c   |  2 +-
 3 files changed, 31 insertions(+), 24 deletions(-)

-- 
2.39.5


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-03-25 22:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-25 14:17 [PATCH net 0/4] Avoid using WARN_ON() on allocation failure in device_rename() Ivan Abramov
2025-03-25 14:17 ` [PATCH net 1/4] ieee802154: Restore initial state on failed device_rename() in cfg802154_switch_netns() Ivan Abramov
2025-03-25 22:00   ` Kuniyuki Iwashima
2025-03-25 14:17 ` [PATCH net 2/4] ieee802154: Avoid calling WARN_ON() on -ENOMEM in cfg802154_pernet_exit() Ivan Abramov
2025-03-25 14:17 ` [PATCH net 3/4] cfg80211: Avoid calling WARN_ON() on -ENOMEM in cfg80211_switch_netns() Ivan Abramov
2025-03-25 21:39 ` [PATCH net 0/4] Avoid using WARN_ON() on allocation failure in device_rename() Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).