[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1305835101.3156.6.camel@edumazet-laptop>
Date: Thu, 19 May 2011 21:58:21 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: Jacek Luczak <difrost.kernel@...il.com>
Cc: David Miller <davem@...emloft.net>, vladislav.yasevich@...com,
netdev@...r.kernel.org
Subject: Re: [PATCH FINAL] SCTP: fix race between sctp_bind_addr_free() and
sctp_bind_addr_conflict()
Le jeudi 19 mai 2011 à 21:55 +0200, Jacek Luczak a écrit :
> During the sctp_close() call, we do not use rcu primitives to
> destroy the address list attached to the endpoint. At the same
> time, we do the removal of addresses from this list before
> attempting to remove the socket from the port hash
>
> As a result, it is possible for another process to find the socket
> in the port hash that is in the process of being closed. It then
> proceeds to traverse the address list to find the conflict, only
> to have that address list suddenly disappear without rcu() critical
> section.
>
> Fix issue by closing address list removal inside RCU critical
> section.
>
> Race can result in a kernel crash with general protection fault or
> kernel NULL pointer dereference:
>
> Signed-off-by: Jacek Luczak <luczak.jacek@...il.com>
> Acked-by: Vlad Yasevich <vladislav.yasevich@...com>
> CC: Eric Dumazet <eric.dumazet@...il.com>
>
> ---
> net/sctp/bind_addr.c | 10 ++++------
> 1 files changed, 4 insertions(+), 6 deletions(-)
>
Reviewed-by: Eric Dumazet <eric.dumazet@...il.com>
--
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