netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] igmp: Avoid zero delay when receiving odd mixture of IGMP queries
@ 2012-01-09 22:04 Ben Hutchings
  2012-01-09 22:07 ` David Miller
  2012-01-10  0:23 ` Ben Hutchings
  0 siblings, 2 replies; 3+ messages in thread
From: Ben Hutchings @ 2012-01-09 22:04 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Simon McVittie, 654876

Commit 5b7c84066733c5dfb0e4016d939757b38de189e4 ('ipv4: correct IGMP
behavior on v3 query during v2-compatibility mode') added yet another
case for query parsing, which can result in max_delay = 0.  Substitute
a value of 1, as in the usual v3 case.

Reported-by: Simon McVittie <smcv@debian.org>
References: http://bugs.debian.org/654876
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
 net/ipv4/igmp.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index d577199..e0d42db 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -875,6 +875,8 @@ static void igmp_heard_query(struct in_device *in_dev, struct sk_buff *skb,
 		 * to be intended in a v3 query.
 		 */
 		max_delay = IGMPV3_MRC(ih3->code)*(HZ/IGMP_TIMER_SCALE);
+		if (!max_delay)
+			max_delay = 1;	/* can't mod w/ 0 */
 	} else { /* v3 */
 		if (!pskb_may_pull(skb, sizeof(struct igmpv3_query)))
 			return;
-- 
1.7.8.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net] igmp: Avoid zero delay when receiving odd mixture of IGMP queries
  2012-01-09 22:04 [PATCH net] igmp: Avoid zero delay when receiving odd mixture of IGMP queries Ben Hutchings
@ 2012-01-09 22:07 ` David Miller
  2012-01-10  0:23 ` Ben Hutchings
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2012-01-09 22:07 UTC (permalink / raw)
  To: ben; +Cc: netdev, smcv, 654876

From: Ben Hutchings <ben@decadent.org.uk>
Date: Mon, 9 Jan 2012 22:04:28 +0000

> Commit 5b7c84066733c5dfb0e4016d939757b38de189e4 ('ipv4: correct IGMP
> behavior on v3 query during v2-compatibility mode') added yet another
> case for query parsing, which can result in max_delay = 0.  Substitute
> a value of 1, as in the usual v3 case.
> 
> Reported-by: Simon McVittie <smcv@debian.org>
> References: http://bugs.debian.org/654876
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

Applied and queued up for -stable, thanks Ben.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net] igmp: Avoid zero delay when receiving odd mixture of IGMP queries
  2012-01-09 22:04 [PATCH net] igmp: Avoid zero delay when receiving odd mixture of IGMP queries Ben Hutchings
  2012-01-09 22:07 ` David Miller
@ 2012-01-10  0:23 ` Ben Hutchings
  1 sibling, 0 replies; 3+ messages in thread
From: Ben Hutchings @ 2012-01-10  0:23 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Simon McVittie, 654876, security

[-- Attachment #1: Type: text/plain, Size: 1285 bytes --]

On Mon, 2012-01-09 at 22:04 +0000, Ben Hutchings wrote:
> Commit 5b7c84066733c5dfb0e4016d939757b38de189e4 ('ipv4: correct IGMP
> behavior on v3 query during v2-compatibility mode') added yet another
> case for query parsing, which can result in max_delay = 0.  Substitute
> a value of 1, as in the usual v3 case.

This has been assigned CVE-2012-0207.

Ben.

> Reported-by: Simon McVittie <smcv@debian.org>
> References: http://bugs.debian.org/654876
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> ---
>  net/ipv4/igmp.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
> index d577199..e0d42db 100644
> --- a/net/ipv4/igmp.c
> +++ b/net/ipv4/igmp.c
> @@ -875,6 +875,8 @@ static void igmp_heard_query(struct in_device *in_dev, struct sk_buff *skb,
>  		 * to be intended in a v3 query.
>  		 */
>  		max_delay = IGMPV3_MRC(ih3->code)*(HZ/IGMP_TIMER_SCALE);
> +		if (!max_delay)
> +			max_delay = 1;	/* can't mod w/ 0 */
>  	} else { /* v3 */
>  		if (!pskb_may_pull(skb, sizeof(struct igmpv3_query)))
>  			return;

-- 
Ben Hutchings
Life is what happens to you while you're busy making other plans.
                                                               - John Lennon

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-10  0:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-09 22:04 [PATCH net] igmp: Avoid zero delay when receiving odd mixture of IGMP queries Ben Hutchings
2012-01-09 22:07 ` David Miller
2012-01-10  0:23 ` Ben Hutchings

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).