Compatibility issue with uggly Windows RFC1323 implementation

Bug #689886 reported by Dmitriy Balakin
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Low
Andy Whitcroft
Maverick
Invalid
Undecided
Unassigned

Bug Description

First, sorry for my bad english.

The issue is that Linux-based OS sometimes can't make an tcp connection to some Windows servers with switched on buggy implementation of rfc1323, that described on this forum: http://www.network-builders.com/windows-tcp-timestamp-not-compliant-rfc-1323-a-t80898.html.

Because some Windows hosts implementation of rfc1323 bases on randomly generated TSval and sent first value of TSval as 0, the difference of recent and new TSval sometimes has been affected by a sign magic issue and the PAWS mechanism has been triggered. Anyway, the rfc1323 has discribes the condition of PAWS as "0 < (t - s) < 2**31", that has been right implementation in current linux kernel, but incompatible with Windows bug.

For example, the one of affected to this issue Windows host is behind relay.n-l-e.ru:80. Note that problems arise only when the remote side sets the TC val > 2147483647, ie when there is a sign.

I think that my small patch makes the kernel more compatible with this windows bug.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: linux-image-2.6.35-23-generic 2.6.35-23.41
Regression: No
Reproducible: Yes
ProcVersionSignature: Ubuntu 2.6.35-23.41-generic 2.6.35.7
Uname: Linux 2.6.35-23-generic i686
NonfreeKernelModules: nvidia
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.23.
Architecture: i386
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: mamon 1517 F.... pulseaudio
CRDA: Error: [Errno 2] Нет такого файла или каталога
Card0.Amixer.info:
 Card hw:0 'M5455'/'ALi M5455 with ALC650F at irq 5'
   Mixer name : 'Realtek ALC650F'
   Components : 'AC97a:414c4723'
   Controls : 50
   Simple ctrls : 33
Date: Tue Dec 14 00:18:01 2010
HibernationDevice: RESUME=UUID=f28c073c-7dd9-4573-8f91-57125983e611
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
IwConfig:
 lo no wireless extensions.

 eth0 no wireless extensions.

 vboxnet0 no wireless extensions.
Lsusb:
 Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: Infomash RoverBook
PccardctlIdent:
 Socket 0:
   no product info available
 Socket 1:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
 Socket 1:
   no card
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.35-23-generic root=UUID=3d272a1f-0cf1-4199-a703-982610a611cc ro quiet splash nomodeset
ProcEnviron:
 PATH=(custom, user)
 LANG=ru_RU.utf8
 SHELL=/bin/bash
RelatedPackageVersions: linux-firmware 1.38
RfKill:

