From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] sctp: frag_point sanity check Date: Wed, 05 Dec 2018 20:16:15 -0800 (PST) Message-ID: <20181205.201615.2105941098946347576.davem@davemloft.net> References: <20181204192741.35357-1-jakub.audykowicz@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: linux-sctp@vger.kernel.org, vyasevich@gmail.com, nhorman@tuxdriver.com, marcelo.leitner@gmail.com, netdev@vger.kernel.org To: jakub.audykowicz@gmail.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:51656 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727695AbeLFEQQ (ORCPT ); Wed, 5 Dec 2018 23:16:16 -0500 In-Reply-To: <20181204192741.35357-1-jakub.audykowicz@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Jakub Audykowicz Date: Tue, 4 Dec 2018 20:27:41 +0100 > If for some reason an association's fragmentation point is zero, > sctp_datamsg_from_user will try to endlessly try to divide a message > into zero-sized chunks. This eventually causes kernel panic due to > running out of memory. > > Although this situation is quite unlikely, it has occurred before as > reported. I propose to add this simple last-ditch sanity check due to > the severity of the potential consequences. > > Signed-off-by: Jakub Audykowicz Applied.