serious problem with 2.4.24 combined with KVM switch (fwd)
Hello Oliver,
For tftp broadcasts to be in use, I'd assume that this is a network
bootstrapping scenario - where the TFTP RRQ is broadcast, and where multiple servers are permitted to respond (TFTP DATA/ACK)
Is it possible that the Netfilter expectation is being satisfied by one
response (server sending back a TFTP DATA), then being satisfied again, by another?
You said below;
Quoted 9 lines
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.
While it shouldn't crash (regardless), it should also not be activating
the helper and REJECTing. Is it possible the the REJECT log entry is
on an INPUT rule, while the helper is being triggered on a PREROUTING rule, due to the architecture of the network you've described (or vice versa)?
Regards,
----- Original Message -----
Quoted 3 lines
From: "Oliver Kurth" <[email protected]>
To: "Harald Welte" <[email protected]>
Subject: Re: [Cybr.rdsw] [Cy.rdsw] serious problem with 2.4.24 combined with KVM
switch (fwd)
Quoted 109 lines
Date: Wed, 04 Feb 2004 15:05:53 +0100
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=yCONFIG_IP_NF_FTP=yCONFIG_IP_NF_AMANDA=yCONFIG_IP_NF_TFTP=yCONFIG_IP_NF_IRC=y
#CONFIG_IP_NF_QUEUEis not setCONFIG_IP_NF_IPTABLES=yCONFIG_IP_NF_MATCH_LIMIT=yCONFIG_IP_NF_MATCH_MAC=yCONFIG_IP_NF_MATCH_PKTTYPE=yCONFIG_IP_NF_MATCH_MARK=yCONFIG_IP_NF_MATCH_MULTIPORT=yCONFIG_IP_NF_MATCH_TOS=yCONFIG_IP_NF_MATCH_RECENT=yCONFIG_IP_NF_MATCH_ECN=yCONFIG_IP_NF_MATCH_DSCP=yCONFIG_IP_NF_MATCH_AH_ESP=yCONFIG_IP_NF_MATCH_LENGTH=yCONFIG_IP_NF_MATCH_TTL=yCONFIG_IP_NF_MATCH_TCPMSS=yCONFIG_IP_NF_MATCH_HELPER=yCONFIG_IP_NF_MATCH_STATE=yCONFIG_IP_NF_MATCH_CONNTRACK=y
#CONFIG_IP_NF_MATCH_UNCLEANis not set
#CONFIG_IP_NF_MATCH_OWNERis not setCONFIG_IP_NF_FILTER=yCONFIG_IP_NF_TARGET_REJECT=y
#CONFIG_IP_NF_TARGET_MIRRORis not setCONFIG_IP_NF_NAT=yCONFIG_IP_NF_NAT_NEEDED=yCONFIG_IP_NF_TARGET_MASQUERADE=yCONFIG_IP_NF_TARGET_REDIRECT=yCONFIG_IP_NF_NAT_AMANDA=y
#CONFIG_IP_NF_NAT_LOCALis not set
#CONFIG_IP_NF_NAT_SNMP_BASICis not setCONFIG_IP_NF_NAT_IRC=yCONFIG_IP_NF_NAT_FTP=yCONFIG_IP_NF_NAT_TFTP=yCONFIG_IP_NF_MANGLE=yCONFIG_IP_NF_TARGET_TOS=yCONFIG_IP_NF_TARGET_ECN=yCONFIG_IP_NF_TARGET_DSCP=yCONFIG_IP_NF_TARGET_MARK=yCONFIG_IP_NF_TARGET_LOG=yCONFIG_IP_NF_TARGET_ULOG=yCONFIG_IP_NF_TARGET_TCPMSS=y
#CONFIG_IP_NF_ARPTABLESis not setQuoted 6 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.
Quoted 16 lines
Quoted 5 lines
if (expected
&& expected->expectant->helper && expected->expectant->helper->timeout && !del_timer(&expected->timeout)) expected = NULL;Greetings,
OliverSignature · 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
--
Ian Latter
Internet and Networking Security Officer
Macquarie University
Meet me at the Australian Unix and open systems
User Group (AUUG) Security Symposium; 2004
http://www.auug.org.au/events/2004/security/
Quoted 5 lines · Ian Latter
Hello Oliver,
For tftp broadcasts to be in use, I'd assume that this is a network
bootstrapping scenario - where the TFTP RRQ is broadcast, and where multiple servers are permitted to respond (TFTP DATA/ACK)
Right.
Quoted 3 lines
Is it possible that the Netfilter expectation is being satisfied by one
response (server sending back a TFTP DATA), then being satisfied again, by another?
Yes, this is possible. We have more than one tftp server here. Though in a test scenario we switched off all but one (and the gateway crashed), but maybe we missed one.
Quoted 13 lines
You said below;
Quoted 9 lines
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.
Quoted 5 lines
While it shouldn't crash (regardless), it should also not be activating
the helper and REJECTing. Is it possible the the REJECT log entry is
on an INPUT rule, while the helper is being triggered on a PREROUTING rule, due to the architecture of the network you've described (or vice versa)?
The REJECT is in an INPUT rule. But I do not think that a PREROUTING rule is involved. I just looked at the rules, and PREROUTING is only done for other physical networks.
Greetings,
Oliver
Quoted 140 lines
----- Original Message -----
Quoted 3 lines
From: "Oliver Kurth" <[email protected]>
To: "Harald Welte" <[email protected]>
Subject: Re: [Cybr.rdsw] [Cy.rdsw] serious problem with 2.4.24 combined with KVMswitch (fwd)
Quoted 109 lines
Date: Wed, 04 Feb 2004 15:05:53 +0100
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=yCONFIG_IP_NF_FTP=yCONFIG_IP_NF_AMANDA=yCONFIG_IP_NF_TFTP=yCONFIG_IP_NF_IRC=y
#CONFIG_IP_NF_QUEUEis not setCONFIG_IP_NF_IPTABLES=yCONFIG_IP_NF_MATCH_LIMIT=yCONFIG_IP_NF_MATCH_MAC=yCONFIG_IP_NF_MATCH_PKTTYPE=yCONFIG_IP_NF_MATCH_MARK=yCONFIG_IP_NF_MATCH_MULTIPORT=yCONFIG_IP_NF_MATCH_TOS=yCONFIG_IP_NF_MATCH_RECENT=yCONFIG_IP_NF_MATCH_ECN=yCONFIG_IP_NF_MATCH_DSCP=yCONFIG_IP_NF_MATCH_AH_ESP=yCONFIG_IP_NF_MATCH_LENGTH=yCONFIG_IP_NF_MATCH_TTL=yCONFIG_IP_NF_MATCH_TCPMSS=yCONFIG_IP_NF_MATCH_HELPER=yCONFIG_IP_NF_MATCH_STATE=yCONFIG_IP_NF_MATCH_CONNTRACK=y
#CONFIG_IP_NF_MATCH_UNCLEANis not set
#CONFIG_IP_NF_MATCH_OWNERis not setCONFIG_IP_NF_FILTER=yCONFIG_IP_NF_TARGET_REJECT=y
#CONFIG_IP_NF_TARGET_MIRRORis not setCONFIG_IP_NF_NAT=yCONFIG_IP_NF_NAT_NEEDED=yCONFIG_IP_NF_TARGET_MASQUERADE=yCONFIG_IP_NF_TARGET_REDIRECT=yCONFIG_IP_NF_NAT_AMANDA=y
#CONFIG_IP_NF_NAT_LOCALis not set
#CONFIG_IP_NF_NAT_SNMP_BASICis not setCONFIG_IP_NF_NAT_IRC=yCONFIG_IP_NF_NAT_FTP=yCONFIG_IP_NF_NAT_TFTP=yCONFIG_IP_NF_MANGLE=yCONFIG_IP_NF_TARGET_TOS=yCONFIG_IP_NF_TARGET_ECN=yCONFIG_IP_NF_TARGET_DSCP=yCONFIG_IP_NF_TARGET_MARK=yCONFIG_IP_NF_TARGET_LOG=yCONFIG_IP_NF_TARGET_ULOG=yCONFIG_IP_NF_TARGET_TCPMSS=y
#CONFIG_IP_NF_ARPTABLESis not setQuoted 6 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.
Quoted 16 lines
Quoted 5 lines
if (expected
&& expected->expectant->helper && expected->expectant->helper->timeout && !del_timer(&expected->timeout)) expected = NULL;Greetings,
OliverSignature · 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--
Ian Latter
Internet and Networking Security Officer
Macquarie UniversityMeet me at the Australian Unix and open systems
User Group (AUUG) Security Symposium; 2004
http://www.auug.org.au/events/2004/security/
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