Page MenuHomeFreeBSD

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

Authored by jhb on Nov 23 2022, 11:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 21, 11:10 PM
Unknown Object (File)
Tue, Nov 19, 6:58 AM
Unknown Object (File)
Oct 8 2024, 6:13 AM
Unknown Object (File)
Oct 8 2024, 6:12 AM
Unknown Object (File)
Oct 8 2024, 6:11 AM
Unknown Object (File)
Oct 8 2024, 5:32 AM
Unknown Object (File)
Sep 30 2024, 3:18 AM
Unknown Object (File)
Sep 29 2024, 2:43 PM
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