SourcePackage: linux
WifiSyslog:
 Dec 13 23:53:18 mamon-laptop kernel: [ 1611.597048] warning: `VirtualBox' uses 32-bit capabilities (legacy support in use)
 Dec 14 00:10:38 mamon-laptop kernel: [ 2651.203411] lo: Disabled Privacy Extensions
dmi.bios.date: 07/18/03
dmi.bios.vendor: Phoenix Technologies LTD
dmi.bios.version: 4.06
dmi.board.name: QID2000
dmi.board.vendor: MEDIONNB
dmi.board.version: Rev.A
dmi.chassis.asset.tag: No Asset Tag
dmi.chassis.type: 10
dmi.chassis.vendor: MEDIONNB
dmi.chassis.version: N/A
dmi.modalias: dmi:bvnPhoenixTechnologiesLTD:bvr4.06:bd07/18/03:svnInfomash:pnRoverBook:pvr0106:rvnMEDIONNB:rnQID2000:rvrRev.A:cvnMEDIONNB:ct10:cvrN/A:
dmi.product.name: RoverBook
dmi.product.version: 0106
dmi.sys.vendor: Infomash

Revision history for this message
Dmitriy Balakin (0x0000.ru) wrote :
Revision history for this message
Dmitriy Balakin (0x0000.ru) wrote :

tcpdump capture:

23:40:52.726909 IP 213.141.147.8.33778 > 212.176.201.162.80: Flags
[S], seq 1116163452, win 5840, options [mss 1460,sackOK,TS val 141403
ecr 0,nop,wscale 6], length 0
23:40:52.737227 IP 212.176.201.162.80 > 213.141.147.8.33778: Flags
[S.], seq 4019723831, ack 1116163453, win 16384, options [mss
1360,nop,wscale 0,nop,nop,TS val 0 ecr 0,nop,nop,sackOK], length 0
23:40:52.737392 IP 213.141.147.8.33778 > 212.176.201.162.80: Flags
[.], ack 1, win 92, options [nop,nop,TS val 141405 ecr 0], length 0
23:40:52.737926 IP 213.141.147.8.33778 > 212.176.201.162.80: Flags
[P.], seq 1:113, ack 1, win 92, options [nop,nop,TS val 141405 ecr 0],
length 112
23:40:52.749101 IP 212.176.201.162.80 > 213.141.147.8.33778: Flags
[P.], seq 1:415, ack 113, win 65423, options [nop,nop,TS val
3503477357 ecr 141403], length 414
23:40:52.749219 IP 213.141.147.8.33778 > 212.176.201.162.80: Flags
[.], ack 1, win 92, options [nop,nop,TS val 141408 ecr 0], length 0
23:40:53.002253 IP 213.141.147.8.33778 > 212.176.201.162.80: Flags
[P.], seq 1:113, ack 1, win 92, options [nop,nop,TS val 141472 ecr 0],
length 112
23:40:53.012252 IP 212.176.201.162.80 > 213.141.147.8.33778: Flags
[P.], ack 113, win 65423, options [nop,nop,TS val 0 ecr 141408],
length 0
23:40:55.665916 IP 212.176.201.162.80 > 213.141.147.8.33778: Flags
[P.], seq 1:415, ack 113, win 65423, options [nop,nop,TS val
3503477387 ecr 141408], length 414
23:40:55.666023 IP 213.141.147.8.33778 > 212.176.201.162.80: Flags
[.], ack 1, win 92, options [nop,nop,TS val 142137 ecr 0], length 0
23:40:55.676963 IP 212.176.201.162.80 > 213.141.147.8.33778: Flags
[P.], seq 1:415, ack 113, win 65423, options [nop,nop,TS val
3503477387 ecr 142137], length 414
23:40:55.677007 IP 213.141.147.8.33778 > 212.176.201.162.80: Flags
[.], ack 1, win 92, options [nop,nop,TS val 142140 ecr 0], length 0
23:41:01.683646 IP 212.176.201.162.80 > 213.141.147.8.33778: Flags
[P.], seq 1:415, ack 113, win 65423, options [nop,nop,TS val
3503477447 ecr 142140], length 414
23:41:01.683752 IP 213.141.147.8.33778 > 212.176.201.162.80: Flags
[.], ack 1, win 92, options [nop,nop,TS val 143642 ecr 0], length 0

Revision history for this message
Dmitriy Balakin (0x0000.ru) wrote :

I also opened this issue on upstream bugtracker: https://bugzilla.kernel.org/show_bug.cgi?id=24842

Revision history for this message
Dmitriy Balakin (0x0000.ru) wrote :

My earlier patch is not correct. Eric Dumazet in the maillist suggested the correct version of the patch.

Revision history for this message
Dmitriy Balakin (0x0000.ru) wrote :

Patch has been committed to net-next-2.6 tree at upstream git. Commit bc2ce894e113ed95b92541134b002fdc641e8080

Revision history for this message
Jeremy Foshee (jeremyfoshee) wrote :

Hi Dmitriy,

If you could also please test the latest upstream kernel available that would be great. It will allow additional upstream developers to examine the issue. Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text. Please let us know your results.

Thanks in advance.

    [This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: kj-triage
Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Dmitriy Balakin (0x0000.ru) wrote :

This bug is also affected to linux-image-2.6.37-020637-generic_2.6.37-020637.201101050908_i386

tags: removed: needs-upstream-testing
Changed in linux (Ubuntu):
status: Incomplete → New
Revision history for this message
Andy Whitcroft (apw) wrote :

Seems that this fix was picked up in mainline as the commit below, this commit will be in the next Natty kernel:

  commit bc2ce894e113ed95b92541134b002fdc641e8080
  Author: Eric Dumazet <email address hidden>
  Date: Thu Dec 16 14:08:34 2010 -0800

    tcp: relax tcp_paws_check()

Changed in linux (Ubuntu):
assignee: nobody → Andy Whitcroft (apw)
status: New → Fix Committed
importance: Undecided → Low
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (3.2 KiB)

This bug was fixed in the package linux - 2.6.38-1.27

---------------
linux (2.6.38-1.27) natty; urgency=low

  [ Andy Whitcroft ]

  * ubuntu: AUFS -- update aufs-update to track new locations of headers
  * ubuntu: AUFS -- update to c5021514085a5d96364e096dbd34cadb2251abfd
  * SAUCE: ensure root is ready before running usermodehelpers in it
  * correct the Vcs linkage to point to natty
  * rebase to linux tip e78bf5e6cbe837daa6ab628a5f679548742994d3
  * [Config] update configs following rebase
    e78bf5e6cbe837daa6ab628a5f679548742994d3
  * SAUCE: Yama: follow changes to generic_permission
  * ubuntu: compcache -- follow changes to bd_claim/bd_release
  * ubuntu: iscsitarget -- follow changes to open_bdev_exclusive
  * ubuntu: ndiswrapper -- fix interaction between __packed and packed
  * ubuntu: AUFS -- update to 806051bcbeec27748aae2b7957726a4e63ff308e
  * update package version to match payload version
  * rebase to e6f597a1425b5af64917be3448b29e2d5a585ac8
  * rebase to v2.6.38-rc1
  * [Config] updateconfigs following rebase to v2.6.38-rc1
  * SAUCE: x86 fix up jiffies/jiffies_64 handling
  * rebase to linus tip 2b1caf6ed7b888c95a1909d343799672731651a5
  * [Config] updateconfigs following rebase to
    2b1caf6ed7b888c95a1909d343799672731651a5
  * [Config] disable CONFIG_TRANSPARENT_HUGEPAGE to fix i386 boot crashes
  * ubuntu: AUFS -- suppress benign plink warning messages
    - LP: #621195
  * [Config] CONFIG_NR_CPUS=256 for amd64 -server flavour
  * rebase to v2.6.38-rc2
  * rebase to mainline d315777b32a4696feb86f2a0c9e9f39c94683649
  * rebase to c723fdab8aa728dc2bf0da6a0de8bb9c3f588d84
  * [Config] update configs following rebase to
    c723fdab8aa728dc2bf0da6a0de8bb9c3f588d84
  * [Config] disable CONFIG_AD7152 to fix FTBS on armel versatile
  * [Config] disable CONFIG_AD7150 to fix FTBS on armel versatile
  * [Config] disable CONFIG_RTL8192CE to fix FTBS on armel omap
  * [Config] disable CONFIG_MANTIS_CORE to fix FTBS on armel versatile

  [ Kees Cook ]

  * SAUCE: kernel: make /proc/kallsyms mode 400 to reduce ease of attacking

  [ Stefan Bader ]

  * Temporarily disable RODATA for virtual i386
    - LP: #699828

  [ Tim Gardner ]

  * [Config] CONFIG_NLS_DEFAULT=utf8
    - LP: #683690
  * [Config] CONFIG_HIBERNATION=n
  * update bnx2 firmware files in d-i/firmware/nic-modules

  [ Upstream Kernel Changes ]

  * Revert "drm/radeon/bo: add some fallback placements for VRAM only
    objects."
  * packaging: make System.map mode 0600
  * thinkpad_acpi: Always report scancodes for hotkeys
    - LP: #702407
  * sched: tg->se->load should be initialised to tg->shares
  * Input: sysrq -- ensure sysrq_enabled and __sysrq_enabled are consistent
  * brcm80211: include linux/slab.h for kfree
  * pch_dma: add include/slab.h for kfree
  * i2c-eg20t: include linux/slab.h for kfree
  * gpio/ml_ioh_gpio: include linux/slab.h for kfree
  * tty: include linux/slab.h for kfree
  * winbond: include linux/delay.h for mdelay et al

  [ Upstream Kernel Changes ]

  * mark the start of v2.6.38 versioning
  * rebase v2.6.37 to v2.6.38-rc2 + c723fdab8aa728dc2bf0da6a0de8bb9c3f588d84
    - LP: #689886
    - LP: #702125
    - LP: #608775
    - LP: #215802
...

Read more...

Changed in linux (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Julian Wiedmann (jwiedmann) wrote :

This release has reached end-of-life [0].

[0] https://wiki.ubuntu.com/Releases

Changed in linux (Ubuntu Maverick):
status: New → Invalid
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.