diff options
author | Eric Dumazet <edumazet@google.com> | 2022-02-01 02:21:06 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-02-02 05:19:00 +0100 |
commit | c6f6f2444bdbe0079e41914a35081530d0409963 (patch) | |
tree | a092807eddace8b3d89c808d4f65071057bfb8e1 /net/packet | |
parent | net: sched: fix use-after-free in tc_new_tfilter() (diff) | |
download | linux-c6f6f2444bdbe0079e41914a35081530d0409963.tar.xz linux-c6f6f2444bdbe0079e41914a35081530d0409963.zip |
rtnetlink: make sure to refresh master_dev/m_ops in __rtnl_newlink()
While looking at one unrelated syzbot bug, I found the replay logic
in __rtnl_newlink() to potentially trigger use-after-free.
It is better to clear master_dev and m_ops inside the loop,
in case we have to replay it.
Fixes: ba7d49b1f0f8 ("rtnetlink: provide api for getting and setting slave info")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Jiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20220201012106.216495-1-eric.dumazet@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/packet')
0 files changed, 0 insertions, 0 deletions