[Cent OS 4.3] Bug in do_execve().

From: Tetsuo Handa
Date: Mon Apr 10 2006 - 06:43:32 EST


Hello.

Kernel 2.6.9 has a bug that forgets to undo open_exec() in do_execve().
This bug was fixed in 2.6.10.

I noticed this bug remains in kernel-2.6.9-34.EL.src.rpm for Cent OS.
Distributors who use 2.6.9-based kernels, please check this.

---------- Start of patch ----------
--- before/exec.c 2006-04-10 11:34:58.000000000 +0900
+++ after/exec.c 2006-04-10 13:04:51.000000000 +0900
@@ -1168,8 +1168,11 @@ int do_execve(char * filename,

retval = -ENOMEM;
bprm = kmalloc(sizeof(*bprm), GFP_KERNEL);
- if (!bprm)
+ if (!bprm) {
+ allow_write_access(file);
+ fput(file);
goto out_ret;
+ }
memset(bprm, 0, sizeof(*bprm));

bprm->p = PAGE_SIZE*MAX_ARG_PAGES-sizeof(void *);
---------- End of patch ----------

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