Skip to content

fix: avoid a panic on a multi-byte UTF-8 SMTP reply line (remote DoS) - #101

Merged
evilsocket merged 1 commit into
evilsocket:mainfrom
gigioneggiando:fix-smtp-ntlm-panic
Jul 6, 2026
Merged

fix: avoid a panic on a multi-byte UTF-8 SMTP reply line (remote DoS)#101
evilsocket merged 1 commit into
evilsocket:mainfrom
gigioneggiando:fix-smtp-ntlm-panic

Conversation

@gigioneggiando

Copy link
Copy Markdown
Contributor

Same remote-DoS family (a server-triggered panic aborts the process under panic = "abort").

src/plugins/smtp/ntlm.rs: the reply parser checks trimmed.len() >= 3 (a byte length) but then slices trimmed[..3] (a byte index), which panics if byte 3 is not a UTF-8 char boundary. A malicious SMTP server that sends a reply line beginning with a multi-byte UTF-8 sequence panics the process. This uses trimmed.get(..3) so a non-boundary is a returned error instead of a panic.

@evilsocket
evilsocket merged commit 0ee2389 into evilsocket:main Jul 6, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants