Add protection against UDP inetd looping attacks

This patch adds protection against a common inetd attack vector wherein
the reply port to UDP inetd services is forged to an internal inetd
service port.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2016-07-18 17:27:37 +02:00
1 parent 5723b2e75b
commit 7dfdc2395b
8 files changed
+70 -6

No files matched your search

+3
View File
@@ -46,6 +46,7 @@ typedef struct {
int proto;
int port;
int forking;
int builtin; /* Set by built-in inetd services only */
int next_id; /* Next child job's id */
char name[10];
int (*cmd)(int type); /* internal inetd service, like 'time' */
@@ -53,6 +54,8 @@ typedef struct {
TAILQ_HEAD(, inetd_filter) filters;
} inetd_t;
int inetd_check_loop (struct sockaddr *sa, socklen_t len, char *name);
int inetd_start (inetd_t *inetd);
void inetd_stop (inetd_t *inetd);