Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(187)

Issue 6460075: code review 6460075: go.crypto/ssh: improve channel max packet handling (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 10 months ago by dave
Modified:
13 years, 10 months ago
Reviewers:
CC:
gpaul, agl1, albert.strasheim, huin-google, golang-dev
Visibility:
Public.

Description

go.crypto/ssh: improve channel max packet handling This proposal moves the check for max packet into channel.writePacket. Callers should be aware they cannot pass a buffer larger than max packet. This is only a concern to chanWriter.Write and appropriate guards are already in place. There was some max packet handling in transport.go but it was incorrect. This has been removed. This proposal also cleans up session_test.go.

Patch Set 1 #

Patch Set 2 : diff -r b40d39ad1699 https://code.google.com/p/go.crypto #

Patch Set 3 : diff -r b40d39ad1699 https://code.google.com/p/go.crypto #

Patch Set 4 : diff -r b40d39ad1699 https://code.google.com/p/go.crypto #

Patch Set 5 : diff -r b40d39ad1699 https://code.google.com/p/go.crypto #

Patch Set 6 : diff -r b40d39ad1699 https://code.google.com/p/go.crypto #

Total comments: 8

Patch Set 7 : diff -r b40d39ad1699 https://code.google.com/p/go.crypto #

Patch Set 8 : diff -r 69c3cdaaffb7 https://code.google.com/p/go.crypto #

Unified diffs Side-by-side diffs Delta from patch set Stats (+126 lines, -76 lines) Patch
M ssh/channel.go View 1 2 3 4 5 6 7 chunks +24 lines, -8 lines 0 comments Download
M ssh/server.go View 1 2 3 4 5 6 1 chunk +4 lines, -2 lines 0 comments Download
M ssh/session_test.go View 1 2 3 4 25 chunks +97 lines, -56 lines 0 comments Download
M ssh/transport.go View 1 3 chunks +1 line, -10 lines 0 comments Download

Messages

Total messages: 9
dave_cheney.net
Hello gustav.paul@gmail.com, agl@golang.org, fullung@gmail.com, huin@google.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to ...
13 years, 10 months ago (2012-08-11 07:18:33 UTC) #1
albert.strasheim
Hello On 2012/08/11 07:18:33, dfc wrote: > Hello mailto:gustav.paul@gmail.com, mailto:agl@golang.org, mailto:fullung@gmail.com, mailto:huin@google.com > (cc: mailto:golang-dev@googlegroups.com), ...
13 years, 10 months ago (2012-08-11 08:02:27 UTC) #2
dave_cheney.net
> "Methods like channel.stdin.Write still need to check that they are not > passing more ...
13 years, 10 months ago (2012-08-11 08:06:36 UTC) #3
dave_cheney.net
Hello gustav.paul@gmail.com, agl@golang.org, fullung@gmail.com, huin@google.com (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 10 months ago (2012-08-11 08:55:25 UTC) #4
dave_cheney.net
I have updated the description to clarify the restrictions on calling writePacket.
13 years, 10 months ago (2012-08-11 08:55:55 UTC) #5
agl1
LGTM http://codereview.appspot.com/6460075/diff/10001/ssh/channel.go File ssh/channel.go (right): http://codereview.appspot.com/6460075/diff/10001/ssh/channel.go#newcode120 ssh/channel.go:120: return fmt.Errorf("ssh: cannot write %d, maxPacket is %d", ...
13 years, 10 months ago (2012-08-11 16:37:37 UTC) #6
dave_cheney.net
Thanks for your comments agl. I'll leave this review open for a while longer to ...
13 years, 10 months ago (2012-08-11 23:57:26 UTC) #7
dave_cheney.net
Hello gustav.paul@gmail.com, agl@golang.org, fullung@gmail.com, huin@google.com (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 10 months ago (2012-08-11 23:57:44 UTC) #8
dave_cheney.net
13 years, 10 months ago (2012-08-12 22:22:59 UTC) #9
*** Submitted as
http://code.google.com/p/go/source/detail?r=78aaaa8a7361&repo=crypto ***

go.crypto/ssh: improve channel max packet handling

This proposal moves the check for max packet into
channel.writePacket. Callers should be aware they cannot
pass a buffer larger than max packet. This is only a
concern to chanWriter.Write and appropriate guards are
already in place.

There was some max packet handling in transport.go but it was
incorrect. This has been removed.

This proposal also cleans up session_test.go.

R=gustav.paul, agl, fullung, huin
CC=golang-dev
http://codereview.appspot.com/6460075
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b