mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
ldap: Avoid unset m$opcode
Initial fuzzing caused a bind response to arrive before a bind request, resulting in an unset field expression error: expression error in base/protocols/ldap/main.zeek, line 270: field value missing (LDAP::m$opcode) Prevent this by ensuring m$opcode is set and raising instead.
This commit is contained in:
parent
92d4e50b48
commit
83a2eb3665
1 changed files with 4 additions and 0 deletions
|
@ -229,6 +229,10 @@ event LDAP::message(c: connection,
|
||||||
fmt("%s: %s -> %s", message_id, m$opcode, opcode_str), "LDAP");
|
fmt("%s: %s -> %s", message_id, m$opcode, opcode_str), "LDAP");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m$opcode = opcode_str;
|
||||||
|
} else if ( ! m?$opcode ) {
|
||||||
|
# This can happen if we see a bind response before the bind request.
|
||||||
|
Reporter::conn_weird("LDAP_bind_without_opcode", c, fmt("%s: %s", message_id, opcode_str), "LDAP");
|
||||||
m$opcode = opcode_str;
|
m$opcode = opcode_str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue