[ukai] A crow may be drowned by aping a cormorant
Fumitoshi UKAI's hacking life

Mon, 18 Apr 2005

Sashimi (slices of raw fish) and Tofu served cold

2005/04/18 supper Side dishes: Bamboo sprout stired with Miso, Kimuchi, Miso Soup, 15min.

[22:13] | [/life/cooking] | # (0) | TB| G

Linux Conference 2005 programming committee

I was 40min late. Today, we vote adoption or rejection of the submitted papers and schedule the timetable of the conference. We'll notify adoption or rejection to the submitter on this Friday as scheduled and release the timetable in public in this week or next.

[17:00] | [/jla/lc2005] | # (0) | TB| G

TCP passive open (SYN,ACK) with PSH flag

On April 16th at Bunkyo Green Court, knok, gniibe, Ar, mhatta and I welcome Kai Hendry who visits Japan recently.

While we're talking one topic and another, gniibe noticed that his laptop PC running Debian can not connect with some network printer server (MELCO Wireless Print Server, Server Name: WS-363251, Server Model: LPV2-WS11GC) . He investigates this in more details, and he suspects the filter configured in this machines:

# Generated by iptables-save v1.2.11 on Thu Apr 14 11:43:29 2005
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 0 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 3 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 11 -j ACCEPT
-A INPUT -p udp -m udp --sport 137 --dport 1024:65535 -j ACCEPT
COMMIT
# Completed on Thu Apr 14 11:43:29 2005

If this filter is not used (all ACCEPT), the there are no problem.

He finds that the network printer server opens TCP connection passively with TCP packets flagged with SYN,ACK and PSH. Note that in usual implementation of TCP, passive open uses a TCP packet flagged with SYN,ACK only without PSH flag. As TCP state transition, once a TCP packet flagged with SYN,ACK, a state transits to ESTABLISHED, so the connection will be accepted by this filter rule. However, the connection is DROPed. So, we suspect PSH flag is misused or conntrack doesn't handle this case correctly.

I reads linux kernel code, and suspects that this is because TCP flag SYN|ACK|PSH is not considered as valid in tcp_valid_flag in net/ipv4/netfilter/ip_conntrack_proto_tcp.c Do we need the TH_SYN|TH_ACK|TH_PSH should be valid (1) in tcp_valid_flag as well?

I googled and find similar topics:

Mon Apr 18 12:56:07 2005: gniibe posts this issues on netfilter-devel mailing-list.

[12:57] | [/debian/linux] | # (0) | TB| G

< April 2005 >
SuMoTuWeThFrSa
      1 2
3 4 5 6 7 8 9
10111213141516
17181920212223
24252627282930

Categories

Archives

My Sites
ukai.jp
mu
me
Diary
[rss]

Web Sites
Debian
Debian JP
snapshot.debian.net
Japan Linux Association
Free Software Initiative of Japan

powered by pyblosxom