]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Remove in_ifaddr_lock acquisiton to access in_ifaddrhead.
authorGleb Smirnoff <glebius@FreeBSD.org>
Fri, 8 Oct 2021 19:56:24 +0000 (12:56 -0700)
committerGleb Smirnoff <glebius@FreeBSD.org>
Wed, 13 Oct 2021 17:04:46 +0000 (10:04 -0700)
commit2144431c11529d1107f4440a5fe57559fb20002c
tree1f6dcd9f4a6e3bd0abc7f0f706488406733c52a4
parent03d5820f738de130b2feb66833f18741b7f92a14
Remove in_ifaddr_lock acquisiton to access in_ifaddrhead.

An IPv4 address is embedded into an ifaddr which is freed
via epoch. And the in_ifaddrhead is already a CK list. Use
the network epoch to protect against use after free.

Next step would be to CK-ify the in_addr hash and get rid of the...

Reviewed by: melifaro
Differential Revision: https://reviews.freebsd.org/D32434
sys/net/if_stf.c
sys/netinet/if_ether.c
sys/netinet/igmp.c
sys/netinet/in.c
sys/netinet/in_mcast.c
sys/netinet/in_pcb.c
sys/netinet/in_var.h
sys/netinet/ip_output.c
sys/netinet/raw_ip.c