Page MenuHomeFreeBSD

bhyve: check paddr_guest2host return in _vq_record
Needs ReviewPublic

Authored by ojanerif_amd.com on Mon, Oct 19, 5:51 PM.
Tags
None
Referenced Files
F176593707: D60870.id190324.diff
Tue, Oct 20, 2:17 AM
F176593706: D60870.id190303.diff
Tue, Oct 20, 2:17 AM
F176593676: D60870.diff
Tue, Oct 20, 2:16 AM
F176561701: D60870.diff
Mon, Oct 19, 8:54 PM

Details

Reviewers
mhorne
bnovkov
Group Reviewers
bhyve
Summary

_vq_record() stored the result of paddr_guest2host() without checking for
NULL. A guest descriptor with an invalid address causes a NULL dereference
in every virtio driver. Return early on failure; the caller sees zero
descriptors and discards the chain.

The indirect path already performs this check (line 357).

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

ojanerif_amd.com edited reviewers, added: mhorne; removed: bhyve.
bnovkov added a subscriber: bnovkov.

In the future please upload the diff with full context and please don't remove the group reviewers automatically added by the system.

This revision is now accepted and ready to land.Mon, Oct 19, 7:19 PM
This revision now requires review to proceed.Mon, Oct 19, 9:05 PM