Dan Rosenberg be20250c13 ROSE: prevent heap corruption with bad facilities
When parsing the FAC_NATIONAL_DIGIS facilities field, it's possible for
a remote host to provide more digipeaters than expected, resulting in
heap corruption.  Check against ROSE_MAX_DIGIS to prevent overflows, and
abort facilities parsing on failure.

Additionally, when parsing the FAC_CCITT_DEST_NSAP and
FAC_CCITT_SRC_NSAP facilities fields, a remote host can provide a length
of less than 10, resulting in an underflow in a memcpy size, causing a
kernel panic due to massive heap corruption.  A length of greater than
20 results in a stack overflow of the callsign array.  Abort facilities
parsing on these invalid length values.

Signed-off-by: Dan Rosenberg <drosenberg@vsecurity.com>
Cc: stable@kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-03-27 17:59:03 -07:00
..
2010-10-25 13:09:44 -07:00
2011-03-04 12:25:05 -08:00
2011-03-14 17:02:42 -07:00
2011-01-12 19:00:40 -08:00
2011-03-25 20:33:23 -07:00
2011-03-21 18:16:39 -07:00
2011-03-01 22:51:52 -08:00
2010-04-20 16:37:13 -07:00
2011-03-05 10:55:45 +01:00
2010-10-15 15:53:27 +02:00