Skip to content

Commit 0cb381b

Browse files
committed
IPv6 mobility: Fix two message header lengths
From 12 to 16. RFC 3775 (and RFC 6275) states: 6.1.1. Format ... Header Len 8-bit unsigned integer, representing the length of the Mobility Header in units of 8 octets, excluding the first 8 octets. The length of the Mobility Header MUST be a multiple of 8 octets. 6.1.7. Binding Update Message ... If no options are present in this message, 4 octets of padding are necessary and the Header Len field will be set to 1. 6.1.8. Binding Acknowledgement Message ... If no options are present in this message, 4 octets of padding are necessary and the Header Len field will be set to 1. Update a test output accordingly.
1 parent d839e5d commit 0cb381b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

print-mobility.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ static const unsigned ip6m_hdrlen[IP6M_MAX + 1] = {
9090
IP6M_MINLEN + 8, /* IP6M_CAREOF_TEST_INIT */
9191
IP6M_MINLEN + 16, /* IP6M_HOME_TEST */
9292
IP6M_MINLEN + 16, /* IP6M_CAREOF_TEST */
93-
IP6M_MINLEN + 4, /* IP6M_BINDING_UPDATE */
94-
IP6M_MINLEN + 4, /* IP6M_BINDING_ACK */
93+
IP6M_MINLEN + 8, /* IP6M_BINDING_UPDATE */
94+
IP6M_MINLEN + 8, /* IP6M_BINDING_ACK */
9595
IP6M_MINLEN + 16, /* IP6M_BINDING_ERROR */
9696
};
9797

tests/cve2015-0261-ipv6.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
1 2002-12-31 13:55:31.300000 IP6 [header+payload length 26510 > length 185] (invalid) (class 0x76, flowlabel 0x76767, hlim 103, next-header Mobility (135), payload length 26470) 6767:6767:6767:6767:6767:6767:6767:6767 > 6767:6767:6767:6767:6767:6767:6767:6705: mobility: (payload protocol 255 should be 59) BU seq#=26471 HL lifetime=105884(type-0x67: len=103) [|mobility]
2-
2 2003-03-06 15:21:11.300000 IP6 [header+payload length 26510 > length 185] (invalid) (class 0x76, flowlabel 0x76767, hlim 103, next-header Mobility (135), payload length 26470) 6767:6767:6767:6767:6767:6767:6767:6767 > 6767:6767:4f67:6767:6767:6767:6767:6767: mobility: (payload protocol 0 should be 59) BA (header length 8 < 12) (invalid)
2+
2 2003-03-06 15:21:11.300000 IP6 [header+payload length 26510 > length 185] (invalid) (class 0x76, flowlabel 0x76767, hlim 103, next-header Mobility (135), payload length 26470) 6767:6767:6767:6767:6767:6767:6767:6767 > 6767:6767:4f67:6767:6767:6767:6767:6767: mobility: (payload protocol 0 should be 59) BA (header length 8 < 16) (invalid)

0 commit comments

Comments
 (0)