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
F108422447: D37491.diff
Fri, Jan 24, 4:13 PM
Unknown Object (File)
Wed, Jan 22, 3:37 AM
Unknown Object (File)
Fri, Jan 10, 2:58 AM
Unknown Object (File)
Nov 21 2024, 11:10 PM
Unknown Object (File)
Nov 19 2024, 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
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