lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 05 Jun 2007 10:41:51 -0700
From:	Rick Jones <rick.jones2@...com>
To:	chris schlund <chrisschlund@....de>
Cc:	netdev@...r.kernel.org
Subject: Re: Socket hangs in read() when putting interface down

chris schlund wrote:
> Using read() on a socket(AF_INET, SOCK_STREAM) connected via any network
> interface (e.g eth0) and putting this interface down (ifconfig) while
> the socket is in read() produces a hanger (the read() will not return
> anymore).
> Even if I install sigaction signal handler I got no signal when the
> interface is removed.

I'd not think there was a direct tie-in between an application signal 
handler and an interface being downed.

> This may be ok on a major interface like eth0 but it is a problem when
> using a ppp interface via GSM data or GPRS connection.
> Killing the pppd while the socket waits in read() produces the same
> behaviour. Also a broken connection looks the same.
> It is reproducable on several 2.6 kernel versions including the lastest
> stable 2.6.21.
> 
> On my understanding "ifconfig down" should lead into a read() error.

Why?  Can't traffic for the endpoint arrive via some other interface on 
the system?  I would think that getting out of a blocking read() 
requires the application to either have a timer running (and so get out 
of read() with EINTR) or to have keepalives enabled on the TCP 
connection (I'm assuming TCP for an AF_INET, SOCK_STREAM although I 
suppose it could be SCTP)

rick jones
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