Page MenuHomeFreeBSD

Fix for use after free when detaching network interface
Needs ReviewPublic

Authored by hselasky on Wed, Jan 13, 2:57 PM.

Details

Summary

Implement API for draining slow paths in the network stack, like invocations
of if_ioctl(). This is needed to avoid use after free by user-space when a
network device detaches.

MFC after: 1 week
Sponsored by: Mellanox Technologies // NVIDIA Networking

Test Plan

Similar to D22691 .

Diff Detail

Repository
R10 FreeBSD src repository
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

sys/net/if.c
771

We could set a bit in the "ifp" to prevent new slow_refs while draining. Right now that is not an issue.