Skip to contentSkip to conversation

serious problem with 2.4.24 combined with KVM switch (fwd)

Cybr.rdsw Harald Welte 3 participants 3 messages Feb 3, 2004 – Feb 5, 2004 3 messages not in the archive netfilter

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): 1075825496.23902.9.camel@tammuz

#3 lore raw
Quoted 6 lines · Oliver Kurth

Hi Harald,

Quoted 2 lines
Quoted 2 lines

We are having a problem with 2.4.24 on cyclades germany, the box (firewall) is crashing in the netfilter code.

Anything new about that problem? Do you need more information?

sorry, I lost that issue because I'm extremely overloaded at the moment.

It seems like it crashes in the following piece of code (from ip_conntrack_core.c)

        /* If the expectation is dying, then this is a looser. */
        if (expected
            && expected->expectant->helper->timeout
            && !del_timer(&expected->timeout))
                expected = NULL;

To be more precise, it cannot dereference helper->timeout, since helper is NULL. I am extremely puzzled how you would end up with a conntrack expectation (which can only be caused by a helper) that has not assigned a helper.

Could you please tell me, which conntrack and/or NAT helpers you were using on that machine?

We haven't had something like this before.

As a workaround, you could add an additional check into that piece of code. At least it won't oops anymore, although it is still unclear how you end up with this kind of situation.

if (expected

    && expected->expectant->helper
    && expected->expectant->helper->timeout
    && !del_timer(&expected->timeout))
        expected = NULL;
Quoted 2 lines

Greetings,
Oliver

Signature · 3 lines
- Harald Welte <[email protected]>               http://www.gnumonks.org/
============================================================================
Programming is like sex: One mistake and you have to support it your lifetime
#4 lore raw
Quoted 20 lines · Harald Welte
Quoted 6 lines · Oliver Kurth

Hi Harald,

Quoted 2 lines
Quoted 2 lines

We are having a problem with 2.4.24 on cyclades germany, the box (firewall) is crashing in the netfilter code.

Anything new about that problem? Do you need more information?

sorry, I lost that issue because I'm extremely overloaded at the moment.

It seems like it crashes in the following piece of code (from ip_conntrack_core.c)

        /* If the expectation is dying, then this is a looser. */
        if (expected
            && expected->expectant->helper->timeout
            && !del_timer(&expected->timeout))
                expected = NULL;
Quoted 4 lines

To be more precise, it cannot dereference helper->timeout, since helper is NULL. I am extremely puzzled how you would end up with a conntrack expectation (which can only be caused by a helper) that has not assigned a helper.

I looked over the code, and could not find anything either, but I am not familar with it at all.

Quoted 2 lines

Could you please tell me, which conntrack and/or NAT helpers you were using on that machine?

The problem occurs when:
- a client broadcasts a tftp request, with source IP 192.168.160.255
- server in the same physical network, but logical network 192.168.10.0/24 replies
- the reply is routed through the gateway (which has an alias IP 192.168.160.1 netmask /24 on the same physical network, if this is relevant)
- gateway blocks with REJECT. This message ist still in the logs, but soon after that the kernel panics.

So, if a helper is causing the problem, it is probably the tftp helper. It may also be related to the problem that the client IP is ending with .255, which is the broadcast address for the gateway on that network.

I can send the firewall rules to you in a private mail, if you need it.

This is an ecxcerpt of .config:

