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)
Sat, Apr 27, 4:48 AM
Unknown Object (File)
Jan 15 2024, 12:25 AM
Unknown Object (File)
Dec 23 2023, 2:39 AM
Unknown Object (File)
Sep 30 2023, 7:13 PM
Unknown Object (File)
Sep 21 2023, 10:19 PM
Unknown Object (File)
Jul 3 2023, 10:06 PM
Unknown Object (File)
Jul 3 2023, 10:05 PM
Unknown Object (File)
Jul 3 2023, 10:03 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