Predicting_real_estate_prices_using_scikit-learn icon indicating copy to clipboard operation
Predicting_real_estate_prices_using_scikit-learn copied to clipboard

[KS] Fix bug in KsStreamIo

Open oleg-dubinskiy opened this issue 3 years ago • 0 comments

Purpose

Properly set output buffer length in IO Stack Location of the current IRP, since it is passed to KsProbeStreamIrp when calling KsStreamIo, so it fails if the length isn't set properly. Don't set an input buffer length and the buffer itself, since it isn't passed anywhere, so setting it makes no sense. Moreover, MSDN says that for IOCTL_KS_READ/WRITE_STREAM, only output buffer (and its length) is needed to be set, but not an input one. So it indeed is more correct. It fixes buffer overflow in KsProbeStreamIrp when attempting to perform the streaming via KsStreamIo. I discovered this bug during my audio refactoring from PR #4660.

JIRA issue: None.

oleg-dubinskiy avatar Sep 03 '22 15:09 oleg-dubinskiy