Commit Graph

157 Commits

Author SHA1 Message Date
Simon Rozman
b6f0e07c2f Unify and revise NDIS pause checks
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-03-22 16:52:31 -06:00
Simon Rozman
d6dfda0421 Rename ActiveNBLCount to ActiveTransactionCount
We are not using this counter for NBL counting only.

Signed-off-by: Simon Rozman <simon@rozman.si>
2019-03-22 16:52:31 -06:00
Simon Rozman
775386173c Enable better debugging support for Debug driver builds
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-03-22 16:52:31 -06:00
Simon Rozman
2e35974a24 Fix ActiveNBLCount management in TunDispatchWrite()
The ActiveNBLCount must be bumped _before_ adapter state is checked.
Otherwise, there is a window of code that may allow adapter transition
from pausing to paused state, followed by a
NdisMIndicateReceiveNetBufferLists() call.

Signed-off-by: Simon Rozman <simon@rozman.si>
2019-03-22 16:52:31 -06:00
Simon Rozman
999cfaabcc Optimize ActiveNBLCount management in TunSendNetBufferLists
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-03-22 16:52:31 -06:00
Simon Rozman
a9afa3a692 Fix the UAF issue with premature MDL release in IRP_MJ_WRITE
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-03-22 16:52:31 -06:00
Jason A. Donenfeld
03479caf9d Initial commit
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: Simon Rozman <simon@rozman.si>
2019-03-22 16:52:31 -06:00