Skip to content

Commit a9aeabd

Browse files
committed
daemon: fix read overflow when parsing CDP addresses
1 parent e1af9ac commit a9aeabd

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Diff for: NEWS

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
lldpd (1.0.17)
2+
* Fix:
3+
+ Read overflow when parsing CDP addresses. Thanks to Matteo Memelli.
4+
15
lldpd (1.0.16)
26
* Fix:
37
+ Do not use 00:00:00:00:00:00 as chassis ID.

Diff for: src/daemon/protocols/cdp.c

+1
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@ cdp_decode(struct lldpd *cfg, char *frame, int s, struct lldpd_hardware *hardwar
466466
goto malformed;
467467
}
468468
PEEK_DISCARD(address_len);
469+
addresses_len -= address_len;
469470
(void)PEEK_SAVE(pos_next_address);
470471
/* Next, we go back and try to extract
471472
IPv4 address */

0 commit comments

Comments
 (0)