]> git.pld-linux.org Git - packages/kernel.git/blame - kernel-CVE-2013-1763.patch
default make in topdir to first *.mk
[packages/kernel.git] / kernel-CVE-2013-1763.patch
CommitLineData
7b14a70e
JR
1Userland can send a netlink message requesting SOCK_DIAG_BY_FAMILY
2with a family greater or equal then AF_MAX -- the array size of
3sock_diag_handlers[]. The current code does not test for this
4condition therefore is vulnerable to an out-of-bound access opening
5doors for a privilege escalation.
6
7Signed-off-by: Mathias Krause <minipli@googlemail.com>
8---
9 net/core/sock_diag.c | 3 +++
10 1 file changed, 3 insertions(+)
11
12diff --git a/net/core/sock_diag.c b/net/core/sock_diag.c
13index 602cd63..750f44f 100644
14--- a/net/core/sock_diag.c
15+++ b/net/core/sock_diag.c
16@@ -121,6 +121,9 @@ static int __sock_diag_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
17 if (nlmsg_len(nlh) < sizeof(*req))
18 return -EINVAL;
19
20+ if (req->sdiag_family >= AF_MAX)
21+ return -EINVAL;
22+
23 hndl = sock_diag_lock_handler(req->sdiag_family);
24 if (hndl == NULL)
25 err = -ENOENT;
26--
271.7.10.4
28
29--
30To unsubscribe from this list: send the line "unsubscribe netdev" in
31the body of a message to majordomo@vger.kernel.org
32More majordomo info at http://vger.kernel.org/majordomo-info.html
This page took 0.828235 seconds and 4 git commands to generate.