Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix potential integer overflow in TapSharedSendPacket #167

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

lstipakov
Copy link
Member

Following code:

unsigned int fullLength;
<..>
fullLength = PacketLength + PrefixLength;

could cause integer overflow, which will result in allocation of smaller size of memory, which later causes buffer overflow and a bug check.

Fix by checking overflow condition and fail the IRP in case of overflow.

CVE: 2024-1305

Reported-by: Vladimir Tokarev vtokarev@microsoft.com

Following code:

  unsigned int            fullLength;
  <..>
  fullLength = PacketLength + PrefixLength;

could cause integer overflow, which will result in allocation
of smaller size of memory, which later causes buffer overflow and
a bug check.

Fix by checking overflow condition and fail the IRP in case of
overflow.

CVE: 2024-1305

Reported-by: Vladimir Tokarev <vtokarev@microsoft.com>
Signed-off-by: Lev Stipakov <lev@openvpn.net>
@cron2
Copy link
Contributor

cron2 commented Mar 19, 2024

Looks good to me. ACK.

@lstipakov lstipakov merged commit 0cad866 into OpenVPN:master Mar 19, 2024
1 of 2 checks passed
@lstipakov lstipakov deleted the int-overflow branch March 19, 2024 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants