]> git.ipfire.org Git - thirdparty/rspamd.git/commit
[Feature] Fuzzy check: add reply processing and lifecycle management
authorVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 7 Oct 2025 12:00:58 +0000 (13:00 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Tue, 7 Oct 2025 12:00:58 +0000 (13:00 +0100)
commit9db45115a6d317d4369a437f07cf08eb3f099604
treef54f5d8eab340cd865e0b6d305de5e846388043b
parenta88375e81b55ca226b33125f2cc12c87dd1b70b3
[Feature] Fuzzy check: add reply processing and lifecycle management

Complete TCP reply handling:
- Process all error codes (403, 503, 415, 401) like UDP
- Handle FUZZY_STAT commands with proper storage
- Mark commands as replied and check session completion

Add memory safety and lifecycle management:
- Cleanup pending requests when task finishes before reply
- Timeout checking for pending requests (io_timeout)
- Proper session cleanup for TCP (no fd/ev_watcher)
- Initialize TCP session fields (fd=-1, event_loop)

Prevents use-after-free when:
- Task completes before TCP reply arrives
- Reply takes too long (timeout)
- Connection fails with pending requests
src/plugins/fuzzy_check.c