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] [day] [month] [year] [list]
Message-Id: <20150424.113930.411412345479090439.davem@davemloft.net>
Date:	Fri, 24 Apr 2015 11:39:30 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	eric.dumazet@...il.com
Cc:	netdev@...r.kernel.org, ycheng@...gle.com
Subject: Re: [PATCH net] inet: fix possible panic in reqsk_queue_unlink()

From: Eric Dumazet <eric.dumazet@...il.com>
Date: Thu, 23 Apr 2015 18:03:44 -0700

> From: Eric Dumazet <edumazet@...gle.com>
> 
> [ 3897.923145] BUG: unable to handle kernel NULL pointer dereference at
>  0000000000000080
> [ 3897.931025] IP: [<ffffffffa9f27686>] reqsk_timer_handler+0x1a6/0x243
> 
> There is a race when reqsk_timer_handler() and tcp_check_req() call
> inet_csk_reqsk_queue_unlink() on the same req at the same time.
> 
> Before commit fa76ce7328b2 ("inet: get rid of central tcp/dccp listener
> timer"), listener spinlock was held and race could not happen.
> 
> To solve this bug, we change reqsk_queue_unlink() to not assume req
> must be found, and we return a status, to conditionally release a
> refcount on the request sock.
> 
> This also means tcp_check_req() in non fastopen case might or not
> consume req refcount, so tcp_v6_hnd_req() & tcp_v4_hnd_req() have
> to properly handle this.
> 
> (Same remark for dccp_check_req() and its callers)
> 
> inet_csk_reqsk_queue_drop() is now too big to be inlined, as it is
> called 4 times in tcp and 3 times in dccp.
> 
> Fixes: fa76ce7328b2 ("inet: get rid of central tcp/dccp listener timer")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Reported-by: Yuchung Cheng <ycheng@...gle.com>

Applied, thanks Eric.
--
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