Skip to contentSkip to conversation

dccp: change L/R must have at least one byte in the dccpsf_val field

PATCH In review Arnaldo Carvalho de Melo 4 participants 5 messages Aug 13, 2008 – Aug 14, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dccp: change L/R must have at least one byte in the dccpsf_val field

Hi David, Gerrit,

Please consider applying.

- Arnaldo

dccp: change L/R must have at least one byte in the dccpsf_val field

Thanks to Eugene Teo for reporting this problem.

net/dccp/proto.c +5 -0
index b622d97..1ca3b26 100644
@@ -474,6 +474,11 @@ static int dccp_setsockopt_change(struct sock *sk, int type,
 
 	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)
#1 lore raw
Quoted 6 lines

dccp: change L/R must have at least one byte in the dccpsf_val field

Thanks to Eugene Teo for reporting this problem.

Dave, can you please apply -- this patch is for mainline only.

The dccp_setsockopt_change() function has been fully removed in the test tree (
http://eden-feed.erg.abdn.ac.uk/cgi-bin/gitweb.cgi?pÜcp_exp.git;a=commitdiff;hñb8d02c7cb03e22037e1590d04f9ec8ab2423eb),
due to problems it caused.

Will be in contact regarding this soon.

Gerrit

maintainer
#2 lore raw

From: [email protected]
Date: Wed, 13 Aug 2008 16:04:03 +0100 (BST)

Quoted 9 lines
Quoted 6 lines

dccp: change L/R must have at least one byte in the dccpsf_val field

Thanks to Eugene Teo for reporting this problem.

Dave, can you please apply -- this patch is for mainline only.

Applied and I'll queue this up for -stable too, thanks everyone.

maintainer
#4 lore raw

From: "Eugene Teo" <[email protected]>
Date: Thu, 14 Aug 2008 09:08:56 +0800

Quoted 8 lines
Quoted 6 lines · Arnaldo Carvalho de Melo

Hi David, Gerrit,

Please consider applying.

- Arnaldo

Quoted 7 lines
Quoted 5 lines

dccp: change L/R must have at least one byte in the dccpsf_val field

Thanks to Eugene Teo for reporting this problem.

Should be eugeneteo@ instead of eugenete. Thanks.

I'll fix this up for the -stable submission, this version is already in my net-2.6 tree and on the way to Linus.

Thanks.