I have written a simple C program (~30 lines) that opens an internet socket and sends data to the client on every connection. The program never read()
s from the socket; it just parses the /proc
filesystem and write()
s the output to the socket, then closes it.
I have almost no defensive programming skills, so we can assume my program is full of bad practices and vulnerabilities.
Is it completely safe to expose the socket to the internet? In other words, are there any known vulnerabilities that could arise from an open TCP port that does not receive anything from the client?