[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20150608.121534.1373441017651672686.davem@davemloft.net>
Date: Mon, 08 Jun 2015 12:15:34 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: rshearma@...cade.com
Cc: netdev@...r.kernel.org, kuznet@....inr.ac.ru, jmorris@...ei.org,
yoshfuji@...ux-ipv6.org, kaber@...sh.net
Subject: Re: [PATCH net] ipv6: fix possible use after free of dev stats
From: Robert Shearman <rshearma@...cade.com>
Date: Fri, 5 Jun 2015 18:51:54 +0100
> The memory pointed to by idev->stats.icmpv6msgdev,
> idev->stats.icmpv6dev and idev->stats.ipv6 can each be used in an RCU
> read context without taking a reference on idev. For example, through
> IP6_*_STATS_* calls in ip6_rcv. These memory blocks are freed without
> waiting for an RCU grace period to elapse. This could lead to the
> memory being written to after it has been freed.
>
> Fix this by using call_rcu to free the memory used for stats, as well
> as idev after an RCU grace period has elapsed.
>
> Signed-off-by: Robert Shearman <rshearma@...cade.com>
Applied.
--
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