From: Daniel Borkmann <dborkman@xxxxxxxxxx> Date: Mon, 10 Nov 2014 17:54:26 +0100 > An SCTP server doing ASCONF will panic on malformed INIT ping-of-death > in the form of: > > ------------ INIT[PARAM: SET_PRIMARY_IP] ------------> > > While the INIT chunk parameter verification dissects through many things > in order to detect malformed input, it misses to actually check parameters > inside of parameters. E.g. RFC5061, section 4.2.4 proposes a 'set primary > IP address' parameter in ASCONF, which has as a subparameter an address > parameter. > > So an attacker may send a parameter type other than SCTP_PARAM_IPV4_ADDRESS > or SCTP_PARAM_IPV6_ADDRESS, param_type2af() will subsequently return 0 > and thus sctp_get_af_specific() returns NULL, too, which we then happily > dereference unconditionally through af->from_addr_param(). > > The trace for the log: ... > A minimal way to address this is to check for NULL as we do on all > other such occasions where we know sctp_get_af_specific() could > possibly return with NULL. > > Fixes: d6de3097592b ("[SCTP]: Add the handling of "Set Primary IP Address" parameter to INIT") > Signed-off-by: Daniel Borkmann <dborkman@xxxxxxxxxx> > Cc: Vlad Yasevich <vyasevich@xxxxxxxxx> Applied and queued up for -stable. -- To unsubscribe from this list: send the line "unsubscribe linux-sctp" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html