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 ECH parameter overflow bug. #490

Closed
wants to merge 1 commit into from

Conversation

ttdoda
Copy link

@ttdoda ttdoda commented Nov 10, 2015

ECH parameter overflow bug was found in putty.
It seems that mintty has the same problem.

c.f. http://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/vuln-ech-overflow.html

@mintty
Copy link
Owner

mintty commented Nov 11, 2015

Thanks; I guess I'd rather fix it like this:

   int arg0 = term.csi_argv[0], arg1 = term.csi_argv[1];
+  if (arg0 < 0)
+    arg0 = 0;
+  if (arg1 < 0)
+    arg1 = 0;
   int arg0_def1 = arg0 ?: 1;  // first arg with default 1

so to handle it like a signed positive value-range overflow.

@mintty
Copy link
Owner

mintty commented Nov 12, 2015

Added multiple guards.

@mintty
Copy link
Owner

mintty commented Nov 22, 2015

Fixed in 2.2.2.

@mintty mintty closed this Nov 22, 2015
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.

None yet

2 participants