aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2005-11-04 05:18:40 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-08 20:57:30 -0500
commit330d57fb98a916fa8e1363846540dd420e99499a (patch)
tree841d5e5eeda46fd95ac03c36964919818a9bc3a6 /arch
parent8546df6f357dadf1989ad8da9309c9524fd56cdf (diff)
[PATCH] Fix sysctl unregistration oops (CVE-2005-2709)
You could open the /proc/sys/net/ipv4/conf/<if>/<whatever> file, then wait for interface to go away, try to grab as much memory as possible in hope to hit the (kfreed) ctl_table. Then fill it with pointers to your function. Then do read from file you've opened and if you are lucky, you'll get it called as ->proc_handler() in kernel mode. So this is at least an Oops and possibly more. It does depend on an interface going away though, so less of a security risk than it would otherwise be. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/s390/appldata/appldata_base.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c
index c9f2f60cfa58..dee6ab54984d 100644
--- a/arch/s390/appldata/appldata_base.c
+++ b/arch/s390/appldata/appldata_base.c
@@ -592,12 +592,15 @@ int appldata_register_ops(struct appldata_ops *ops)
592 */ 592 */
593void appldata_unregister_ops(struct appldata_ops *ops) 593void appldata_unregister_ops(struct appldata_ops *ops)
594{ 594{
595 void *table;
595 spin_lock(&appldata_ops_lock); 596 spin_lock(&appldata_ops_lock);
596 unregister_sysctl_table(ops->sysctl_header);
597 list_del(&ops->list); 597 list_del(&ops->list);
598 kfree(ops->ctl_table); 598 /* at that point any incoming access will fail */
599 table = ops->ctl_table;
599 ops->ctl_table = NULL; 600 ops->ctl_table = NULL;
600 spin_unlock(&appldata_ops_lock); 601 spin_unlock(&appldata_ops_lock);
602 unregister_sysctl_table(ops->sysctl_header);
603 kfree(table);
601 P_INFO("%s-ops unregistered!\n", ops->name); 604 P_INFO("%s-ops unregistered!\n", ops->name);
602} 605}
603/********************** module-ops management <END> **************************/ 606/********************** module-ops management <END> **************************/