Page MenuHomeFreeBSD

bhyve: Avoid passing a possible garbage pointer to free().
ClosedPublic

Authored by jhb on Wed, Nov 23, 11:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 2, 9:29 AM
Unknown Object (File)
Tue, Nov 29, 1:50 AM
Subscribers

Details

Summary

All of the error paths in pci_vtcon_sock_add free the sock pointer.
However, sock is not initialized until part way through the function.
An early error would pass stack garbage to free().

Diff Detail

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