From: Olaf Kirch <olaf.kirch@oracle.com>
To: netdev@vger.kernel.org
Subject: Fix for ipv6_setsockopt NULL dereference
Date: Fri, 9 Mar 2007 15:15:54 +0100 [thread overview]
Message-ID: <200703091515.55985.olaf.kirch@oracle.com> (raw)
In-Reply-To: <200703091207.31877.olaf.kirch@oracle.com>
I came across this bug in http://bugzilla.kernel.org/show_bug.cgi?id=8155
Here's a potential fix.
Olaf
--
Olaf Kirch | --- o --- Nous sommes du soleil we love when we play
okir@lst.de | / | \ sol.dhoop.naytheet.ah kin.ir.samse.qurax
--
Fix NULL pointer derefence in ipv6_setsockopt, as described in bug #8155.
Signed-off-by: olaf.kirch@oracle.com
---
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:
next parent reply other threads:[~2007-03-09 14:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200703091207.31877.olaf.kirch@oracle.com>
2007-03-09 14:15 ` Olaf Kirch [this message]
2007-03-09 14:40 ` Fix for ipv6_setsockopt NULL dereference YOSHIFUJI Hideaki / 吉藤英明
2007-03-09 21:56 ` David Miller
2007-03-09 21:54 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200703091515.55985.olaf.kirch@oracle.com \
--to=olaf.kirch@oracle.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox