Commit 5630511
rxrpc: Fix rxkad token xdr encoding
The session key should be encoded with just the 8 data bytes and
no length; ENCODE_DATA precedes it with a 4 byte length, which
confuses some existing tools that try to parse this format.
Add an ENCODE_BYTES macro that does not include a length, and use
it for the key. Also adjust the expected length.
Note that commit 774521f ("rxrpc: Fix an assertion in
rxrpc_read()") had fixed a BUG by changing the length rather than
fixing the encoding. The original length was correct.
Fixes: 9945515 ("RxRPC: Parse security index 5 keys (Kerberos 5)")
Signed-off-by: Marc Dionne <marc.dionne@auristor.com>
Signed-off-by: David Howells <dhowells@redhat.com>1 parent 4296adc commit 5630511
1 file changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1072 | 1072 | | |
1073 | 1073 | | |
1074 | 1074 | | |
1075 | | - | |
| 1075 | + | |
1076 | 1076 | | |
1077 | 1077 | | |
1078 | 1078 | | |
| |||
1138 | 1138 | | |
1139 | 1139 | | |
1140 | 1140 | | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
1141 | 1149 | | |
1142 | 1150 | | |
1143 | 1151 | | |
| |||
1165 | 1173 | | |
1166 | 1174 | | |
1167 | 1175 | | |
1168 | | - | |
| 1176 | + | |
1169 | 1177 | | |
1170 | 1178 | | |
1171 | 1179 | | |
| |||
0 commit comments