CVE-2024-1305: Windows TAP driver: Fix potential integer overflow in TapSharedSendPacket

This could lead to an integer overflow, resulting in the allocation of a smaller memory size, which may then cause a buffer overflow and a bug check.

The fix involves checking for overflow conditions and failing the IRP if an overflow occurs.

References

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9