Skip to content

Commit 592b294

Browse files
committed
krb5: fix TCP record parsing
A logic error in multi-record parsing meant only the first record was parsed. Bug: OISF#8278. (cherry picked from commit 336a9d0)
1 parent 49a418d commit 592b294

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

rust/src/krb/krb5.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -522,8 +522,8 @@ unsafe extern "C" fn krb5_parse_request_tcp(
522522
if state.parse(cur_i, flow, Direction::ToServer) < 0 {
523523
return AppLayerResult::err();
524524
}
525-
state.record_ts = 0;
526525
cur_i = &cur_i[state.record_ts..];
526+
state.record_ts = 0;
527527
} else {
528528
// more fragments required
529529
state.defrag_buf_ts.extend_from_slice(cur_i);
@@ -580,8 +580,8 @@ unsafe extern "C" fn krb5_parse_response_tcp(
580580
if state.parse(cur_i, flow, Direction::ToClient) < 0 {
581581
return AppLayerResult::err();
582582
}
583-
state.record_tc = 0;
584583
cur_i = &cur_i[state.record_tc..];
584+
state.record_tc = 0;
585585
} else {
586586
// more fragments required
587587
state.defrag_buf_tc.extend_from_slice(cur_i);

0 commit comments

Comments
 (0)