lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 10 Jul 2012 11:14:34 -0700
From:	Greg Rose <gregory.v.rose@...el.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
CC:	David Miller <davem@...emloft.net>, <ogerlitz@...lanox.com>,
	<netdev@...r.kernel.org>, <shlomop@...lanox.com>,
	<amirv@...lanox.com>, <erezsh@...lanox.com>
Subject: Re: net-next kernel NULL pointer dereference at fib_rules_tclass

On Tue, 10 Jul 2012 19:25:01 +0200
Eric Dumazet <eric.dumazet@...il.com> wrote:

> On Tue, 2012-07-10 at 09:44 -0700, David Miller wrote:
> > From: Or Gerlitz <ogerlitz@...lanox.com>
> > Date: Tue, 10 Jul 2012 10:16:55 +0300
> > 
> > > Starting system logger: BUG: unable to handle kernel NULL pointer
> > > dereference at 00000000000000ac IP: [<ffffffff81320393>]
> > > fib_rules_tclass+0xf/0x17
> > 
> > Ok, fib_rules_tclass() checks for res->r being NULL and only
> > dereferences it if it is not.
> > 
> > fib4_rule->tclassid has offset ~0x8c on x86-64, and this fault
> > address is 0x10 bytes off.
> > 
> > Does this patch fix the problem?
> > 
> > diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
> > index 539c672..000c467 100644
> > --- a/include/net/ip_fib.h
> > +++ b/include/net/ip_fib.h
> > @@ -230,6 +230,7 @@ static inline int fib_lookup(struct net *net,
> > struct flowi4 *flp, struct fib_result *res)
> >  {
> >  	if (!net->ipv4.fib_has_custom_rules) {
> > +		res->r = NULL;
> >  		if (net->ipv4.fib_local &&
> >  		    !fib_table_lookup(net->ipv4.fib_local, flp,
> > res, FIB_LOOKUP_NOREF))
> 
> It does here, thanks

Works for me too.

Thanks,

> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