From patchwork Mon Jul 11 14:20:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Pisati X-Patchwork-Id: 104222 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 C64EEB6F6F for ; Tue, 12 Jul 2011 00:20:46 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1QgHLg-0007SC-5F; Mon, 11 Jul 2011 14:20:36 +0000 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1QgHLc-0007Oi-Gc for kernel-team@lists.ubuntu.com; Mon, 11 Jul 2011 14:20:32 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1QgHLc-00038S-BT for ; Mon, 11 Jul 2011 14:20:32 +0000 Received: from dynamic-adsl-94-36-117-159.clienti.tiscali.it ([94.36.117.159] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1QgHLc-0004fs-6b for kernel-team@lists.ubuntu.com; Mon, 11 Jul 2011 14:20:32 +0000 From: Paolo Pisati To: kernel-team@lists.ubuntu.com Subject: [PATCH 07/11] llc: use limited socket backlog CVE-2010-4251 Date: Mon, 11 Jul 2011 16:20:16 +0200 Message-Id: <1310394020-4846-8-git-send-email-paolo.pisati@canonical.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1310394020-4846-1-git-send-email-paolo.pisati@canonical.com> References: <1310394020-4846-1-git-send-email-paolo.pisati@canonical.com> 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: Zhu Yi BugLink: http://bugs.launchpad.net/bugs/807462 Make llc adapt to the limited socket backlog change. Cc: Arnaldo Carvalho de Melo Signed-off-by: Zhu Yi Acked-by: Eric Dumazet Acked-by: Arnaldo Carvalho de Melo Signed-off-by: David S. Miller (cherry picked from commit 79545b681961d7001c1f4c3eb9ffb87bed4485db) Signed-off-by: Paolo Pisati --- net/llc/llc_conn.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/net/llc/llc_conn.c b/net/llc/llc_conn.c index c6bab39..8f97546 100644 --- a/net/llc/llc_conn.c +++ b/net/llc/llc_conn.c @@ -756,7 +756,8 @@ void llc_conn_handler(struct llc_sap *sap, struct sk_buff *skb) else { dprintk("%s: adding to backlog...\n", __func__); llc_set_backlog_type(skb, LLC_PACKET); - sk_add_backlog(sk, skb); + if (sk_add_backlog_limited(sk, skb)) + goto drop_unlock; } out: bh_unlock_sock(sk);