mirror_frr/lib
Satheesh Kumar K 83f8a12b8e lib, pimd, zebra: Provide some insurance against reading bad stream data
This patch does two things:

1) Ensure the decoding of stream data between pim <-> zebra is properly
decoded and we don't read beyond the end of the stream.

2) In zebra when we are freeing memory alloced ensure that we
actually have memory to delete before we do so.

Ticket: CM-27055
Signed-off-by: Satheesh Kumar K <sathk@cumulusnetworks.com>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-03-06 16:03:59 -05:00
..
printf *: Remove parenthesis on return for constants 2020-02-09 14:21:56 +02:00
.gitignore *: cleanup .gitignore files 2018-09-08 21:30:42 +02:00
agentx.c lib: Test return of fcntl in agentx.c 2020-02-04 08:10:52 -05:00
agg_table.c lib: make some variables static 2019-12-13 06:22:34 +01:00
agg_table.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
atomlist.c lib: atomlist & atomsort 2019-04-27 19:33:39 +02:00
atomlist.h lib: Impelement the *_del list API. 2019-07-31 11:35:21 -04:00
bfd.c Merge pull request #5916 from mjstapp/fix_gmtime 2020-03-05 17:38:13 -05:00
bfd.h bfdd: Handling local and remote admin-down 2019-10-28 21:38:20 -07:00
bitfield.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
buffer.c lib: random unused bits cleanup 2019-12-14 12:41:19 +01:00
buffer.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
checksum.c lib: add internet checksum with pseudoheaders 2019-05-17 00:27:08 +00:00
checksum.h lib: add internet checksum with pseudoheaders 2019-05-17 00:27:08 +00:00
clippy.c lib/clippy: error out on unsupported bits 2019-06-12 19:22:59 +02:00
clippy.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
command_graph.c *: fix ctype (isalpha & co.) casts 2019-08-06 16:54:52 +02:00
command_graph.h lib: make cmd_element & qobj_type const 2019-11-30 00:38:32 +01:00
command_lex.l lib: make some variables static 2019-12-13 06:22:34 +01:00
command_match.c lib: reject leading 0 in ipv4 decimal quad 2019-10-07 15:36:39 +00:00
command_match.h lib: rename enum to avoid conflict 2019-02-11 22:34:12 -02:00
command_parse.y lib: make cmd_element & qobj_type const 2019-11-30 00:38:32 +01:00
command_py.c *: config.h or zebra.h is the first #include 2019-06-13 13:35:33 +02:00
command.c *: remove null check before XFREE 2020-02-04 13:19:37 -05:00
command.h bgpd: Adding BGP GR Global & Per Neighbour FSM changes 2020-01-23 09:34:25 +05:30
compiler.h lib: add some macro helpers 2019-09-03 17:15:17 +02:00
csv.c *: Remove parenthesis on return for constants 2020-02-09 14:21:56 +02:00
csv.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
db.c lib: introduce new northbound API 2018-10-27 16:16:12 -02:00
db.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
debug.c lib: Separate out the debug_init api 2019-05-28 17:16:16 -04:00
debug.h lib: Separate out the debug_init api 2019-05-28 17:16:16 -04:00
defaults.c lib/defaults: add bool variable support 2019-12-06 15:13:32 +01:00
defaults.h ospfd: use new defaults mechanism (v2) 2019-12-06 15:13:32 +01:00
defun_lex.l lib/clippy: error out on unsupported bits 2019-06-12 19:22:59 +02:00
distribute.c *: don't null after XFREE; XFREE does this itself 2020-02-03 11:22:13 -05:00
distribute.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
ferr.c lib: add frr_with_mutex() block-wrapper 2019-09-03 17:15:17 +02:00
ferr.h vtysh: only show error codes once 2019-07-29 17:18:18 +00:00
filter.c lib: Cleanup set but unused variables 2020-02-27 09:41:58 -05:00
filter.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
freebsd-queue.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
frr_pthread.c *: generously apply const 2019-12-02 15:01:29 +01:00
frr_pthread.h *: generously apply const 2019-12-02 15:01:29 +01:00
frr_zmq.c *: Use true/false instead of 1/0 when assigning variable for bool type 2020-03-04 18:49:36 +02:00
frr_zmq.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
frratomic.h lib: add cmpxchg_strong to frratomic.h 2019-04-18 12:44:29 +02:00
frrcu.c lib: completely get rid of the MTYPE alias hack 2019-12-13 06:22:34 +01:00
frrcu.h lib: make rcu_free() NULL-safe 2019-12-13 06:22:34 +01:00
frrlua.c *: config.h or zebra.h is the first #include 2019-06-13 13:35:33 +02:00
frrlua.h build: fix Lua build 2019-05-10 16:08:32 +00:00
frrstr.c lib: Fix so that --enable-pcreposix actually compiles 2020-02-16 14:14:04 -05:00
frrstr.h lib: Fix so that --enable-pcreposix actually compiles 2020-02-16 14:14:04 -05:00
getopt1.c *: reindent 2017-07-17 14:04:07 +02:00
getopt.c Revert "*: reindent pt. 2" 2017-07-22 14:52:33 +02:00
getopt.h *: reindent 2017-07-17 14:04:07 +02:00
gitversion.pl build: fix auto git ID length 2020-01-17 15:54:50 +01:00
grammar_sandbox_main.c lib: rename memory_vty.c to lib_vty.c 2019-12-06 15:13:29 +01:00
grammar_sandbox.c lib: random unused bits cleanup 2019-12-14 12:41:19 +01:00
graph.c Treewide: use ANSI function definitions 2019-01-24 11:21:59 +01:00
graph.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
hash.c lib: add frr_with_mutex() block-wrapper 2019-09-03 17:15:17 +02:00
hash.h *: change hash_backet to hash_bucket 2020-02-28 13:59:13 -05:00
hook.c lib: flip to ISC on hook & module code 2018-12-14 16:24:06 +01:00
hook.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
iana_afi.h lib, bgpd: Create iana_afi.h for storing iana_afi/safi enums 2019-06-02 15:02:07 -04:00
id_alloc.c *: config.h or zebra.h is the first #include 2019-06-13 13:35:33 +02:00
id_alloc.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
if_rmap.c *: don't null after XFREE; XFREE does this itself 2020-02-03 11:22:13 -05:00
if_rmap.h eigrp, rip, ripng, lib: unlink if_rmap from vrf 2019-02-19 21:11:37 +01:00
if.c lib: Add vrf name to outputs/debugs 2020-02-14 08:41:42 -05:00
if.h lib, ospfd, zebra: Convert interface_delete to take double pointer 2019-11-02 16:13:44 -04:00
imsg-buffer.c *: Remove parenthesis on return for constants 2020-02-09 14:21:56 +02:00
imsg.c *: Remove parenthesis on return for constants 2020-02-09 14:21:56 +02:00
imsg.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
ipaddr.h lib: fix ipaddr_isset 2020-02-26 12:14:21 -05:00
jhash.c Revert "bgpd: Prevent IPv6 routes received via a ibgp session with own ip as nexthop " 2019-05-02 07:15:39 -04:00
jhash.h Revert "bgpd: Prevent IPv6 routes received via a ibgp session with own ip as nexthop " 2019-05-02 07:15:39 -04:00
json.c lib: require json-c 2019-10-11 16:16:37 +00:00
json.h lib: require json-c 2019-10-11 16:16:37 +00:00
keychain.c *: use gmtime_r, localtime_r exclusively 2020-03-05 13:26:16 -05:00
keychain.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
lib_errors.c lib: split off c-ares code from nhrpd 2019-07-03 17:15:34 +02:00
lib_errors.h lib: split off c-ares code from nhrpd 2019-07-03 17:15:34 +02:00
lib_vty.c lib: new defaults logic 2019-12-06 15:13:32 +01:00
lib_vty.h lib: rename memory_vty.c to lib_vty.c 2019-12-06 15:13:29 +01:00
libfrr.c *: Use true/false instead of 1/0 when assigning variable for bool type 2020-03-04 18:49:36 +02:00
libfrr.h *: make frr_yang_module_info const 2019-11-30 00:38:32 +01:00
libospf.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
linklist.c lib/linklist: flip the bitrot compost 2019-12-14 12:41:19 +01:00
linklist.h lib/linklist: flip the bitrot compost 2019-12-14 12:41:19 +01:00
log_int.h lib: move zlog() prototype back to the public logging API 2019-04-18 13:15:13 -03:00
log_vty.c lib: Remove extraneous spacing/output filter cmds 2019-06-19 17:20:24 -04:00
log_vty.h lib,vtysh: Add vtysh commands for log-filter 2019-06-19 17:20:24 -04:00
log.c *: use gmtime_r, localtime_r exclusively 2020-03-05 13:26:16 -05:00
log.h lib: Add log filter manipulation code 2019-06-19 17:20:24 -04:00
Makefile build: convert lib/ to non-recursive build 2017-07-31 23:03:27 +02:00
md5.c Treewide: use ANSI function definitions 2019-01-24 11:21:59 +01:00
md5.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
memory.c lib: MTYPE_PREFIX_FLOWSPEC should not be exposed by memory.h 2019-02-07 09:35:49 -05:00
memory.h lib: completely get rid of the MTYPE alias hack 2019-12-13 06:22:34 +01:00
mlag.c lib, pimd, zebra: Provide some insurance against reading bad stream data 2020-03-06 16:03:59 -05:00
mlag.h lib, pimd, zebra: Provide some insurance against reading bad stream data 2020-03-06 16:03:59 -05:00
module.c *: Use true/false instead of 1/0 when assigning variable for bool type 2020-03-04 18:49:36 +02:00
module.h lib/printf: rename & private __find_arguments 2019-06-03 16:44:32 +02:00
monotime.h lib: add monotime_to_realtime() 2019-08-30 19:00:45 +02:00
mpls.c lib, zebra: Move label conversion strings to lib 2018-04-18 07:06:11 -04:00
mpls.h isisd: Update TLVs processing for TE, RI & SR 2019-09-17 17:35:50 +02:00
netns_linux.c zebra, lib: Remove return from void functions 2020-02-04 20:05:21 +02:00
netns_other.c lib: make some variables static 2019-12-13 06:22:34 +01:00
network.c *: LIB_[ERR|WARN] -> EC_LIB 2018-09-13 19:34:28 +00:00
network.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
nexthop_group_private.h lib,zebra: use nhg_hash_entry pointer in route_entry 2019-12-04 08:13:52 -05:00
nexthop_group.c lib: use const in nexthop_group copy api 2020-02-25 08:26:38 -05:00
nexthop_group.h lib: use const in nexthop_group copy api 2020-02-25 08:26:38 -05:00
nexthop.c lib,zebra: tighten up the nexthop_copy/nexthop_dup APIs 2020-01-15 13:35:04 -05:00
nexthop.h lib,zebra: remove unused MATCHED nexthop flag 2020-02-11 15:56:35 -05:00
northbound_cli.c lib: new defaults logic 2019-12-06 15:13:32 +01:00
northbound_cli.h lib: avoid expensive operations when editing a candidate config 2019-10-11 21:18:36 -03:00
northbound_confd.c Revert "lib: introduce a read-write lock for northbound configurations" 2019-09-18 14:35:10 -03:00
northbound_db.c lib: introduce new northbound API 2018-10-27 16:16:12 -02:00
northbound_db.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
northbound_grpc.cpp lib: silence compiler warning in the gRPC plugin 2019-10-16 17:13:28 -03:00
northbound_sysrepo.c Revert "lib: introduce a read-write lock for northbound configurations" 2019-09-18 14:35:10 -03:00
northbound.c *: Use short version of bool expressions 2020-03-04 15:04:23 +02:00
northbound.h *: make frr_yang_module_info const 2019-11-30 00:38:32 +01:00
ns.h lib: make some variables static 2019-12-13 06:22:34 +01:00
ntop.c lib: drop DSO_SELF on inet_ntop 2019-06-13 00:05:03 +02:00
openbsd-queue.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
openbsd-tree.c *: Remove parenthesis on return for constants 2020-02-09 14:21:56 +02:00
openbsd-tree.h lib: Add const to openbsd-tree functions 2019-05-13 17:21:22 -07:00
pbr.h lib: Use ifindex_t for struct pbr_rule 2019-10-15 15:03:45 -04:00
pid_output.c lib: When we can't lock the pid file provide a meaningfull message 2018-09-22 14:18:52 -04:00
plist_int.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
plist.c *: Use true/false instead of 1/0 when assigning variable for bool type 2020-03-04 18:49:36 +02:00
plist.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
prefix.c Merge pull request #5806 from ton31337/fix/remove_break_after_return 2020-02-13 11:32:27 -05:00
prefix.h bgpd: RFC compliance wrt invalid RMAC, GWIP, ESI and VNI 2020-02-11 12:36:50 -08:00
printfrr.h *: generously apply const 2019-12-02 15:01:29 +01:00
privs.c lib: add frr_with_mutex() block-wrapper 2019-09-03 17:15:17 +02:00
privs.h *: frr_elevate_privs -> frr_with_privs 2019-09-03 17:18:35 +02:00
ptm_lib.c *: Replace __PRETTY_FUNCTION__/__FUNCTION__ to __func__ 2020-03-05 20:23:23 +02:00
ptm_lib.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
pullwr.c lib: add pull-driven data write handler 2019-08-30 19:00:45 +02:00
pullwr.h lib: add pull-driven data write handler 2019-08-30 19:00:45 +02:00
pw.h lib: a few more trivial changes for C++ compatibility 2019-02-11 22:34:12 -02:00
qobj.c lib: make cmd_element & qobj_type const 2019-11-30 00:38:32 +01:00
qobj.h lib: make cmd_element & qobj_type const 2019-11-30 00:38:32 +01:00
queue.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
resolver.c lib,nhrpd,bgpd/bmp: pass resolver failure details 2019-12-11 13:33:36 +01:00
resolver.h lib,nhrpd,bgpd/bmp: pass resolver failure details 2019-12-11 13:33:36 +01:00
ringbuf.c *: conform with COMMUNITY.md formatting rules, via 'make indent' 2018-03-06 14:04:32 -05:00
ringbuf.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
route_types.pl lib, zebra: Fix 'show ip route' char collision 2019-01-29 20:41:36 -05:00
route_types.txt zebra: Use a nhe context dataplane and rib metaq 2019-10-25 11:13:40 -04:00
routemap_cli.c lib: don't allow to recurse inside route-map node 2020-02-19 17:54:08 -03:00
routemap_northbound.c lib: do not test before XFREE 2020-02-19 17:06:44 -05:00
routemap.c *: Replace __PRETTY_FUNCTION__/__FUNCTION__ to __func__ 2020-03-05 20:23:23 +02:00
routemap.h lib: Optimizing route-maps - Part-3 2020-02-18 02:08:29 -08:00
sbuf.c lib: use snprintfrr() in "hidden" printfs 2019-06-12 19:35:43 +02:00
sbuf.h lib: make "%Ld" work for int64_t 2019-06-12 19:35:43 +02:00
seqlock.c *: Return bool type for bool functions 2020-03-04 15:05:22 +02:00
seqlock.h lib/seqlock: add a few more comments 2019-07-31 03:33:41 +02:00
sha256.c lib: Fix memset usage 2017-10-03 12:03:56 -04:00
sha256.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
sigevent.c lib: make SA_SIGINFO use unconditional 2019-07-31 03:33:41 +02:00
sigevent.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
skiplist.c lib: Cleanup set but unused variables 2020-02-27 09:41:58 -05:00
skiplist.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
smux.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
snmp.c *: use C99 standard fixed-width integer types 2018-03-27 15:13:34 -04:00
sockopt.c lib: Cleanup set but unused variables 2020-02-27 09:41:58 -05:00
sockopt.h lib: random unused bits cleanup 2019-12-14 12:41:19 +01:00
sockunion.c *: Remove break after return 2020-02-13 15:39:54 +02:00
sockunion.h bgpd, lib: Remove SO_MARK 2019-05-24 08:35:35 -04:00
spf_backoff.c lib: Remove default case statement from a enum driven switch 2018-08-23 08:36:07 -04:00
spf_backoff.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
srcdest_table.c lib: add some printfrr specifiers 2019-06-03 18:57:31 +02:00
srcdest_table.h lib: add some printfrr specifiers 2019-06-03 18:57:31 +02:00
srv6.c bgpd: prefix-sid srv6 l3vpn service tlv 2020-01-15 18:20:35 +09:00
srv6.h bgpd: prefix-sid srv6 l3vpn service tlv 2020-01-15 18:20:35 +09:00
stream.c lib: use const in several stream lib apis 2019-12-06 10:12:14 -05:00
stream.h lib: use const in several stream lib apis 2019-12-06 10:12:14 -05:00
strlcat.c *: fix config.h/zebra.h include order 2018-09-08 21:30:42 +02:00
strlcpy.c *: fix config.h/zebra.h include order 2018-09-08 21:30:42 +02:00
subdir.am yang/lib: add filter model to code 2020-02-04 14:05:43 -03:00
systemd.c lib: random unused bits cleanup 2019-12-14 12:41:19 +01:00
systemd.h lib: random unused bits cleanup 2019-12-14 12:41:19 +01:00
table.c lib: use MTYPE_STATIC 2019-06-21 08:54:25 +02:00
table.h *: generously apply const 2019-12-02 15:01:29 +01:00
termtable.c *: generously apply const 2019-12-02 15:01:29 +01:00
termtable.h *: generously apply const 2019-12-02 15:01:29 +01:00
thread.c *: generously apply const 2019-12-02 15:01:29 +01:00
thread.h lib: use DECLARE_HEAP for timers instead of pqueue 2019-08-01 16:59:29 +02:00
typerb.c *: Remove parenthesis on return for constants 2020-02-09 14:21:56 +02:00
typerb.h lib: Add const to _count() in new list APIs 2019-07-31 11:35:21 -04:00
typesafe.c *: strip trailing whitespace 2019-09-30 16:44:43 +00:00
typesafe.h lib: Add const to _count() in new list APIs 2019-07-31 11:35:21 -04:00
vector.c lib: add vector_compact(), use after str splits 2018-06-06 16:16:12 +00:00
vector.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
version.h.in lib: add cli preprocessor for | actions 2018-06-06 16:15:34 +00:00
vlan.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
vrf_int.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
vrf.c *: Replace __PRETTY_FUNCTION__/__FUNCTION__ to __func__ 2020-03-05 20:23:23 +02:00
vrf.h lib: Add a macro to allow for quick/easy display of vrf name 2020-02-14 08:15:40 -05:00
vty.c lib: Fix so that --enable-pcreposix actually compiles 2020-02-16 14:14:04 -05:00
vty.h lib: Fix so that --enable-pcreposix actually compiles 2020-02-16 14:14:04 -05:00
vxlan.h bgpd: suppress IMET route generation if flood mode is PIM-SM 2019-04-20 08:33:20 -07:00
wheel.c *: Finish off the __PRETTY_FUNCTION__ to __func__ 2020-03-06 09:23:22 -05:00
wheel.h lib: hashing functions should take const arguments 2019-05-14 21:23:08 +00:00
workqueue.c lib: Fix workqueue error function callback 2019-04-17 19:29:05 -04:00
workqueue.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
yang_translator.c lib: hashing functions should take const arguments 2019-05-14 21:23:08 +00:00
yang_translator.h lib: add extern "C" {} blocks to all libfrr headers 2019-02-11 22:34:12 -02:00
yang_wrappers.c lib: use prefix for yang get prefix wrapper 2019-10-11 22:41:17 -03:00
yang_wrappers.h lib: use prefix for yang get prefix wrapper 2019-10-11 22:41:17 -03:00
yang.c lib: fix build of the northbound plugins 2019-12-19 12:44:37 -03:00
yang.h lib: fix build of the northbound plugins 2019-12-19 12:44:37 -03:00
zassert.h *: Remove cvs control points 2017-12-05 17:28:12 -05:00
zclient.c *: Replace __PRETTY_FUNCTION__/__FUNCTION__ to __func__ 2020-03-05 20:23:23 +02:00
zclient.h *: encode zapi labels message using nexthops 2020-02-14 16:16:21 -05:00
zebra.h lib: add macro to check if value is valid afi 2020-01-22 14:12:15 -05:00