Commit 722c4748 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] do_brk() bounds checking

check that the brk value lies in bounds.
parent fa7cccc7
......@@ -1269,6 +1269,9 @@ unsigned long do_brk(unsigned long addr, unsigned long len)
if (!len)
return addr;
if ((addr + len) > TASK_SIZE || (addr + len) < addr)
return -EINVAL;
/*
* mlock MCL_FUTURE?
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment