diff options
author | Jakub Kicinski <kuba@kernel.org> | 2023-10-17 18:38:15 -0700 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2023-10-19 15:51:16 +0200 |
commit | 1a83f4a7c156fa6bbd6b530e89fa3270bf3d9d1b (patch) | |
tree | 7690e4d1a0e22ef6ce513b0731d7017c020aad37 /scripts/gdb/linux/mm.py | |
parent | 7663d522099ecc464512164e660bc771b2ff7b64 (diff) |
net: avoid UAF on deleted altname
Altnames are accessed under RCU (dev_get_by_name_rcu())
but freed by kfree() with no synchronization point.
Each node has one or two allocations (node and a variable-size
name, sometimes the name is netdev->name). Adding rcu_heads
here is a bit tedious. Besides most code which unlists the names
already has rcu barriers - so take the simpler approach of adding
synchronize_rcu(). Note that the one on the unregistration path
(which matters more) is removed by the next fix.
Fixes: ff92741270bf ("net: introduce name_node struct to be used in hashlist")
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'scripts/gdb/linux/mm.py')
0 files changed, 0 insertions, 0 deletions