From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757392AbYHRSz7 (ORCPT ); Mon, 18 Aug 2008 14:55:59 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756344AbYHRSyj (ORCPT ); Mon, 18 Aug 2008 14:54:39 -0400 Received: from ns2.suse.de ([195.135.220.15]:35726 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754838AbYHRSyh (ORCPT ); Mon, 18 Aug 2008 14:54:37 -0400 Date: Mon, 18 Aug 2008 11:43:21 -0700 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , Willy Tarreau , Rodrigo Rubira Branco , Jake Edge , Eugene Teo , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Eugene Teo , Arnaldo Carvalho de Melo , Gerrit Renker , "David S. Miller" Subject: [patch 24/60] dccp: change L/R must have at least one byte in the dccpsf_val field Message-ID: <20080818184321.GY29394@suse.de> References: <20080818183230.966310219@mini.kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="dccp-change-l-r-must-have-at-least-one-byte-in-the-dccpsf_val-field.patch" In-Reply-To: <20080818184035.GA29394@suse.de> User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2.6.26-stable review patch. If anyone has any objections, please let us know. ------------------ From: Arnaldo Carvalho de Melo commit 3e8a0a559c66ee9e7468195691a56fefc3589740 upstream Thanks to Eugene Teo for reporting this problem. Signed-off-by: Eugene Teo Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Gerrit Renker Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/dccp/proto.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/net/dccp/proto.c +++ b/net/dccp/proto.c @@ -476,6 +476,11 @@ static int dccp_setsockopt_change(struct if (copy_from_user(&opt, optval, sizeof(opt))) return -EFAULT; + /* + * rfc4340: 6.1. Change Options + */ + if (opt.dccpsf_len < 1) + return -EINVAL; val = kmalloc(opt.dccpsf_len, GFP_KERNEL); if (!val) --