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)
Sun, Jun 28, 10:14 PM
Unknown Object (File)
Thu, Jun 25, 1:51 PM
Unknown Object (File)
Wed, Jun 24, 5:55 AM
Unknown Object (File)
Jun 14 2026, 1:16 PM
Unknown Object (File)
Apr 29 2026, 2:21 AM
Unknown Object (File)
Apr 29 2026, 2:13 AM
Unknown Object (File)
Apr 28 2026, 5:11 AM
Unknown Object (File)
Apr 27 2026, 5:51 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 48482
Build 45368: arc lint + arc unit