जमा करें #84: uftpd 2.6-2.10 Buffer Overflowजानकारी

शीर्षकuftpd 2.6-2.10 Buffer Overflow
विवरण# Buffer Overflow ## Description There is a buffer overflow vulnerability in `handle_PORT` in `ftpcmd.c` that is caused by a buffer that is 16 bytes large being filled via `sprintf` with user input based on the format specifier string `%d.%d.%d.%d`. The 16 byte size is correct for valid IPv4 addresses (`len('x.x.x.x') == 16`), but the format specifier `%d` allows more than 3 digits. ![handle_PORT](https://aaronesau.com/files/blog/uftpd-handle_PORT.png) ## Reproduction Steps To reproduce this vulnerability, connect via `netcat <ip> <port>` and write to the FTP server socket the following and observe the child process spawned for the connection SIGABRT: ``` PORT 13371337,12341234,12345678,10102929,1,2 ``` ![canary](https://aaronesau.com/files/blog/uftpd-canary.png) ## Mitigation Use `snprintf` and use the size of the buffer as the size input. Currently, it uses `inet_aton` to validate the IPv4 address, so if the user inputs an invalid address, it will be caught at that line anyway.
स्रोत⚠️ https://aaronesau.com/blog/posts/6
उपयोगकर्ता
 arinerron (UID 4337)
सबमिशन31/08/2019 08:37 PM (7 साल पहले)
संयम03/09/2019 07:11 AM (2 days later)
स्थितिस्वीकृत
VulDB प्रविष्टि141192 [uftpd 2.6-2.10 ftpcmd.c handle_PORT बफ़र ओवरफ़्लो]
अंक20

Want to stay up to date on a daily basis?

Enable the mail alert feature now!