[kernel] r19843 - in dists/trunk/linux/debian: . patches patches/bugfix/all
Ben Hutchings
benh at alioth.debian.org
Sun Feb 24 00:22:13 UTC 2013
Author: benh
Date: Sun Feb 24 00:22:13 2013
New Revision: 19843
Log:
sock_diag: Fix out-of-bounds access to sock_diag_handlers[]
Added:
dists/trunk/linux/debian/patches/bugfix/all/sock_diag-Fix-out-of-bounds-access-to-sock_diag_hand.patch
Modified:
dists/trunk/linux/debian/changelog
dists/trunk/linux/debian/patches/series
Modified: dists/trunk/linux/debian/changelog
==============================================================================
--- dists/trunk/linux/debian/changelog Sun Feb 24 00:21:24 2013 (r19842)
+++ dists/trunk/linux/debian/changelog Sun Feb 24 00:22:13 2013 (r19843)
@@ -6,6 +6,7 @@
[ Ben Hutchings ]
* aufs: Update to aufs3.x-rcN-20130204
+ * sock_diag: Fix out-of-bounds access to sock_diag_handlers[]
-- Ben Hutchings <ben at decadent.org.uk> Tue, 19 Feb 2013 05:46:20 +0000
Added: dists/trunk/linux/debian/patches/bugfix/all/sock_diag-Fix-out-of-bounds-access-to-sock_diag_hand.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/trunk/linux/debian/patches/bugfix/all/sock_diag-Fix-out-of-bounds-access-to-sock_diag_hand.patch Sun Feb 24 00:22:13 2013 (r19843)
@@ -0,0 +1,33 @@
+From: Mathias Krause <minipli at googlemail.com>
+Date: Sat, 23 Feb 2013 01:13:47 +0000
+Subject: sock_diag: Fix out-of-bounds access to sock_diag_handlers[]
+
+commit 6e601a53566d84e1ffd25e7b6fe0b6894ffd79c0 upstream.
+
+Userland can send a netlink message requesting SOCK_DIAG_BY_FAMILY
+with a family greater or equal then AF_MAX -- the array size of
+sock_diag_handlers[]. The current code does not test for this
+condition therefore is vulnerable to an out-of-bound access opening
+doors for a privilege escalation.
+
+Signed-off-by: Mathias Krause <minipli at googlemail.com>
+Acked-by: Eric Dumazet <edumazet at google.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ net/core/sock_diag.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/net/core/sock_diag.c b/net/core/sock_diag.c
+index 602cd63..750f44f 100644
+--- a/net/core/sock_diag.c
++++ b/net/core/sock_diag.c
+@@ -121,6 +121,9 @@ static int __sock_diag_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
+ if (nlmsg_len(nlh) < sizeof(*req))
+ return -EINVAL;
+
++ if (req->sdiag_family >= AF_MAX)
++ return -EINVAL;
++
+ hndl = sock_diag_lock_handler(req->sdiag_family);
+ if (hndl == NULL)
+ err = -ENOENT;
Modified: dists/trunk/linux/debian/patches/series
==============================================================================
--- dists/trunk/linux/debian/patches/series Sun Feb 24 00:21:24 2013 (r19842)
+++ dists/trunk/linux/debian/patches/series Sun Feb 24 00:22:13 2013 (r19843)
@@ -64,3 +64,4 @@
bugfix/all/ath6kl-do-not-use-virt_addr_valid.patch
features/all/xen/microcode-api-update.patch
+bugfix/all/sock_diag-Fix-out-of-bounds-access-to-sock_diag_hand.patch
More information about the Kernel-svn-changes
mailing list