[PATCH (?)] Linux kernel local DoS

From: Piotr Wilkin (pwilkin@astercity.net)
Date: Wed Mar 29 2000 - 14:03:24 EST


I have made up this little patch to solve the recent "DOS" problem. If it
is incorrect, please tell me (preferrably also why, I'm not very skilled
in hacking the kernel):

--- slab_orig.c Wed Mar 29 21:00:23 2000
+++ slab.c Wed Mar 29 20:59:36 2000
@@ -1609,6 +1609,16 @@
                 return __kmem_cache_alloc(csizep->cs_cachep, flags);
         }
         printk(KERN_ERR "kmalloc: Size (%lu) too large\n", (unsigned long) size);
+ if (!in_interrupt())
+ {
+ struct siginfo info;
+ info.si_signo = SIGKILL;
+ info.si_errno = 0;
+ info.si_code = SI_KERNEL;
+ info.si_pid = 0;
+ info.si_uid = 0;
+ kill_something_info(SIGKILL, &info, current->pid);
+ }
         return NULL;
 }
 
Piotr Wilkin
pwilkin@astercity.net

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Mar 31 2000 - 21:00:25 EST