Problem found and anaylyzed by Romain Gabet, ok markus@
-/* $OpenBSD: ip_ipcomp.c,v 1.65 2018/08/28 15:15:02 mpi Exp $ */
+/* $OpenBSD: ip_ipcomp.c,v 1.66 2018/09/13 12:29:43 mpi Exp $ */
/*
* Copyright (c) 2001 Jean-Jacques Bernard-Gundol (jj@wabbitt.org)
rlen = ilen - skip;
/* Check sizes. */
- if (rlen < olen) {
+ if (rlen <= olen + IPCOMP_HLENGTH) {
/* Compression was useless, we have lost time. */
ipcompstat_inc(ipcomps_minlen); /* misnomer, but like to count */
goto skiphdr;