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)
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
Unknown Object (File)
Sep 28 2024, 8:41 AM
Unknown Object (File)
Sep 28 2024, 7:20 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