asterisk/channels
Matthew Jordan 8fb5bdce9a Prevent exhaustion of system resources through exploitation of event cache
Asterisk maintains an internal cache for devices in the event subsystem. The
device state cache holds the state of each device known to Asterisk, such that
consumers of device state information can query for the last known state for
a particular device, even if it is not part of an active call. The concept of
a device in Asterisk can include entities that do not have a physical
representation. One way that this occurred was when anonymous calls are allowed
in Asterisk. A device was automatically created and stored in the cache for
each anonymous call that occurred; this was possible in the SIP and IAX2
channel drivers and through channel drivers that utilized the
res_jabber/res_xmpp resource modules (Gtalk, Jingle, and Motif). These devices
are never removed from the system, allowing anonymous calls to potentially
exhaust a system's resources.

This patch changes the event cache subsystem and device state management to
no longer cache devices that are not associated with a physical entity.

(issue ASTERISK-20175)
Reported by: Russell Bryant, Leif Madsen, Joshua Colp
Tested by: kmoore
patches:
  event-cachability-3.diff uploaded by jcolp (license 5000)
........

Merged revisions 378303 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 378320 from http://svn.asterisk.org/svn/asterisk/branches/10
........

Merged revisions 378321 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378322 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-02 18:11:59 +00:00
..
h323 Asterisk media architecture conversion - no more format bitfields 2011-02-03 16:22:10 +00:00
misdn chan_misdn: Fix sending RELEASE_COMPLETE in response to SETUP. 2012-11-30 21:38:01 +00:00
sip Resolve crashes due to large stack allocations when using TCP 2013-01-02 15:39:42 +00:00
Makefile Doxygen Updates - Title update 2012-10-14 21:47:40 +00:00
chan_agent.c Prevent exhaustion of system resources through exploitation of event cache 2013-01-02 18:11:59 +00:00
chan_alsa.c Doxygen Updates - Title update 2012-10-14 21:47:40 +00:00
chan_bridge.c Finalize ast_channel opaquification 2012-03-13 18:20:34 +00:00
chan_console.c Doxygen Updates - Title update 2012-10-14 21:47:40 +00:00
chan_dahdi.c Prevent exhaustion of system resources through exploitation of event cache 2013-01-02 18:11:59 +00:00
chan_gtalk.c Doxygen Updates - Title update 2012-10-14 21:47:40 +00:00
chan_h323.c Doxygen Updates - Title update 2012-10-14 21:47:40 +00:00
chan_iax2.c Prevent exhaustion of system resources through exploitation of event cache 2013-01-02 18:11:59 +00:00
chan_jingle.c Doxygen Updates - Title update 2012-10-14 21:47:40 +00:00
chan_local.c Prevent exhaustion of system resources through exploitation of event cache 2013-01-02 18:11:59 +00:00
chan_mgcp.c Make evaluation of channel variables consistently case-sensitive. 2012-10-29 21:27:09 +00:00
chan_misdn.c Things don't need to be that const. 2012-11-02 21:01:33 +00:00
chan_motif.c Add missing support for "who hung up" to chan_motif. 2012-12-09 01:23:44 +00:00
chan_multicast_rtp.c Opaquification for ast_format structs in struct ast_channel 2012-02-24 00:32:20 +00:00
chan_nbs.c Opaquification for ast_format structs in struct ast_channel 2012-02-24 00:32:20 +00:00
chan_oss.c Doxygen Updates - Title update 2012-10-14 21:47:40 +00:00
chan_phone.c Doxygen Updates - Title update 2012-10-14 21:47:40 +00:00
chan_phone.h rename DialTone.h to chan_phone.h because chan_phone.c is the only file using it 2008-05-28 20:00:21 +00:00
chan_sip.c Prevent exhaustion of system resources through exploitation of event cache 2013-01-02 18:11:59 +00:00
chan_skinny.c Prevent exhaustion of system resources through exploitation of event cache 2013-01-02 18:11:59 +00:00
chan_unistim.c Add firmware information to CLI devices listing 2012-12-10 07:03:48 +00:00
chan_vpb.cc Doxygen Updates - Title update 2012-10-14 21:47:40 +00:00
console_board.c Multiple revisions 369001-369002 2012-06-15 16:20:16 +00:00
console_gui.c Multiple revisions 369001-369002 2012-06-15 16:20:16 +00:00
console_video.c Multiple revisions 369001-369002 2012-06-15 16:20:16 +00:00
console_video.h implement the 'freeze' function for incoming frames; 2008-06-30 15:45:15 +00:00
iax2-parser.c Multiple revisions 369001-369002 2012-06-15 16:20:16 +00:00
iax2-parser.h Doxygen Updates - Title update 2012-10-14 21:47:40 +00:00
iax2-provision.c iax2-provision: Fix improper return on failed cache retrieval 2012-09-21 19:35:37 +00:00
iax2-provision.h Don't reload a configuration file if nothing has changed. 2007-08-16 21:09:46 +00:00
iax2.h Doxygen Updates - Title update 2012-10-14 21:47:40 +00:00
misdn_config.c Add named callgroups/pickupgroups 2012-08-07 12:46:36 +00:00
sig_analog.c Multiple revisions 375993-375994 2012-11-07 19:15:26 +00:00
sig_analog.h Convert sig_analog to use a global callback table. 2012-08-08 20:32:53 +00:00
sig_pri.c Multiple revisions 375993-375994 2012-11-07 19:15:26 +00:00
sig_pri.h Clean up doxygen warnings 2012-08-30 14:23:28 +00:00
sig_ss7.c chan_dahdi/SS7: Made reject incoming call for an in-alarm or blocked channel. 2012-11-08 21:12:35 +00:00
sig_ss7.h Convert sig_ss7 to use a global callback table. 2012-08-08 00:15:54 +00:00
vcodecs.c Multiple revisions 369001-369002 2012-06-15 16:20:16 +00:00
vgrabbers.c Multiple revisions 369001-369002 2012-06-15 16:20:16 +00:00