From patchwork Mon Jan 23 16:47:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Whitcroft X-Patchwork-Id: 137421 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 6AEDD1007D4 for ; Tue, 24 Jan 2012 03:47:32 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1RpN3C-0004NT-A6; Mon, 23 Jan 2012 16:47:22 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1RpN3A-0004Ms-BH for kernel-team@lists.ubuntu.com; Mon, 23 Jan 2012 16:47:20 +0000 Received: from [85.210.149.110] (helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1RpN3A-0001aU-6g; Mon, 23 Jan 2012 16:47:20 +0000 From: Andy Whitcroft To: kernel-team@lists.ubuntu.com Subject: [natty, natty/ti-omap4 CVE 1/1] igmp: Avoid zero delay when receiving odd mixture of IGMP queries Date: Mon, 23 Jan 2012 16:47:17 +0000 Message-Id: <1327337237-3710-2-git-send-email-apw@canonical.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1327337237-3710-1-git-send-email-apw@canonical.com> References: <1327337237-3710-1-git-send-email-apw@canonical.com> Cc: Andy Whitcroft X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com From: Ben Hutchings 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 References: http://bugs.debian.org/654876 Signed-off-by: Ben Hutchings Signed-off-by: David S. Miller (cherry picked from commit a8c1f65c79cbbb2f7da782d4c9d15639a9b94b27) CVE-2012-0207 BugLink: http://bugs.launchpad.net/bugs/917848 Signed-off-by: Andy Whitcroft --- 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 d9d5130..f574cf6 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c @@ -892,6 +892,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;