mirror_frr/isisd
Donald Sharp 7ce31babfc isisd: Prevent OOM crash in isis
When you set the isis mtu to 200, isis ends up in a infinite loop
trying to fragment the tlv's.

Specifically ( for me ) the extended reachability function
for packing pack_item_extended_reach requires 11 + ISIS_SUBTLV_MAX_SIZE
room in the packet.  Which is 180 bytes.  At this point we have
174 bytes that we can write into a packet.

I created this by modifying the isis-topo1 topology to all
the isis routers to have a lsp-mtu of 200 and immediately
saw the crash.

Effectively the pack_items_ function had no detection for
when a part of the next bit it was writing into the stream
could not even fit and it would go into an infinite loop
allocating ~800 bytes at a time.  This would cause the
router to run out of memory very very fast and the OOM
detector would kill the process.

Modify the code to notice that we have insufficient space to
even write any data into the stream.

I suspect that pack_item_extended_reach could also be optimized
to figure out exactly how much space is needed.  But I also
think we need this protection in the function if this ever
happens again.

I also do not understand the use case of saying the min mtu is
200.

Fixes: #8289
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-03-25 09:11:28 -04:00
..
.gitignore *: cleanup .gitignore files 2018-09-08 21:30:42 +02:00
AUTHORS Add support of Traffic Engineering to IS-IS 2016-09-03 11:05:50 -04:00
fabricd.c isisd: kill isis_memory.h, use MTYPE_STATIC 2021-03-22 18:27:58 +01:00
fabricd.conf.sample fabricd: add new daemon as build of isisd 2018-09-05 11:38:12 +02:00
fabricd.h *: use the current project name (FRRouting) 2020-03-25 17:38:56 -04:00
isis_adjacency.c isisd: kill isis_memory.h, use MTYPE_STATIC 2021-03-22 18:27:58 +01:00
isis_adjacency.h isisd: kill isis_memory.h, use MTYPE_STATIC 2021-03-22 18:27:58 +01:00
isis_bfd.c Merge pull request #8121 from opensourcerouting/macro-cleanup 2021-03-22 11:00:34 +02:00
isis_bfd.h *: add BFD profile support for IS-IS 2020-07-10 11:28:43 +00:00
isis_bpf.c isisd: Remove #if 0 code 2021-01-28 13:45:44 -05:00
isis_circuit.c isisd: kill isis_memory.h, use MTYPE_STATIC 2021-03-22 18:27:58 +01:00
isis_circuit.h *: require semicolon after DEFINE_QOBJ & co. 2021-03-17 06:18:37 +01:00
isis_cli.c isisd: fix extra space after "ip router isis" 2021-03-24 10:30:36 +03:00
isis_common.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
isis_constants.h isisd: Fix Attach-bit processing 2021-01-20 09:24:35 -05:00
isis_csm.c isisd: Always set circuit->isis on creation 2020-10-09 08:14:00 -04:00
isis_csm.h *: reindent 2017-07-17 14:04:07 +02:00
isis_dlpi.c isisd: Remove #if 0 code 2021-01-28 13:45:44 -05:00
isis_dr.c isisd: support for snmp 2021-03-02 10:06:31 -05:00
isis_dr.h isisd: reduce code duplication for levels 2018-12-04 12:49:25 +01:00
isis_dynhn.c isisd: kill isis_memory.h, use MTYPE_STATIC 2021-03-22 18:27:58 +01:00
isis_dynhn.h isisd: support for snmp 2021-03-02 10:06:31 -05:00
isis_errors.c isisd: detect Prefix-SID collisions and handle them appropriately 2020-11-04 17:12:30 -03:00
isis_errors.h isisd: detect Prefix-SID collisions and handle them appropriately 2020-11-04 17:12:30 -03:00
isis_events.c *: unify thread/event cancel macros 2020-10-23 12:16:52 -04:00
isis_events.h isisd: Replace isis_event_adjacency_state_change with a hook 2018-10-05 14:05:28 +02:00
isis_flags.c *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
isis_flags.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
isis_ldp_sync.c isisd: Prevent sending of uninited data to zebra 2021-01-30 14:15:54 -05:00
isis_ldp_sync.h ldpd, isisd, ospfd: Remove periodic ldp-sync hello message 2020-12-09 14:11:38 -05:00
isis_lfa.c isisd: kill isis_memory.h, use MTYPE_STATIC 2021-03-22 18:27:58 +01:00
isis_lfa.h isisd: kill isis_memory.h, use MTYPE_STATIC 2021-03-22 18:27:58 +01:00
isis_lsp.c isisd: kill isis_memory.h, use MTYPE_STATIC 2021-03-22 18:27:58 +01:00
isis_lsp.h *: require semicolon after DEFINE_<typesafe...> 2021-03-17 06:18:39 +01:00
isis_main.c *: require semicolon after FRR_DAEMON_INFO & co. 2021-03-17 06:18:39 +01:00
isis_misc.c *: remove more sprintf() 2021-02-09 15:40:40 -05:00
isis_misc.h isisd: minor cleanup 2020-08-26 20:16:19 -03:00
isis_mt.c isisd: kill isis_memory.h, use MTYPE_STATIC 2021-03-22 18:27:58 +01:00
isis_mt.h *: use the current project name (FRRouting) 2020-03-25 17:38:56 -04:00
isis_nb_config.c Merge pull request #8250 from idryzhov/fix-nb-running-get-entry 2021-03-24 19:39:09 -03:00
isis_nb_notifications.c isisd: support for snmp 2021-03-02 10:06:31 -05:00
isis_nb_state.c isisd, yang: move IS-IS interface state data to the appropriate place 2020-05-15 23:47:43 -03:00
isis_nb.c isisd, yang, doc: combine config cmd for SRGB+SRLB 2021-03-10 11:02:30 +01:00
isis_nb.h Merge pull request #7945 from volta-networks/feat_isis_snmp 2021-03-14 22:14:27 -03:00
isis_network.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
isis_pdu_counter.c Minor adjustments to address CI warnings 2018-12-12 00:23:23 +00:00
isis_pdu_counter.h isisd: Provide statistics about sent/received PDU count 2018-12-07 19:45:14 +00:00
isis_pdu.c isisd: support for snmp 2021-03-02 10:06:31 -05:00
isis_pdu.h isisd: Add debug output for tx-queues 2018-12-07 19:45:14 +00:00
isis_pfpacket.c *: un-split strings across lines 2020-07-14 10:37:25 +02:00
isis_redist.c isisd: kill isis_memory.h, use MTYPE_STATIC 2021-03-22 18:27:58 +01:00
isis_redist.h isisd: added support for routemap match tag in redistribution 2021-03-05 22:12:00 +00:00
isis_route.c isisd: kill isis_memory.h, use MTYPE_STATIC 2021-03-22 18:27:58 +01:00
isis_route.h *: require semicolon after DEFINE_HOOK & co. 2021-03-17 06:18:17 +01:00
isis_routemap.c isisd: added support for routemap match tag in redistribution 2021-03-05 22:12:00 +00:00
isis_routemap.h *: reindent 2017-07-17 14:04:07 +02:00
isis_snmp.c *: require semicolon after FRR_DAEMON_INFO & co. 2021-03-17 06:18:39 +01:00
isis_spf_private.h isisd: kill isis_memory.h, use MTYPE_STATIC 2021-03-22 18:27:58 +01:00
isis_spf.c isisd: kill isis_memory.h, use MTYPE_STATIC 2021-03-22 18:27:58 +01:00
isis_spf.h isisd: implement Remote LFA 2021-01-08 22:22:11 -03:00
isis_sr.c *: require semicolon after DEFINE_<typesafe...> 2021-03-17 06:18:39 +01:00
isis_sr.h *: require semicolon after DEFINE_<typesafe...> 2021-03-17 06:18:39 +01:00
isis_te.c isisd: replace inet_ntoa 2020-10-22 16:25:41 -04:00
isis_te.h isisd: Update TLVs processing for TE, RI & SR 2019-09-17 17:35:50 +02:00
isis_tlvs.c isisd: Prevent OOM crash in isis 2021-03-25 09:11:28 -04:00
isis_tlvs.h *: require semicolon after DEFINE_MTYPE & co 2021-03-17 06:18:17 +01:00
isis_tx_queue.c isisd: kill isis_memory.h, use MTYPE_STATIC 2021-03-22 18:27:58 +01:00
isis_tx_queue.h *: use the current project name (FRRouting) 2020-03-25 17:38:56 -04:00
isis_vty_fabricd.c *: remove more sprintf() 2021-02-09 15:40:40 -05:00
isis_zebra.c isisd: added support for routemap match tag in redistribution 2021-03-05 22:12:00 +00:00
isis_zebra.h isisd: implement Remote LFA 2021-01-08 22:22:11 -03:00
isisd.c isisd: kill isis_memory.h, use MTYPE_STATIC 2021-03-22 18:27:58 +01:00
isisd.conf.sample Isisd is now able to remove addresses from circuit and trigger LSP updates 2004-09-14 13:54:30 +00:00
isisd.h isisd: kill isis_memory.h, use MTYPE_STATIC 2021-03-22 18:27:58 +01:00
iso_checksum.c *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
iso_checksum.h *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
Makefile build: non-recursive isisd 2017-08-04 11:09:50 +02:00
README More cleanup in isisd. 2005-01-01 21:12:56 +00:00
subdir.am isisd: kill isis_memory.h, use MTYPE_STATIC 2021-03-22 18:27:58 +01:00

Constraints

  o Maximum number of interfaces 255