Harden LDAP control decoding against malformed BER input#6
Conversation
Change DecodeControl to return (Control, error) and validate control structure and value types instead of relying on unchecked access. Handle decode failures on both server and client paths, returning protocol errors for bad request controls and surfacing response decode errors.
|
Thanks for the fast turnaround, Chris. I went through the diff against the original report. Summary: the seven unsafe sites in
The control-decoding hardening itself looks solid — I'd just like to see (1) and (3) addressed and ideally (2) before merge. |
1 similar comment
|
Thanks for the fast turnaround, Chris. I went through the diff against the original report. Summary: the seven unsafe sites in
The control-decoding hardening itself looks solid — I'd just like to see (1) and (3) addressed and ideally (2) before merge. |
Change DecodeControl to return (Control, error) and validate control structure and value types instead of relying on unchecked access.
Handle decode failures on both server and client paths, returning protocol errors for bad request controls and surfacing response decode errors.