diff --git a/kernel/sys.c b/kernel/sys.c index 54f20fdee93c300a57556e004ffbf7f0b5e83cff..19a2c7139960c174a953560173fb778f0e67378f 100644 --- a/kernel/sys.c +++ b/kernel/sys.c @@ -1869,7 +1869,7 @@ static int prctl_set_mm(int opt, unsigned long addr, if (opt == PR_SET_MM_EXE_FILE) return prctl_set_mm_exe_file(mm, (unsigned int)addr); - if (addr >= TASK_SIZE) + if (addr >= TASK_SIZE || addr < mmap_min_addr) return -EINVAL; error = -EINVAL;