Fix parsing of mal-formed optional TLVs/Sub-TLVs.
authorrenato <renato@openbsd.org>
Sat, 16 Jul 2016 19:20:16 +0000 (19:20 +0000)
committerrenato <renato@openbsd.org>
Sat, 16 Jul 2016 19:20:16 +0000 (19:20 +0000)
commita78ea73f827928c1e19cfa5f76567b253c6e1213
treef9bae4266a6ef06e06fb3bf69fde2a5db58ba61f
parent6e164ab35a9c3774003dbd882f64b361e2d2d55e
Fix parsing of mal-formed optional TLVs/Sub-TLVs.

We must detect if a TLV's length extends beyond the end of the containing
message. And, if so, send a fatal "Bad TLV Length" notification message.

Found with the Mu Dynamics Mu-8000 protocol fuzzer.
usr.sbin/ldpd/hello.c
usr.sbin/ldpd/init.c
usr.sbin/ldpd/labelmapping.c
usr.sbin/ldpd/notification.c