Skip to contentSkip to conversation

ip6t_SYNPROXY crashes kernel

DISCUSSION Phil Sutter 2 participants 2 messages Jul 27, 2015 – Aug 1, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 6 lines · Phil Sutter

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:

Quoted 7 lines

| 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.