Page MenuHomeFreeBSD

bhyve: Check rfb length
Needs ReviewPublic

Authored by aokblast on Mon, May 18, 7:17 AM.
Tags
None
Referenced Files
F158964415: D57062.id177997.diff
Mon, Jun 8, 8:51 AM
Unknown Object (File)
Fri, Jun 5, 10:02 AM
Unknown Object (File)
Fri, Jun 5, 10:00 AM
Unknown Object (File)
Fri, Jun 5, 4:11 AM
Unknown Object (File)
Fri, Jun 5, 4:08 AM
Unknown Object (File)
Thu, Jun 4, 10:37 PM
Unknown Object (File)
Tue, Jun 2, 11:45 PM
Unknown Object (File)
Tue, Jun 2, 11:40 PM

Details

Reviewers
markj
Group Reviewers
bhyve
Summary

RFB protocol preallocate the buffer memory based on the maximum width
and height that defined by rfb.c. However, the rfb doesn't know the
width and height information from the caller (pci_fbuf.c). It causes
problem while fbuf allows larger size than rfb. As a result, we add
checks by passing width and height parameters to the rfb_init.

Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 73215
Build 70098: arc lint + arc unit

Event Timeline

corvink added inline comments.
usr.sbin/bhyve/rfb.c
1356–1361

We're allocating the rfb here, don't we? Why are we still allocating the max rfb size? Why not allocating the requested size?

Remove size limit and relies on the frontend

usr.sbin/bhyve/rfb.c
1356–1361

Makes sense. Fix it now. Thanks!