Skip to content

Commit bed4806

Browse files
guyharrisinfrastation
authored andcommitted
CVE-2017-11542/PIMv1: Add a bounds check.
This fixes a buffer over-read discovered by Kamil Frankowicz. Add a test using the capture file supplied by the reporter(s).
1 parent e40c0ca commit bed4806

File tree

4 files changed

+27
-0
lines changed

4 files changed

+27
-0
lines changed

print-pim.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ pimv1_print(netdissect_options *ndo,
306306
pimv1_join_prune_print(ndo, &bp[8], len - 8);
307307
break;
308308
}
309+
ND_TCHECK(bp[4]);
309310
if ((bp[4] >> 4) != 1)
310311
ND_PRINT((ndo, " [v%d]", bp[4] >> 4));
311312
return;

tests/TESTLIST

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,7 @@ snmp-heapoverflow-2 snmp-heapoverflow-2.pcap snmp-heapoverflow-2.out
439439
isoclns-heapoverflow-2 isoclns-heapoverflow-2.pcap isoclns-heapoverflow-2.out -e -c1
440440
isoclns-heapoverflow-3 isoclns-heapoverflow-3.pcap isoclns-heapoverflow-3.out -e -c1
441441
stp-v4-length-sigsegv stp-v4-length-sigsegv.pcap stp-v4-length-sigsegv.out
442+
hoobr_pimv1 hoobr_pimv1.pcap hoobr_pimv1.out
442443

443444
# RTP tests
444445
# fuzzed pcap

tests/hoobr_pimv1.out

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
30:30:30:30:30:30 > 30:30:30:30:30:30, ethertype Unknown (0x3030), length 808464432:
2+
0x0000: 3030 3030 3030 3030 3030 3030 3030 3030 0000000000000000
3+
0x0010: 3030 3030 3030 3030 00000000
4+
30:30:30:30:30:30 > 30:30:30:30:30:30, ethertype Unknown (0x3030), length 808464432:
5+
0x0000: 3030 3030 3030 3030 3030 3030 3030 3030 0000000000000000
6+
0x0010: 3030 3030 3030 3030 00000000
7+
30:30:30:30:30:30 > 30:30:30:30:30:30, ethertype Unknown (0x3030), length 808464432:
8+
0x0000: 3030 3030 3030 3030 3030 3030 3030 3030 0000000000000000
9+
0x0010: 3030 3030 3030 3030 00000000
10+
30:30:30:30:30:30 > 30:30:30:30:30:30, ethertype Unknown (0x3030), length 808464432:
11+
0x0000: 3030 3030 3030 3030 3030 3030 3030 3030 0000000000000000
12+
0x0010: 3030 3030 3030 3030 00000000
13+
30:30:30:30:30:30 > 30:30:30:30:30:30, ethertype Unknown (0x3030), length 808464432:
14+
0x0000: 3030 3030 3030 3030 3030 3030 3030 3030 0000000000000000
15+
0x0010: 3030 3030 3030 3030 00000000
16+
30:30:30:30:30:30 > 30:30:30:30:30:30, ethertype Unknown (0x3030), length 808464432:
17+
0x0000: 3030 3030 3030 3030 3030 3030 3030 3030 0000000000000000
18+
0x0010: 3030 3030 3030 3030 00000000
19+
30:30:30:30:30:30 > 30:30:30:30:30:30, ethertype Unknown (0x3030), length 808464432:
20+
0x0000: 3030 3030 3030 3030 3030 3030 3030 3030 0000000000000000
21+
0x0010: 3030 3030 3030 3030 00000000
22+
30:30:30:30:30:30 > 30:30:30:30:30:30, ethertype Unknown (0x3030), length 808464432:
23+
0x0000: 3030 3030 3030 3030 3030 3030 3030 3030 0000000000000000
24+
0x0010: 3030 3030 3030 3030 00000000
25+
IP 48.48.48.48 > 48.48.48.48: igmp pimv1 [type 48][|pim]

tests/hoobr_pimv1.pcap

3.24 KB
Binary file not shown.

0 commit comments

Comments
 (0)