Project

General

Profile

Actions

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.

Status:
Closed
Priority:
Urgent
Assignee:
Category:
Faces
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
2.00 h

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.


Related issues 1 (0 open1 closed)

Blocks NFD - Feature #3170: EthernetTransportClosedDavide Pesavento

Actions
Actions #1

Updated by Davide Pesavento about 9 years ago

Actions #2

Updated by Junxiao Shi about 9 years ago

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.

Actions #3

Updated by Davide Pesavento about 9 years ago

Feel free to move this to NFD then.

Actions #4

Updated by Davide Pesavento about 9 years ago

  • Priority changed from High to Urgent

Raising priority since the bug can cause the forwarder to crash on malformed packets.

Actions #5

Updated by Junxiao Shi about 9 years ago

  • 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
Actions #6

Updated by Eric Newberry about 9 years ago

  • Status changed from New to In Progress
Actions #7

Updated by Eric Newberry about 9 years ago

  • Status changed from In Progress to Code review
Actions #8

Updated by Junxiao Shi about 9 years ago

  • % Done changed from 0 to 100
Actions #9

Updated by Eric Newberry about 9 years ago

  • Status changed from Code review to Closed
Actions

Also available in: Atom PDF