ip6tables - --reject-with tcp-reset does not work correctly in chain OUTPUT

Bug #1234877 reported by Voidenko Ekaterina
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Unassigned
Saucy
Won't Fix
Undecided
Unassigned
Trusty
Fix Released
Undecided
Unassigned
Utopic
Fix Released
Medium
Unassigned

Bug Description

Hello,

We use:

Description: Ubuntu 12.04.3 LTS
Release: 12.04

kernel 3.2.2 (checked also 3.8* and 3.10.5-031005-generic kernels. Same.)
iptables=1.4.12-1ubuntu5
and ipv6

We noticed that --reject-with tcp-reset works 7 seconds:

ip6tables -I OUTPUT -p tcp --dport 10001 -j REJECT --reject-with tcp-reset
such rule

ip6tables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
REJECT tcp anywhere anywhere tcp dpt:10001 reject-with tcp-reset

time telnet <ourlovelyipv6onlyserver> 10001
Trying 2a02:6b8:0:c10*...
telnet: Unable to connect to remote host: Connection timed out

real 0m7.012s
user 0m0.000s
sys 0m0.000s

Rule works:

ip6tables -vL
Chain INPUT (policy ACCEPT 506 packets, 49495 bytes)
 pkts bytes target prot opt in out source destination

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 346 packets, 37392 bytes)
 pkts bytes target prot opt in out source destination
    3 216 REJECT tcp any any anywhere anywhere tcp dpt:10001 reject-with tcp-reset

Tcpdump is empty. Packet counter increases. All well.
But it works 7 seconds

iptables does the same within 0.005s

I think this is a bug.

Thank you.
Have a nice day.
---
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.25.
ApportVersion: 2.0.1-0ubuntu17.1
Architecture: amd64
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: PCH [HDA Intel PCH], device 0: ALC269VC Analog [ALC269VC Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: katyavoid 3072 F.... pulseaudio
CRDA:
 country RU:
  (2402 - 2482 @ 40), (N/A, 20)
  (5735 - 5835 @ 20), (N/A, 30)
Card0.Amixer.info:
 Card hw:0 'PCH'/'HDA Intel PCH at 0xf0700000 irq 50'
   Mixer name : 'Intel PantherPoint HDMI'
   Components : 'HDA:10ec0269,144dc0d3,00100202 HDA:80862806,80860101,00100000'
   Controls : 24
   Simple ctrls : 10
DistroRelease: Ubuntu 12.04
EcryptfsInUse: Yes
HibernationDevice: RESUME=UUID=3063eded-5480-466f-aa94-80e7ad79ded3
InstallationMedia: Ubuntu 12.04.2 LTS "Precise Pangolin" - Release amd64 (20130213)
Lsusb:
 Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
 Bus 001 Device 004: ID 2232:1024
MachineType: SAMSUNG ELECTRONICS CO., LTD. 900X3C/900X3D/900X4C/900X4D
MarkForUpload: True
Package: linux (not installed)
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.5.0-26-generic root=UUID=3418390a-f857-4ee2-86ec-f16d01e5014c ro quiet splash vt.handoff=7
ProcVersionSignature: Ubuntu 3.5.0-26.42~precise1-generic 3.5.7.6
RelatedPackageVersions:
 linux-restricted-modules-3.5.0-26-generic N/A
 linux-backports-modules-3.5.0-26-generic N/A
 linux-firmware 1.79.1
Tags: precise
Uname: Linux 3.5.0-26-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
dmi.bios.date: 09/19/2012
dmi.bios.vendor: Phoenix Technologies Ltd.
dmi.bios.version: P02ABK
dmi.board.asset.tag: Base Board Asset Tag
dmi.board.name: NP900X3C-A03RU
dmi.board.vendor: SAMSUNG ELECTRONICS CO., LTD.
dmi.board.version: FAB1
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 9
dmi.chassis.vendor: SAMSUNG ELECTRONICS CO., LTD.
dmi.chassis.version: 0.1
dmi.modalias: dmi:bvnPhoenixTechnologiesLtd.:bvrP02ABK:bd09/19/2012:svnSAMSUNGELECTRONICSCO.,LTD.:pn900X3C/900X3D/900X4C/900X4D:pvr0.1:rvnSAMSUNGELECTRONICSCO.,LTD.:rnNP900X3C-A03RU:rvrFAB1:cvnSAMSUNGELECTRONICSCO.,LTD.:ct9:cvr0.1:
dmi.product.name: 900X3C/900X3D/900X4C/900X4D
dmi.product.version: 0.1
dmi.sys.vendor: SAMSUNG ELECTRONICS CO., LTD.

tags: added: precise
Revision history for this message
Voidenko Ekaterina (katyavoid) wrote :
Changed in iptables (Ubuntu):
status: New → Fix Committed
Revision history for this message
Seth Arnold (seth-arnold) wrote :

If it can be fixed with a Linux kernel check in, probably the 'linux' package is a better target than the 'iptables' package.

Changed in iptables (Ubuntu):
status: Fix Committed → New
affects: iptables (Ubuntu) → linux (Ubuntu)
Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1234877

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Changed in linux (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

I don't see the commit mentioned in comment #1 in the mainline kernel tree as of yet.

Revision history for this message
Voidenko Ekaterina (katyavoid) wrote : AcpiTables.txt

apport information

tags: added: apport-collected
description: updated
Revision history for this message
Voidenko Ekaterina (katyavoid) wrote : AlsaDevices.txt

apport information

Revision history for this message
Voidenko Ekaterina (katyavoid) wrote : AplayDevices.txt

apport information

Revision history for this message
Voidenko Ekaterina (katyavoid) wrote : BootDmesg.txt

apport information

Revision history for this message
Voidenko Ekaterina (katyavoid) wrote : Card0.Amixer.values.txt

apport information

Revision history for this message
Voidenko Ekaterina (katyavoid) wrote : Card0.Codecs.codec.0.txt

apport information

Revision history for this message
Voidenko Ekaterina (katyavoid) wrote : Card0.Codecs.codec.3.txt

apport information

Revision history for this message
Voidenko Ekaterina (katyavoid) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Voidenko Ekaterina (katyavoid) wrote : IwConfig.txt

apport information

Revision history for this message
Voidenko Ekaterina (katyavoid) wrote : Lspci.txt

apport information

Revision history for this message
Voidenko Ekaterina (katyavoid) wrote : PciMultimedia.txt

apport information

Revision history for this message
Voidenko Ekaterina (katyavoid) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Voidenko Ekaterina (katyavoid) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Voidenko Ekaterina (katyavoid) wrote : ProcModules.txt

apport information

Revision history for this message
Voidenko Ekaterina (katyavoid) wrote : PulseList.txt

apport information

Revision history for this message
Voidenko Ekaterina (katyavoid) wrote : RfKill.txt

apport information

Revision history for this message
Voidenko Ekaterina (katyavoid) wrote : UdevDb.gz

apport information

Revision history for this message
Voidenko Ekaterina (katyavoid) wrote : UdevLog.gz

apport information

Revision history for this message
Voidenko Ekaterina (katyavoid) wrote : WifiSyslog.txt

apport information

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Voidenko Ekaterina (katyavoid) wrote :

Please include patch in the first comment. It resolves this problem on kernels >=3.5

Revision history for this message
Tim Gardner (timg-tpi) wrote :

git describe --contains f2020b27be94222eb25c39ff46eb9917cb92897b
v3.13-rc1~105^2~64^2~7

All of the interim LTS kernels are going EOL by July 27, so no patches other then critical CVEs for Quantal, Raring, and Saucy.

Changed in linux (Ubuntu):
status: Confirmed → Fix Released
Changed in linux (Ubuntu Saucy):
status: New → Won't Fix
Changed in linux (Ubuntu Trusty):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.