#
# IP: Netfilter Configuration
#
CONFIG_IP_NF_CONNTRACK=y
CONFIG_IP_NF_FTP=y
CONFIG_IP_NF_AMANDA=y
CONFIG_IP_NF_TFTP=y
CONFIG_IP_NF_IRC=y
# CONFIG_IP_NF_QUEUE is not set
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP_NF_MATCH_LIMIT=y
CONFIG_IP_NF_MATCH_MAC=y
CONFIG_IP_NF_MATCH_PKTTYPE=y
CONFIG_IP_NF_MATCH_MARK=y
CONFIG_IP_NF_MATCH_MULTIPORT=y
CONFIG_IP_NF_MATCH_TOS=y
CONFIG_IP_NF_MATCH_RECENT=y
CONFIG_IP_NF_MATCH_ECN=y
CONFIG_IP_NF_MATCH_DSCP=y
CONFIG_IP_NF_MATCH_AH_ESP=y
CONFIG_IP_NF_MATCH_LENGTH=y
CONFIG_IP_NF_MATCH_TTL=y
CONFIG_IP_NF_MATCH_TCPMSS=y
CONFIG_IP_NF_MATCH_HELPER=y
CONFIG_IP_NF_MATCH_STATE=y
CONFIG_IP_NF_MATCH_CONNTRACK=y
# CONFIG_IP_NF_MATCH_UNCLEAN is not set
# CONFIG_IP_NF_MATCH_OWNER is not set
CONFIG_IP_NF_FILTER=y
CONFIG_IP_NF_TARGET_REJECT=y
# CONFIG_IP_NF_TARGET_MIRROR is not set
CONFIG_IP_NF_NAT=y
CONFIG_IP_NF_NAT_NEEDED=y
CONFIG_IP_NF_TARGET_MASQUERADE=y
CONFIG_IP_NF_TARGET_REDIRECT=y
CONFIG_IP_NF_NAT_AMANDA=y
# CONFIG_IP_NF_NAT_LOCAL is not set
# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
CONFIG_IP_NF_NAT_IRC=y
CONFIG_IP_NF_NAT_FTP=y
CONFIG_IP_NF_NAT_TFTP=y
CONFIG_IP_NF_MANGLE=y
CONFIG_IP_NF_TARGET_TOS=y
CONFIG_IP_NF_TARGET_ECN=y
CONFIG_IP_NF_TARGET_DSCP=y
CONFIG_IP_NF_TARGET_MARK=y
CONFIG_IP_NF_TARGET_LOG=y
CONFIG_IP_NF_TARGET_ULOG=y
CONFIG_IP_NF_TARGET_TCPMSS=y
# CONFIG_IP_NF_ARPTABLES is not set

Quoted 11 lines

We haven't had something like this before.

As a workaround, you could add an additional check into that piece of code. At least it won't oops anymore, although it is still unclear how you end up with this kind of situation.

if (expected

    && expected->expectant->helper
    && expected->expectant->helper->timeout
    && !del_timer(&expected->timeout))
        expected = NULL;

Greetings,
Oliver

Signature · 4 lines
Cyclades GmbH                       -              Everywhere with Linux
Oliver Kurth                                               Cyclades GmbH
Research & Development                                        Rennweg 33
Fon/Fax: +49 (0) 8122 90999-34/-33                        D-85435 Erding
#5 lore raw
Quoted 21 lines · Oliver Kurth
Quoted 20 lines · Harald Welte
Quoted 6 lines · Oliver Kurth

Hi Harald,

Quoted 2 lines
Quoted 2 lines

We are having a problem with 2.4.24 on cyclades germany, the box (firewall) is crashing in the netfilter code.

Anything new about that problem? Do you need more information?

sorry, I lost that issue because I'm extremely overloaded at the moment.

It seems like it crashes in the following piece of code (from ip_conntrack_core.c)

        /* If the expectation is dying, then this is a looser. */
        if (expected
            && expected->expectant->helper->timeout
            && !del_timer(&expected->timeout))
                expected = NULL;
Quoted 4 lines
Quoted 4 lines

To be more precise, it cannot dereference helper->timeout, since helper is NULL. I am extremely puzzled how you would end up with a conntrack expectation (which can only be caused by a helper) that has not assigned a helper.

I've encountered the same oops back in September 2003, you might be interested in the information I posted back then:

http://lists.netfilter.org/pipermail/netfilter-devel/2003-September/012590.html

It must be some kind of race condition, but I could not figure out what it could be.

Signature · 2 lines
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1