Open
Description
If an ftp client send a RETR closely followed by an ABOR memory is freed in the cmd_abrt() -> tcp->abort() -> tcp->abandon() -> ftpd_msgerr() -> ftpd_dataclsoe() call sequence that cmd_abrt subsequently tries to use/free again. Taking the code to free memory out of cmd_abrt() fixes the crash, but causes a memory leak as expected. I believe the fundamental problem is the callbacks used do not have the ability to propagate the freeing of the memory back up the call return stack. Some one of the calling functions need to know enough to invalidate a pointer somewhere.
This was found by implementing the SIZE command and issuing a curl command that had a range starting at offset 0.
curl ftp://ip_address/filename --range 0-1000 -o /tmp/out.tx
Metadata
Metadata
Assignees
Labels
No labels
Activity