Do not trust host-supplied used lengths; host could report
a used length larger than the buffer, causing the receive
and control paths to read past the buffer.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 77412 Build 74295: arc lint + arc unit
Event Timeline
Comment Actions
This patch only updates virtio_console, but virtio_net has the same problem. Will you fix it too?
Comment Actions
Sure thing. I actually wanted to keep this separate since this one is basically just a clamp while the other one in vtnet is IMHO more of a logical and policy change (and I needed to test that even further, to be honest). But since both are addressing the same concern (namely, not trusting the host to stay within the buffer) it could indeed make sense to have them both done here. I’ll take care of it tomorrow.