Patchwork [10/11] x25: use limited socket backlog CVE-2010-4251

login
register
mail settings
Submitter Paolo Pisati
Date July 11, 2011, 8:17 a.m.
Message ID <1310372268-3840-11-git-send-email-paolo.pisati@canonical.com>
Download mbox | patch
Permalink /patch/104181/
State New
Headers show

Comments

Paolo Pisati - July 11, 2011, 8:17 a.m.
From: Zhu Yi <yi.zhu@intel.com>

x25: use limited socket backlog

BugLink: http://bugs.launchpad.net/bugs/807462

commit upstream 2499849ee8f513e795b9f2c19a42d6356e4943a4

Make x25 adapt to the limited socket backlog change.

CVE-2010-4251

Cc: Andrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
---
 net/x25/x25_dev.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Patch

diff --git a/net/x25/x25_dev.c b/net/x25/x25_dev.c
index 3e1efe5..a9da0dc 100644
--- a/net/x25/x25_dev.c
+++ b/net/x25/x25_dev.c
@@ -53,7 +53,7 @@  static int x25_receive_data(struct sk_buff *skb, struct x25_neigh *nb)
 		if (!sock_owned_by_user(sk)) {
 			queued = x25_process_rx_frame(sk, skb);
 		} else {
-			sk_add_backlog(sk, skb);
+			queued = !sk_add_backlog_limited(sk, skb);
 		}
 		bh_unlock_sock(sk);
 		sock_put(sk);