Bug #3249
closed
GenericLinkService performs insufficient validation before calling lp::Packet::get<lp::FragmentField>()
Added by Davide Pesavento about 9 years ago.
Updated about 9 years ago.
Description
ndn::lp::Packet
throws exceptions of type std::out_of_range
and std::length_error
to indicate logic errors.
However, NFD's GenericLinkService::doReceivePacket()
performs insufficient validation before calling get<lp::FragmentField>()
, which may cause NFD to crash when receiving malformed packets.
Subclasses of std::logic_error
thrown by lp::Packet
are not packet parsing errors. They are logic errors, and it's intentional that these are not derived from tlv::Error
.
GenericLinkService
should not allow logic errors to escape to its caller.
Feel free to move this to NFD then.
- Priority changed from High to Urgent
Raising priority since the bug can cause the forwarder to crash on malformed packets.
- Project changed from ndn-cxx to NFD
- Subject changed from Inconsistent exception types thrown by lp::Packet to GenericLinkService performs insufficient validation before calling lp::Packet::get<lp::FragmentField>()
- Description updated (diff)
- Category changed from Base to Faces
- Assignee set to Eric Newberry
- Target version changed from v0.4 to v0.4
- Estimated time set to 2.00 h
- Status changed from New to In Progress
- Status changed from In Progress to Code review
- % Done changed from 0 to 100
- Status changed from Code review to Closed
Also available in: Atom
PDF