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, 21 Jul 2015 09:10:10 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	subashab@...eaurora.org
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH net-next] inet: Always increment refcount in
 inet_twsk_schedule

On Mon, 2015-07-20 at 19:14 +0000, subashab@...eaurora.org wrote:
> >> //Initialize time wait socket and setup timer
> >> inet_twsk_alloc() tw_refcnt = 0
> >> __inet_twsk_hashdance() tw_refcnt = 3
> >> inet_twsk_schedule() tw_refcnt = 4
> >> inet_twsk_put() tw_refcnt = 3
> >>
> >> //Receive packet 1 in timewait state
> >> tcp_timewait_state_process() -> inet_twsk_schedule tw_refcnt = 3 (no
> >> change)
> >
> > This is obviously wrong.
> >
> > If a timewait socket is found, do we increment its refcnt before
> > proceeding.
> We do not increment refcount currently when we find a timewait socket.

Actually we do increment refcnt, for every socket found in ehash.

Carefully read again __inet_lookup_established()

This code is generic for ESTABLISH and TIME-WAIT sockets

If you found a code that performed the lookup without taking the refcnt,
please point me at it, this would be a serious bug.

> 
> > I've received some private mails about tw issues, that turned to be
> > caused by buggy drivers or buggy arch specific code.
> >
> > Are you crashed observed on x86 ?
> >
> This is observed on ARM devices. In the current debug, all time wait
> socket refcount changes were happening in TCP stack only and there was no
> platform / driver code involved.
> 
> According to my understanding, we would need to increment the time wait
> socket refcount first before proceeding with any subsequent operations.
> However, I request your expert opinion on this.

Is it some Android kernel ?

Android had private modules that needed an update in 3.18



--
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