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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Wed, 24 Nov 2010 16:35:41 +0100
From:	Anders Franzen <>
To:	<>
CC:	<>, <>,
	<>, Anders Franzen <>
Subject: [PATCH] the macvlan device causes SLAB corruption on network namespace exit.

When doing exit from a network namespace, cleanup functions are executed from
the function default_device_exit_batch.
In the macvlan device, this will generate a call to macvlan_dellink.
If it is the last macvlan using a ''lowerdev'' the port is

Later the a call to macvlan_stop is executed. when the macvlan_hash_del(vlan) is
executed, the memory of the already freed port will be corrupted.

Signed-off-by: Anders Franzen <>
 drivers/net/macvlan.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 6ed577b..c1cddb6 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -338,7 +338,9 @@ static int macvlan_stop(struct net_device *dev)
 	dev_uc_del(lowerdev, dev->dev_addr);
-	macvlan_hash_del(vlan);
+	if (macvlan_port_exists(lowerdev))
+		macvlan_hash_del(vlan);
 	return 0;

To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists