Fix for ipv6_setsockopt NULL dereference
Subsystems (2)
I came across this bug in http://bugzilla.kernel.org/show_bug.cgi?id=8155
Here's a potential fix.
Olaf
Signature · 24 lines
Olaf Kirch | --- o --- Nous sommes du soleil we love when we play [email protected] | / | \ sol.dhoop.naytheet.ah kin.ir.samse.qurax -- Fix NULL pointer derefence in ipv6_setsockopt, as described in bug #8155. Signed-off-by: [email protected] --- net/ipv6/ipv6_sockglue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: build-2.6/net/ipv6/ipv6_sockglue.c =================================================================== --- build-2.6.orig/net/ipv6/ipv6_sockglue.c +++ build-2.6/net/ipv6/ipv6_sockglue.c @@ -413,7 +413,7 @@ static int do_ipv6_setsockopt(struct soc } /* 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; switch (rthdr->type) { case IPV6_SRCRT_TYPE_0:
YOSHIFUJI Hideaki / 吉藤英明
Acked-byIn article <[email protected]> (at Fri, 9 Mar 2007 15:15:54 +0100), Olaf Kirch <[email protected]> says:
Quoted 1 line
I came across this bug in http://bugzilla.kernel.org/show_bug.cgi?id=8155
:
Quoted 3 lines
Fix NULL pointer derefence in
ipv6_setsockopt, as described in bug #8155.Signed-off-by [email protected]
I also ack to push this to -stable.
--yoshfuji
From: Olaf Kirch <[email protected]>
Date: Fri, 9 Mar 2007 15:15:54 +0100
Quoted 12 lines
I came across this bug in http://bugzilla.kernel.org/show_bug.cgi?id=8155
Here's a potential fix.
Olaf
Signature · 6 lines
Olaf Kirch | --- o --- Nous sommes du soleil we love when we play [email protected] | / | \ sol.dhoop.naytheet.ah kin.ir.samse.qurax -- Fix NULL pointer derefence in ipv6_setsockopt, as described in bug #8155. Signed-off-by: [email protected]
Applied, thanks a lot Olaf.
I'll push this to -stable too.
David Miller
maintainerFrom: YOSHIFUJI Hideaki / 吉藤英明 <[email protected]>
Date: Fri, 09 Mar 2007 23:40:25 +0900 (JST)
Quoted 11 lines
In article <[email protected]> (at Fri, 9 Mar 2007 15:15:54 +0100), Olaf Kirch <[email protected]> says:
Quoted 1 line
I came across this bug in http://bugzilla.kernel.org/show_bug.cgi?id=8155
:
Quoted 3 lines
Fix NULL pointer derefence in
ipv6_setsockopt, as described in bug #8155.Signed-off-by [email protected]I also ack to push this to -stable.
Thank you for reviewing.