: The ip6_fib_timer can work with garbage on net namespace stop.
Subsystems (3)
PATCH 1/1 : The ip6_fib_timer can work with garbage on net namespace stop.
The del_timer() function doesn't guarantee, that the timer callback is not active by the time it exits.
Thus, the fib6_net_exit() may kfree() all the data, that is required by the fib6_run_gc(). The race window is tiny, but slab poisoning can trigger this bug.
Using del_timer_sync() will cure this.
---
net/ipv6/ip6_fib.c +1 -1
@@ -1543,7 +1543,7 @@ out_timer:static void fib6_net_exit (struct net *net) {rt6_ifdown (net,NULL ); -del_timer (net->ipv6.ip6_fib_timer); +del_timer_sync (net->ipv6.ip6_fib_timer);kfree (net->ipv6.ip6_fib_timer);#ifdef CONFIG_IPV6_MULTIPLE_TABLES kfree (net->ipv6.fib6_local_tbl);
From: Pavel Emelyanov <[email protected]>
Date: Mon, 21 Apr 2008 17:05:50 +0400
Quoted 10 lines
The
del_timer()function doesn't guarantee, that the timer callback is not active by the time it exits.Thus, the
fib6_net_exit()maykfree()all the data, that is required by thefib6_run_gc(). The race window is tiny, but slab poisoning can trigger this bug.Using
del_timer_sync()will cure this.Signed-off-by Pavel Emelyanov <[email protected]>
Applied, thanks Pavel.
In article <[email protected]> (at Mon, 21 Apr 2008 17:05:50 +0400), Pavel Emelyanov <[email protected]> says:
Quoted 10 lines
The
del_timer()function doesn't guarantee, that the timer callback is not active by the time it exits.Thus, the
fib6_net_exit()maykfree()all the data, that is required by thefib6_run_gc(). The race window is tiny, but slab poisoning can trigger this bug.Using
del_timer_sync()will cure this.Signed-off-by Pavel Emelyanov <[email protected]>
Also suitable for -stable.
--yoshfuji
David Miller
maintainerFrom: YOSHIFUJI Hideaki / 吉藤英明 <[email protected]>
Date: Thu, 24 Apr 2008 01:14:06 +0900 (JST)
Quoted 9 lines
In article <[email protected]> (at Mon, 21 Apr 2008 17:05:50 +0400), Pavel Emelyanov <[email protected]> says:
Quoted 7 lines
The
del_timer()function doesn't guarantee, that the timer callback is not active by the time it exits.Thus, the
fib6_net_exit()maykfree()all the data, that is required by thefib6_run_gc(). The race window is tiny, but slab poisoning can trigger this bug.
Quoted 7 lines
Quoted 3 lines
Using
del_timer_sync()will cure this.Signed-off-by Pavel Emelyanov <[email protected]>Also suitable for -stable.
I will queue it, thanks.