Commit e7f66e7
committed
GH-891: Fix format of injected SSH_MSG_IGNORE
The message was constructed wrongly as SSH_MSG_IGNORE + (random data)
instead of as SSH_MSG_IGNORE + (length of random data) + (random data).
This is a bug only in the 3.0 branch; in the 2.x branch the packet is
constructed correctly.
Our regression tests failed to catch this because neither Apache MINA
SSHD nor openSSH look at the body of an SSH_MSG_IGNORE packet. Some
other servers do.
Tighten the InjectIgnoreFilterTest to also verify the full packet
format.1 parent fff5fe2 commit e7f66e7
3 files changed
Lines changed: 10 additions & 2 deletions
File tree
- sshd-core/src
- main/java/org/apache/sshd/common/session/filters
- test/java/org/apache/sshd/common/session/filters
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
| 145 | + | |
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
| 149 | + | |
148 | 150 | | |
149 | 151 | | |
150 | 152 | | |
| |||
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
85 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
86 | 90 | | |
87 | 91 | | |
88 | 92 | | |
| 93 | + | |
89 | 94 | | |
90 | 95 | | |
0 commit comments