Page MenuHomeFreeBSD

miibus: Use a bus_child_deleted method to free ivars for children
ClosedPublic

Authored by jhb on Thu, Oct 31, 8:36 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 2, 7:20 AM
Unknown Object (File)
Fri, Nov 1, 5:46 PM
Subscribers
None

Details

Summary

If a device was detached (e.g. via devctl) and then re-attached, the
ivars would be freed by the previous bus_child_detached method during
detach, but device_get_ivars during the subsequent attach would return
a stale pointer resulting in a use after free.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable