Page MenuHomeFreeBSD

bhyve: use stream_read() to read 12 bytes of RFB client version
ClosedPublic

Authored by khng on Feb 9 2020, 3:51 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 2 2024, 11:38 AM
Unknown Object (File)
Dec 20 2023, 12:29 AM
Unknown Object (File)
Nov 16 2023, 12:26 AM
Unknown Object (File)
Nov 5 2023, 11:34 AM
Unknown Object (File)
Oct 21 2023, 5:01 AM
Unknown Object (File)
Oct 14 2023, 11:26 PM
Unknown Object (File)
Oct 4 2023, 10:27 AM
Unknown Object (File)
Sep 24 2023, 8:25 AM

Details

Summary

The use of read() to read RFB client version before this change is inappropriate as it is not guaranteed to have exactly 12 bytes in the receive buffer.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 29262
Build 27179: arc lint + arc unit

Event Timeline

grehan added a subscriber: grehan.
grehan added inline comments.
usr.sbin/bhyve/rfb.c
774

Put in

#define VERSION_LENGTH  12

at the top, use that instead of 12, and this will be good to go.

This revision is now accepted and ready to land.Feb 10 2020, 2:22 AM
  • bhyve: use stream_read() to read 12 bytes of RFB client version
This revision now requires review to proceed.Feb 10 2020, 8:39 AM
khng marked an inline comment as done.Feb 10 2020, 8:40 AM

Updating D23591: bhyve: use stream_read() to read 12 bytes of RFB client version

usr.sbin/bhyve/rfb.c
774

Changed as suggested.

This revision is now accepted and ready to land.Feb 13 2020, 5:07 PM