Lost rtnl_unlock() in vlan_ioctl()
Subsystems (2)
PATCH 1/1 Lost rtnl_unlock() in vlan_ioctl()
The SET_VLAN_NAME_TYPE_CMD command w/o CAP_NET_ADMIN capability doesn't release the rtnl lock.
---
net/8021q/vlan.c +1 -1
@@ -776,7 +776,7 @@ static int vlan_ioctl_handler(struct net *net, void __user *arg)case SET_VLAN_NAME_TYPE_CMD : err = -EPERM ;if (!capable (CAP_NET_ADMIN )) -return -EPERM ; +break ;if ((args.u.name_type >=0 ) && (args.u.name_type <VLAN_NAME_TYPE_HIGHEST )) { vlan_name_type = args.u.name_type;
Quoted 2 lines · Pavel Emelyanov
The
SET_VLAN_NAME_TYPE_CMDcommand w/oCAP_NET_ADMINcapability doesn't release the rtnl lock.
Thanks Pavel. I somehow recall that we already fixed this one, but can't find the patch :) Dave, please apply.
David Miller
maintainerFrom: Patrick McHardy <[email protected]>
Date: Thu, 06 Dec 2007 14:59:24 +0100
Quoted 7 lines
Quoted 2 lines · Pavel Emelyanov
The
SET_VLAN_NAME_TYPE_CMDcommand w/oCAP_NET_ADMINcapability doesn't release the rtnl lock.Thanks Pavel. I somehow recall that we already fixed this one, but can't find the patch :) Dave, please apply.
I think we even added this bug to -stable, or something like that, didn't we? Yikes...
Quoted 4 lines · David Miller
From: Patrick McHardy <[email protected]>
Date: Thu, 06 Dec 2007 14:59:24 +0100Quoted 1 line
Pavel Emelyanov wrote:
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
The
SET_VLAN_NAME_TYPE_CMDcommand w/oCAP_NET_ADMINcapability doesn't release the rtnl lock.Thanks Pavel. I somehow recall that we already fixed this one, but can't find the patch :) Dave, please apply.
I think we even added this bug to -stable, or something like that, didn't we? Yikes...
No, I mixed those two patches up as well. The bug was introduced with the vlan_netlink stuff, the -stable patch fixed an invalid return value, but still properly dropped the lock.
This patch should of course go in -stable anyway.
David Miller
maintainerFrom: Patrick McHardy <[email protected]>
Date: Thu, 06 Dec 2007 14:59:24 +0100
Quoted 7 lines
Quoted 2 lines · Pavel Emelyanov
The
SET_VLAN_NAME_TYPE_CMDcommand w/oCAP_NET_ADMINcapability doesn't release the rtnl lock.Thanks Pavel. I somehow recall that we already fixed this one, but can't find the patch :) Dave, please apply.
Applied and I'll push to -stable once Linus pulls it in.