diff options
author | kris <kris@FreeBSD.org> | 2000-10-31 05:29:54 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2000-10-31 05:29:54 +0000 |
commit | d710bffe2000f3a05d0bb9fe611d0d14676ef68e (patch) | |
tree | 192ceb398c2d301b71b76e39a72d035ccc4a290d /libexec/telnetd/sys_term.c | |
parent | 11f32dfee0527c6a1b8bb20381b6357ae4212efd (diff) | |
download | FreeBSD-src-d710bffe2000f3a05d0bb9fe611d0d14676ef68e.zip FreeBSD-src-d710bffe2000f3a05d0bb9fe611d0d14676ef68e.tar.gz |
Filter out some more magic environment variables used by libraries linked
with telnetd. This should really be done with a positive filter - i.e.
only allow through a configured list of variables.
Also do some buffer-safety cleanups while I'm here - I don't think these
are exploitable.
Diffstat (limited to 'libexec/telnetd/sys_term.c')
-rw-r--r-- | libexec/telnetd/sys_term.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libexec/telnetd/sys_term.c b/libexec/telnetd/sys_term.c index d7e9ed3..332dddc 100644 --- a/libexec/telnetd/sys_term.c +++ b/libexec/telnetd/sys_term.c @@ -1799,6 +1799,13 @@ scrub_env() strncmp(*cpp, "_RLD_", 5) && strncmp(*cpp, "LIBPATH=", 8) && #endif + strncmp(*cpp, "LOCALDOMAIN=", 12) && + strncmp(*cpp, "RES_OPTIONS=", 12) && + strncmp(*cpp, "TERMINFO=", 9) && + strncmp(*cpp, "TERMINFO_DIRS=", 14) && + strncmp(*cpp, "TERMPATH=", 9) && + strncmp(*cpp, "TERMCAP=/", 9) && + strncmp(*cpp, "ENV=", 4) && strncmp(*cpp, "IFS=", 4)) *cpp2++ = *cpp; } |