Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758504AbbLCEkO (ORCPT ); Wed, 2 Dec 2015 23:40:14 -0500 Received: from shards.monkeyblade.net ([149.20.54.216]:58959 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758209AbbLCEkL (ORCPT ); Wed, 2 Dec 2015 23:40:11 -0500 Date: Wed, 02 Dec 2015 23:40:08 -0500 (EST) Message-Id: <20151202.234008.2105465549392712497.davem@davemloft.net> To: marcelo.leitner@gmail.com Cc: netdev@vger.kernel.org, linux-sctp@vger.kernel.org, vyasevich@gmail.com, nhorman@tuxdriver.com, daniel@iogearbox.net, linux-kernel@vger.kernel.org, syzkaller@googlegroups.com, dvyukov@google.com, kcc@google.com, glider@google.com, sasha.levin@oracle.com, edumazet@google.com Subject: Re: [PATCH] sctp: use GFP_USER for user-controlled kmalloc From: David Miller In-Reply-To: References: X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 02 Dec 2015 20:40:11 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 883 Lines: 20 From: Marcelo Ricardo Leitner Date: Mon, 30 Nov 2015 14:32:54 -0200 > Dmitry Vyukov reported that the user could trigger a kernel warning by > using a large len value for getsockopt SCTP_GET_LOCAL_ADDRS, as that > value directly affects the value used as a kmalloc() parameter. > > This patch thus switches the allocation flags from all user-controllable > kmalloc size to GFP_USER to put some more restrictions on it and also > disables the warn, as they are not necessary. > > Signed-off-by: Marcelo Ricardo Leitner > Acked-by: Daniel Borkmann Applied. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/