mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 05:58:20 +00:00
Fix binpac exception in RFB analyzer.
The RFB analyzer's state machine did not foresee that a server could send two subsequent messages in one packet. This would result in the error. Patch by Martin van Hensbergen.
This commit is contained in:
parent
17dc28b8a8
commit
83639e9147
2 changed files with 7 additions and 2 deletions
|
@ -150,8 +150,12 @@ refine connection RFB_Conn += {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( msg->sectype() == 2 )
|
if ( msg->sectype() == 2 )
|
||||||
{ //VNC
|
{ // VNC
|
||||||
state = AWAITING_SERVER_CHALLENGE;
|
if ( ${msg.possible_challenge}.length() == 16 )
|
||||||
|
// Challenge was already sent with this message
|
||||||
|
state = AWAITING_CLIENT_RESPONSE;
|
||||||
|
else
|
||||||
|
state = AWAITING_SERVER_CHALLENGE;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
%}
|
%}
|
||||||
|
|
|
@ -28,6 +28,7 @@ type RFBProtocolVersion (client: bool) = record {
|
||||||
|
|
||||||
type RFBSecurityTypes = record {
|
type RFBSecurityTypes = record {
|
||||||
sectype: uint32;
|
sectype: uint32;
|
||||||
|
possible_challenge: bytestring &restofdata;
|
||||||
} &let {
|
} &let {
|
||||||
proc: bool = $context.connection.handle_security_types(this);
|
proc: bool = $context.connection.handle_security_types(this);
|
||||||
proc2: bool = $context.flow.proc_security_types(this);
|
proc2: bool = $context.flow.proc_security_types(this);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue