Oops in ctnetlink_create_conntrack
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 4 lines · Simon Lodal
Hello
I got an oops in
ctnetlink_create_conntrackwhen running 'conntrackd -c', with a 'conntrackd -d' running. I hope this is the right place to report this bug.
Please CC netfilter-devel on bugreports.
Quoted 10 lines
BUG: unable to handle kernel NULL pointer dereference at virtual address 00000004 printing eip: *pde = 00000000 Oops: 0000 [#1] SMP Modules linked in: generic piix softdog e752x_edac eeprom i2c_dev i2c_i801 i2c_core parport_pc parport sd_mod ide_cd cdrom ide_disk usb_storage ide_core usbserial ehci_hcd uhci_hcd usbcore thermal processor fan ata_piix libata scsi_mod raid1 md_mod CPU: 1 EIP: 0060:[<4029f2a7>] Not tainted VLI EFLAGS: 00010202 (2.6.18.5-r2.8-p4smp #1)EIP is at
ctnetlink_create_conntrack+0x6e/0x3a7
I *think* this is already fixed in 2.6.19 by the attached patch.
Can you verify whether the patch fixes the problem? If it does I'll push it to -stable.
[NETFILTER]: ctnetlink: check for status attribute existence on conntrack creation
Check that status flags are available in the netlink message received to create a new conntrack.
---
commit bbb3357d14f6becd156469220992ef7ab0f10e69
tree f24b5b6491c76d3b384bc09307d6b841fbc0370c
parent 1b683b551209ca46ae59b29572018001db5af078
author Pablo Neira Ayuso <[email protected]> Wed, 29 Nov 2006 02:35:31 +0100 committer David S. Miller <[email protected]> Sat, 02 Dec 2006 21:31:27 -0800
net/ipv4/netfilter/ip_conntrack_netlink.c | 8 +++++--- net/netfilter/nf_conntrack_netlink.c | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-)
net/ipv4/netfilter/ip_conntrack_netlink.c +5 -3
@@ -945,9 +945,11 @@ ctnetlink_create_conntrack(struct nfattr ct->timeout.expires = jiffies + ct->timeout.expires *HZ ; ct->status |=IPS_CONFIRMED ; - err =ctnetlink_change_status (ct, cda); -if (err <0 ) - goto err; +if (cda[CTA_STATUS -1 ]) { + err =ctnetlink_change_status (ct, cda); +if (err <0 ) + goto err; + }if (cda[CTA_PROTOINFO -1 ]) { err =ctnetlink_change_protoinfo (ct, cda);
net/netfilter/nf_conntrack_netlink.c +5 -3
@@ -963,9 +963,11 @@ ctnetlink_create_conntrack(struct nfattr ct->timeout.expires = jiffies + ct->timeout.expires *HZ ; ct->status |=IPS_CONFIRMED ; - err =ctnetlink_change_status (ct, cda); -if (err <0 ) - goto err; +if (cda[CTA_STATUS -1 ]) { + err =ctnetlink_change_status (ct, cda); +if (err <0 ) + goto err; + }if (cda[CTA_PROTOINFO -1 ]) { err =ctnetlink_change_protoinfo (ct, cda);
Yes, verified.
Thanks a lot!
Regards
Simon
Quoted 26 lines · Patrick McHardy
Quoted 5 lines · Simon Lodal
Hello
I got an oops in
ctnetlink_create_conntrackwhen running 'conntrackd -c', with a 'conntrackd -d' running. I hope this is the right place to report this bug.Please CC netfilter-devel on bugreports.
Quoted 11 lines
BUG: unable to handle kernel NULL pointer dereference at virtual address 00000004 printing eip: *pde = 00000000 Oops: 0000 [#1] SMP Modules linked in: generic piix softdog e752x_edac eeprom i2c_dev i2c_i801 i2c_core parport_pc parport sd_mod ide_cd cdrom ide_disk usb_storage ide_core usbserial ehci_hcd uhci_hcd usbcore thermal processor fan ata_piix libata scsi_mod raid1 md_mod CPU: 1 EIP: 0060:[<4029f2a7>] Not tainted VLI EFLAGS: 00010202 (2.6.18.5-r2.8-p4smp #1)Quoted 1 line
EIP is at
ctnetlink_create_conntrack+0x6e/0x3a7I *think* this is already fixed in 2.6.19 by the attached patch.
Can you verify whether the patch fixes the problem? If it does I'll push it to -stable.
Pablo Neira Ayuso
maintainerQuoted 8 lines · Simon Lodal
I got an oops in
ctnetlink_create_conntrackwhen running 'conntrackd -c', with a 'conntrackd -d' running. I hope this is the right place to report this bug.Trigger: Executed 'conntrackd -c' twice. First time it succeeded, second time it produced an oops.
Reproducible: Yes, every time.
[...]
EIP: [<4029f2a7>]ctnetlink_create_conntrack+0x6e/0x3a7SS:ESP 0068:5fbc1bb8
Does the patch attached fix the problem that you're reporting? It was already committed to the upcoming 2.6.20 [1]
[1]
http://lists.netfilter.org/pipermail/netfilter-devel/2006-November/026212.html
Signature · 2 lines
The dawn of the fourth age of Linux firewalling is coming; a time of great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris
[CTNETLINK] Check for status flags existence on conntrack creation
Check that status flags are available in the netlink message received to create a new conntrack.
net/ipv4/netfilter/ip_conntrack_netlink.c +5 -3
@@ -945,9 +945,11 @@ ctnetlink_create_conntrack(struct nfattr ct->timeout.expires = jiffies + ct->timeout.expires *HZ ; ct->status |=IPS_CONFIRMED ; - err =ctnetlink_change_status (ct, cda); -if (err <0 ) - goto err; +if (cda[CTA_STATUS -1 ]) { + err =ctnetlink_change_status (ct, cda); +if (err <0 ) + goto err; + }if (cda[CTA_PROTOINFO -1 ]) { err =ctnetlink_change_protoinfo (ct, cda);
net/netfilter/nf_conntrack_netlink.c +5 -3
@@ -961,9 +961,11 @@ ctnetlink_create_conntrack(struct nfattr ct->timeout.expires = jiffies + ct->timeout.expires *HZ ; ct->status |=IPS_CONFIRMED ; - err =ctnetlink_change_status (ct, cda); -if (err <0 ) - goto err; +if (cda[CTA_STATUS -1 ]) { + err =ctnetlink_change_status (ct, cda); +if (err <0 ) + goto err; + }if (cda[CTA_PROTOINFO -1 ]) { err =ctnetlink_change_protoinfo (ct, cda);
Pablo Neira Ayuso
maintainerQuoted 2 lines · Pablo Neira Ayuso
Does the patch attached fix the problem that you're reporting? It was already committed to the upcoming 2.6.20 [1]
Damn, I didn't notice that Patrick already did the trick. Thanks ;)
@Patrick: Would it make sense pushing this to -stable even if ctnetlink is still marked as experimental?
Signature · 2 lines
The dawn of the fourth age of Linux firewalling is coming; a time of great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris
Quoted 10 lines · Pablo Neira Ayuso
Quoted 2 lines · Pablo Neira Ayuso
Does the patch attached fix the problem that you're reporting? It was already committed to the upcoming 2.6.20 [1]
Damn, I didn't notice that Patrick already did the trick. Thanks ;)
@Patrick: Would it make sense pushing this to -stable even if ctnetlink is still marked as experimental?
Yes, I'll push it to -stable.