]> git.proxmox.com Git - mirror_frr.git/commit
pimd: Various buffer overflow reads and crashes
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 20 Nov 2019 00:36:19 +0000 (19:36 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 20 Nov 2019 13:31:27 +0000 (08:31 -0500)
commitca491f0e2df74e8044290db7067e8ece6a9ffe12
treed9a3ebe7687ec43076a58bcc2e4ac2640c8d890d
parent334d2da8af9ceb2e04988c18af6e78c8eb40d3aa
pimd: Various buffer overflow reads and crashes

A variety of buffer overflow reads and crashes
that could occur if you fed bad info into pim.

1) When type is setup incorrectly we were printing the first 8 bytes
of the pim_parse_addr_source, but the min encoding length is
4 bytes.  As such we will read beyond end of buffer.

2) The RP(pim, grp) macro can return a NULL value
Do not automatically assume that we can deref
the data.

3) BSM parsing was not properly sanitizing data input from wire
and we could enter into situations where we would read beyond
the end of the buffer.  Prevent this from happening, we are
probably left in a bad way.

4) The received bit length cannot be greater than 32 bits,
refuse to allow it to happen.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/pim_join.c
pimd/pim_rp.c
pimd/pim_tlv.c