All of lore.kernel.org
 help / color / mirror / Atom feed
* ip6t_SYNPROXY crashes kernel
@ 2015-07-27 22:27 Phil Sutter
  2015-08-01 12:54 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Phil Sutter @ 2015-07-27 22:27 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: pablo, netdev

Hi,

When synproxy_send_server_ack() calls synproxy_send_tcp(), it passes
NULL as third parameter (struct nf_conntrack *nfct). And the first thing
synproxy_send_tcp() does, is dereference it:

| struct net *net = nf_ct_net((struct nf_conn *)nfct);

I could not find a commit leading to this breakage in the commit log,
which makes me doubt ip6t_SYNPROXY has ever worked at all.

If you need one, I have a reproducer at hand. (Though I would want to
strip it down a bit first.) Just let me know.

Cheers, Phil

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: ip6t_SYNPROXY crashes kernel
  2015-07-27 22:27 ip6t_SYNPROXY crashes kernel Phil Sutter
@ 2015-08-01 12:54 ` Patrick McHardy
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2015-08-01 12:54 UTC (permalink / raw)
  To: pablo, netdev

On 28.07, Phil Sutter wrote:
> Hi,
> 
> When synproxy_send_server_ack() calls synproxy_send_tcp(), it passes
> NULL as third parameter (struct nf_conntrack *nfct). And the first thing
> synproxy_send_tcp() does, is dereference it:
> 
> | struct net *net = nf_ct_net((struct nf_conn *)nfct);
> 
> I could not find a commit leading to this breakage in the commit log,
> which makes me doubt ip6t_SYNPROXY has ever worked at all.
> 
> If you need one, I have a reproducer at hand. (Though I would want to
> strip it down a bit first.) Just let me know.

Thanks, looks like I never tested this with netns enabled. Would you
care to provide a patch? An easy fix seems to be to pass the synproxy_net
struct to synproxy_send_tcp() and use nf_ct_net(snet->tmpl) instead.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-08-01 12:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-27 22:27 ip6t_SYNPROXY crashes kernel Phil Sutter
2015-08-01 12:54 ` Patrick McHardy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.