Linux 2.6.16.7
Subsystems (5)
We (the -stable team) are announcing the release of the 2.6.16.7 kernel.
The diffstat and short summary of the fixes are below.
I'll also be replying to this message with a copy of the patch between 2.6.16.6 and 2.6.16.7, as it is small enough to do so.
The updated 2.6.16.y git tree can be found at:
rsync://rsync.kernel.org/pub/scm/linux/kernel/git/stable/linux-2.6.16.y.git
and can be browsed at the normal kernel.org git web browser:
www.kernel.org/git/
Note, there seems to be a bit of a discrepancy in the assigning of CVE numbers to a specific issue that was solved in this release. The original author and I both asked for CVE numbers for different patches and seem to have gotten the same one. Please note that these are two different issues, yet, the same CVE number. Hopefully it gets fixed eventually for those who like to track these kinds of things...
thanks,
greg k-h
--------
Makefile | 2 +- mm/madvise.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-)
Summary of changes from v2.6.16.6 to v2.6.16.7
==============================================
Greg Kroah-Hartman:
Linux 2.6.16.7
Hugh Dickins:
fix MADV_REMOVE vulnerability (CVE-2006-1524 for real this time)
Makefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 16 -EXTRAVERSION = .6 +EXTRAVERSION = .7 NAME=Sliding Snow Leopard # *DOCUMENTATION*
mm/madvise.c +3 -0
@@ -168,6 +168,9 @@ static long madvise_remove(struct vm_arereturn -EINVAL ; } +if ((vma->vm_flags & (VM_SHARED |VM_WRITE )) != (VM_SHARED |VM_WRITE )) +return -EACCES ; + mapping = vma->vm_file->f_mapping; offset = (loff_t)(start - vma->vm_start)
Makefile line 4
Quoted 2 lines · Greg KH
Makefile +1
-1-EXTRAVERSION = .6 +EXTRAVERSION = .7
Hello, I would like to know if there is a plan to include this in the next -stable update?
Signature · 1 line
Alexander E. Patrakov
Quoted 8 lines · Alexander E. Patrakov
Makefile line 4
Quoted 2 lines · Greg KH
Makefile +1
-1-EXTRAVERSION = .6 +EXTRAVERSION = .7Hello, I would like to know if there is a plan to include this in the next -stable update?
No one has submitted it to the [email protected] mail address from what I can see, so no, it is not in the queue. If you think otherwise, please send it.
thanks,
greg k-h
Quoted 7 lines
No one has submitted it to the [email protected] mail address from what I can see, so no, it is not in the queue. If you think otherwise, please send it.
thanks,
greg k-h
I thought the 2.6.xx.n series was the 'stable' (as per kernel.org)?
Nick
Quoted 9 lines · Nick Warne
Quoted 7 lines
No one has submitted it to the [email protected] mail address from what I can see, so no, it is not in the queue. If you think otherwise, please send it.
thanks,
greg k-h
I thought the 2.6.xx.n series was the 'stable' (as per kernel.org)?
Yes it is. Did I say otherwise in those sentences?
thanks,
greg k-h
Quoted 12 lines · Greg KH
Quoted 9 lines · Nick Warne
Quoted 7 lines
No one has submitted it to the [email protected] mail address from what I can see, so no, it is not in the queue. If you think otherwise, please send it.
thanks,
greg k-h
I thought the 2.6.xx.n series was the 'stable' (as per kernel.org)?
Yes it is. Did I say otherwise in those sentences?
Quoted 6 lines · I see... Alexander
Quoted 2 lines · Greg KH
-EXTRAVERSION= .6
+EXTRAVERSION = .7Hello, I would like to know if there is a plan to include this in the next -stable update?
I misread the ref. to the different link/patch referred too...
Sorry for the noise.
Nick
Signature · 2 lines
"Person who say it cannot be done should not interrupt person doing it." -Chinese Proverb
Quoted 10 lines · Greg KH
Quoted 8 lines · Alexander E. Patrakov
Review
Quoted 3 lines · Greg KH
(quoted diff) +1
-1-EXTRAVERSION = .6 +EXTRAVERSION = .7Hello, I would like to know if there is a plan to include this in the next -stable update?
Quoted 7 lines
No one has submitted it to the [email protected] mail address from what I can see, so no, it is not in the queue. If you think otherwise, please send it.
Without that patch, there is a race when registering network interfaces and renaming it with udev rules, because initially the "address" in sysfs doesn't contain useful data. See http://marc.theaimsgroup.com/?t=114460338900002&r=1&w=2
Breaking the recommended way of assigning persistent network interface names is, IMHO, a bug serious enough to be fixed in -stable.
---
net/core/dev.c +0 -0
@@ -2932,11 +2932,11 @@
switch(dev->reg_state) {
case NETREG_REGISTERING:
+ dev->reg_state = NETREG_REGISTERED;
err = netdev_register_sysfs(dev);
if (err)
printk(KERN_ERR "%s: failed sysfs registration (%d)\n",
dev->name, err);
- dev->reg_state = NETREG_REGISTERED;
break;
case NETREG_UNREGISTERING:Signature · 1 line
Alexander E. Patrakov
David S. Miller
maintainerFrom: "Alexander E. Patrakov" <[email protected]>
Date: Wed, 19 Apr 2006 10:22:39 +0600
Quoted 9 lines
Without that patch, there is a race when registering network interfaces and renaming it with udev rules, because initially the "address" in sysfs doesn't contain useful data. See
http://marc.theaimsgroup.com/?t=114460338900002&r=1&w=2Breaking the recommended way of assigning persistent network interface names is, IMHO, a bug serious enough to be fixed in -stable.
Signed-off-by Alexander E. Patrakov <[email protected]>
I've been waiting to see if there is any negative fallout from this change, but I guess it's OK for stable.
Greg KH
AppliedQuoted 8 lines · David S. Miller
From: "Alexander E. Patrakov" <[email protected]>
Date: Wed, 19 Apr 2006 10:22:39 +0600Quoted 5 lines
Without that patch, there is a race when registering network interfaces and renaming it with udev rules, because initially the "address" in sysfs doesn't contain useful data. See
http://marc.theaimsgroup.com/?t=114460338900002&r=1&w=2
Quoted 7 lines
Quoted 4 lines
Breaking the recommended way of assigning persistent network interface names is, IMHO, a bug serious enough to be fixed in -stable.
Signed-off-by Alexander E. Patrakov <[email protected]>I've been waiting to see if there is any negative fallout from this change, but I guess it's OK for stable.
Thanks for the ack.
Queued to -stable, thanks.
greg k-h
Hotplug race on name change
In reply to Alexander E. PatrakovThis:
Quoted 17 lines
Without that patch, there is a race when registering network interfaces and renaming it with udev rules, because initially the "address" in sysfs doesn't contain useful data. See
http://marc.theaimsgroup.com/?t=114460338900002&r=1&w=2Breaking the recommended way of assigning persistent network interface names is, IMHO, a bug serious enough to be fixed in -stable.
Signed-off-by Alexander E. Patrakov <[email protected]>---
net/core/dev.c +0
-0@@ -2932,11 +2932,11 @@switch (dev->reg_state) {
net/core/dev.c line 2942
Quoted 10 lines
net/core/dev.c +1
-1case NETREG_REGISTERING : + dev->reg_state =NETREG_REGISTERED ; err =netdev_register_sysfs (dev);if (err)printk (KERN_ERR "%s: failed sysfs registration (%d)\n" , dev->name, err); - dev->reg_state =NETREG_REGISTERED ;break ;case NETREG_UNREGISTERING :
Introduces new races in netdev_register_sysfs if the name changes, because netdev_register_sysfs runs without RTNL at this point. So if some application gets in and changes the device name while netdev_register_sysfs is running, then the class_dev->class_id would end up not matching the netdevice->name.
Not a big issue since, hotplug doesn't get run until the device is registered. Ideally, it would be possible to create the groups in the class device before it was registered. It won't work with existing class device interface.
I am working on a patch to extend class_device to allow the creation of groups to be atomic (like the attributes are).
Re: Hotplug race on name change
Quoted 5 lines · Stephen Hemminger
Introduces new races in
netdev_register_sysfsif the name changes, becausenetdev_register_sysfsruns without RTNL at this point. So if some application gets in and changes the device name whilenetdev_register_sysfsis running, then theclass_dev->class_idwould end up not matching thenetdevice->name.
Indeed. It also seems to be possible now for someone to do an unregister_netdevice while netdev_register_sysfs is still going.
Cheers,
Signature · 4 lines
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txtPATCH 1/1 netdev: hotplug napi race cleanup
This follows after the earlier two patches.
Change the initialization of the class device portion of the net device to be done earlier, so that any races before registration completes are harmless. Add a mutex to avoid changes to netdevice during the class device registration.
net/core/dev.c +9 -2
@@ -203,10 +203,12 @@#ifdef CONFIG_SYSFS extern int netdev_sysfs_init (void ); -extern int netdev_register_sysfs (struct net_device *); -extern void netdev_unregister_sysfs (struct net_device *); +extern void netdev_init_classdev (struct net_device *); +#define netdev_register_sysfs (dev) class_device_add(&(dev->class_dev)) +#define netdev_unregister_sysfs (dev) class_device_del(&(dev->class_dev))#else #define netdev_sysfs_init () (0) +#define netdev_init_classdev (dev) do { } while(0)#define netdev_register_sysfs (dev) (0)#define netdev_unregister_sysfs (dev) do { } while(0)#endif
@@ -2870,6 +2872,8 @@set_bit (__LINK_STATE_PRESENT, &dev->state); +netdev_init_classdev (dev); + dev->next =NULL ;dev_init_scheduler (dev);write_lock_bh (&dev_base_lock);
@@ -3047,7 +3051,10 @@* this is a delayed call after register_netdevice * so no way to tell device driver what is wrong. */ +rtnl_lock (); err =netdev_register_sysfs (dev); +__rtnl_unlock (); +if (err) {printk (KERN_ERR "%s: failed sysfs registration (%d)\n" , dev->name, err);
net/core/net-sysfs.c +2 -9
@@ -443,13 +443,8 @@#endif }; -void netdev_unregister_sysfs (struct net_device * net) -{ -class_device_del (&(net->class_dev)); -} - -/* Create sysfs entries for network device. */ -int netdev_register_sysfs (struct net_device *net) +/* Setup class device */ +void netdev_init_classdev (struct net_device *net) {struct class_device *class_dev = &(net->class_dev);struct attribute_group **groups = net->sysfs_groups;
@@ -470,8 +465,6 @@ || (net->wireless_handlers && net->wireless_handlers->get_wireless_stats)) *groups++ = &wireless_group;#endif - -return class_device_add (class_dev); }int netdev_sysfs_init (void )
Re: [PATCH] netdev: hotplug napi race cleanup
Quoted 8 lines · Stephen Hemminger
This follows after the earlier two patches.
Change the initialization of the class device portion of the net device to be done earlier, so that any races before registration completes are harmless. Add a mutex to avoid changes to netdevice during the class device registration.
I had to fix up a reject in here.
net/core/dev.c line 3060
Quoted 11 lines
net/core/dev.c +3
-0@@ -3047,7 +3051,10 @@* this is a delayed call after register_netdevice * so no way to tell device driver what is wrong. */ +rtnl_lock (); err =netdev_register_sysfs (dev); +__rtnl_unlock (); +if (err) {printk (KERN_ERR "%s: failed sysfs registration (%d)\n" , dev->name, err);
bix:/usr/src/25> grep 'this is a delayed call after' net/core/*.c patches/*.patch bix:/usr/src/25>
I cannot find that comment anywhere.
David S. Miller
maintainerRe: [PATCH] netdev: hotplug napi race cleanup
In reply to Stephen HemmingerFrom: Stephen Hemminger <[email protected]>
Date: Mon, 24 Apr 2006 15:23:41 -0700
Quoted 8 lines
This follows after the earlier two patches.
Change the initialization of the class device portion of the net device to be done earlier, so that any races before registration completes are harmless. Add a mutex to avoid changes to netdevice during the class device registration.
Signed-off-by Stephen Hemminger <[email protected]>
Once Greg KH puts in the necessary infrastructure patches, I'll put this one in too.
David S. Miller
maintainerRe: [PATCH] netdev: hotplug napi race cleanup
In reply to Stephen HemmingerFrom: Stephen Hemminger <[email protected]>
Date: Mon, 24 Apr 2006 15:23:41 -0700
Quoted 8 lines
This follows after the earlier two patches.
Change the initialization of the class device portion of the net device to be done earlier, so that any races before registration completes are harmless. Add a mutex to avoid changes to netdevice during the class device registration.
Signed-off-by Stephen Hemminger <[email protected]>
I'm not going to apply this patch and instead request that we think about why this problem exists in the first place.
This patch is even stronger evidence that doing the sysfs registry in the todo list processing is wrong. If you can legally do this while holding the rtnl semaphore, you can just as equally do it inside of register_netdevice() which is where it truly belongs.
Then you can handle errors properly, unwind the state, and return the error to the caller instead of just losing the error and leaving the device in a half-registered state.
Re: [PATCH] netdev: hotplug napi race cleanup
Quoted 15 lines · On Sat, 06 May 2006 18:09:47 -0700 (PDT) "David S. Miller"…
From: Stephen Hemminger <[email protected]>
Date: Mon, 24 Apr 2006 15:23:41 -0700Quoted 8 lines
This follows after the earlier two patches.
Change the initialization of the class device portion of the net device to be done earlier, so that any races before registration completes are harmless. Add a mutex to avoid changes to netdevice during the class device registration.
Signed-off-by Stephen Hemminger <[email protected]>I'm not going to apply this patch and instead request that we think about why this problem exists in the first place.
Quoted 8 lines
This patch is even stronger evidence that doing the sysfs registry in the todo list processing is wrong. If you can legally do this while holding the rtnl semaphore, you can just as equally do it inside of
register_netdevice()which is where it truly belongs.Then you can handle errors properly, unwind the state, and return the error to the caller instead of just losing the error and leaving the device in a half-registered state.
The issue is are there network devices that can't sleep during register_netdevice?
David S. Miller
maintainerRe: [PATCH] netdev: hotplug napi race cleanup
From: Stephen Hemminger <[email protected]>
Date: Mon, 8 May 2006 09:54:58 -0700
Quoted 2 lines
The issue is are there network devices that can't sleep during
register_netdevice?
Oh right, I forgot about that.
Re: [PATCH] netdev: hotplug napi race cleanup
Quoted 7 lines · On Mon, 08 May 2006 11:37:31 -0700 (PDT) "David S. Miller"…
From: Stephen Hemminger <[email protected]>
Date: Mon, 8 May 2006 09:54:58 -0700Quoted 2 lines
The issue is are there network devices that can't sleep during
register_netdevice?Oh right, I forgot about that.
We could do something like this in register_netdevice()
if (in_atomic() || irqs_disabled())
net_set_todo(dev);
else {
dev->reg_state = NETREG_REGISTERED;
ret = netdev_register_sysfs(dev);
if (ret) {
...
}It seems a bit grotty, and might cause pain later.