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:	Thu, 15 Nov 2007 15:55:09 -0800 (PST)
From:	David Miller <davem@...emloft.net>
To:	johnpol@....mipt.ru
Cc:	cebbert@...hat.com, netfilter-devel@...r.kernel.org,
	kaber@...sh.net, netdev@...r.kernel.org
Subject: Re: Null pointer dereference in nf_nat_move_storage(), kernel
 2.6.23.1

From: Evgeniy Polyakov <johnpol@....mipt.ru>
Date: Thu, 15 Nov 2007 15:06:59 +0300

> Please test attached patch.
> 
> This routing is called each time hash should be replaced, nf_conn has
> extension list which contains pointers to connection tracking users
> (like nat, which is right now the only such user), so when replace takes
> place it should copy own extensions. Loop above checks for own
> extension, but tries to move higer-layer one, which can lead to above
> oops.
> 
> Not tested, derived from code observation only.
> 
> Signed-off-by: Evgeniy Polyakov <johnpol@....mipt.ru>

It looks extremely correct to me.  Therefore I'm going to apply
this and queue it up for -stable.

Thanks Evgeniy, keep up the excellent work!

Patrick, please let me know if you have any objections.

> diff --git a/net/netfilter/nf_conntrack_extend.c b/net/netfilter/nf_conntrack_extend.c
> index a1a65a1..cf6ba66 100644
> --- a/net/netfilter/nf_conntrack_extend.c
> +++ b/net/netfilter/nf_conntrack_extend.c
> @@ -109,7 +109,7 @@ void *__nf_ct_ext_add(struct nf_conn *ct, enum nf_ct_ext_id id, gfp_t gfp)
>  			rcu_read_lock();
>  			t = rcu_dereference(nf_ct_ext_types[i]);
>  			if (t && t->move)
> -				t->move(ct, ct->ext + ct->ext->offset[id]);
> +				t->move(ct, ct->ext + ct->ext->offset[i]);
>  			rcu_read_unlock();
>  		}
>  		kfree(ct->ext);
> 
-
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