blob: 3e2d3dcdb62e902f03e9b3ce0eeddaf71688e23e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
From: Olaf Kirch <olaf.kirch@oracle.com>
Date: Fri, 9 Mar 2007 21:55:38 +0000 (-0800)
Subject: [IPV6]: Fix for ipv6_setsockopt NULL dereference
X-Git-Tag: v2.6.21-rc4~50^2~1
X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=dfee0a725bb027b749ffdd318eb48b91d564b266
[IPV6]: Fix for ipv6_setsockopt NULL dereference
I came across this bug in http://bugzilla.kernel.org/show_bug.cgi?id=8155
Signed-off-by: Olaf Kirch <olaf.kirch@oracle.com>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
Adjusted to apply to Debian's 2.6.18 by dann frazier <dannf@debian.org>
--- source/net/ipv6/ipv6_sockglue.c.orig 2007-03-22 09:58:17.000000000 -0600
+++ source/net/ipv6/ipv6_sockglue.c 2007-03-22 09:59:22.000000000 -0600
@@ -408,7 +408,7 @@
}
/* routing header option needs extra check */
- if (optname == IPV6_RTHDR && opt->srcrt) {
+ if (optname == IPV6_RTHDR && opt && opt->srcrt) {
struct ipv6_rt_hdr *rthdr = opt->srcrt;
if (rthdr->type)
goto sticky_done;
|