From 4d0ef2409d904cb257aaa7e9b18136f8987989e4 Mon Sep 17 00:00:00 2001 From: Github Security Lab Date: Fri, 6 Mar 2020 23:00:39 +0100 Subject: [PATCH] `vallen` is verified to be less than `len`, therefore, it can never be the case that `vallen >= len + sizeof(rhostname)`. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR fixes the check so the `rhostname` array does not overflow. Reported-by: Github Security Lab Signed-off-by: Alvaro Muñoz --- R7000/ap/gpl/ppp-2.4.4/pppd/eap.c | 4 +- R7000/src/router/iptables-1.4.12/src/INSTALL | 99 -------------------- 2 files changed, 2 insertions(+), 101 deletions(-) delete mode 100644 R7000/src/router/iptables-1.4.12/src/INSTALL diff --git a/R7000/ap/gpl/ppp-2.4.4/pppd/eap.c b/R7000/ap/gpl/ppp-2.4.4/pppd/eap.c index 6203f94d0..48547e6be 100644 --- a/R7000/ap/gpl/ppp-2.4.4/pppd/eap.c +++ b/R7000/ap/gpl/ppp-2.4.4/pppd/eap.c @@ -1421,7 +1421,7 @@ int len; } /* Not so likely to happen. */ - if (vallen >= len + sizeof (rhostname)) { + if (len - vallen >= sizeof (rhostname)) { dbglog("EAP: trimming really long peer name down"); BCOPY(inp + vallen, rhostname, sizeof (rhostname) - 1); rhostname[sizeof (rhostname) - 1] = '\0'; @@ -1847,7 +1847,7 @@ int len; } /* Not so likely to happen. */ - if (vallen >= len + sizeof (rhostname)) { + if (len - vallen >= sizeof (rhostname)) { dbglog("EAP: trimming really long peer name down"); BCOPY(inp + vallen, rhostname, sizeof (rhostname) - 1); rhostname[sizeof (rhostname) - 1] = '\0'; diff --git a/R7000/src/router/iptables-1.4.12/src/INSTALL b/R7000/src/router/iptables-1.4.12/src/INSTALL deleted file mode 100644 index e17e84415..000000000 --- a/R7000/src/router/iptables-1.4.12/src/INSTALL +++ /dev/null @@ -1,99 +0,0 @@ -Installation instructions for iptables -====================================== - -iptables uses the well-known configure(autotools) infrastructure. - - $ ./configure - $ make - # make install - - -Prerequisites -============= - - * no kernel-source required - - * but obviously a compiler, glibc-devel and linux-kernel-headers - (/usr/include/linux) - - -Configuring and compiling -========================= - -./configure [options] - ---prefix= - - The prefix to put all installed files under. It defaults to - /usr/local, so the binaries will go into /usr/local/bin, sbin, - manpages into /usr/local/share/man, etc. - ---with-xtlibdir= - - The path to where Xtables extensions should be installed to. It - defaults to ${libdir}/xtables. - ---enable-devel (or --disable-devel) - - This option causes development files to be installed to - ${includedir}, which is needed for building additional packages, - such as Xtables-addons or other 3rd-party extensions. - - It is enabled by default. - ---enable-static - - Produce additional binaries, iptables-static/ip6tables-static, - which have all shipped extensions compiled in. - ---disable-shared - - Produce binaries that have dynamic loading of extensions disabled. - This implies --enable-static. - (See some details below.) - ---enable-libipq - - This option causes libipq to be installed into ${libdir} and - ${includedir}. - ---with-ksource= - - Xtables does not depend on kernel headers anymore, but you can - optionally specify a search path to include anyway. This is - probably only useful for development. - -If you want to enable debugging, use - - ./configure CFLAGS="-ggdb3 -O0" - -(-O0 is used to turn off instruction reordering, which makes debugging -much easier.) - - -Other notes -=========== - -The make process will automatically build multipurpose binaries. -These have the core (iptables), -save, -restore and -xml code -compiled into one binary, but extensions remain as modules. - - -Static and shared -================= - -Basically there are three configuration modes defined: - - --disable-static --enable-shared (this is the default) - - Build a binary that relies upon dynamic loading of extensions. - - --enable-static --enable-shared - - Build a binary that has the shipped extensions built-in, but - is still capable of loading additional extensions. - - --enable-static --disable-shared - - Shipped extensions are built-in, and dynamic loading is - deactivated.