patch-2.4.25 linux-2.4.25/fs/binfmt_elf.c
Next file: linux-2.4.25/fs/buffer.c
Previous file: linux-2.4.25/fs/Makefile
Back to the patch index
Back to the overall index
-  Lines: 11
 -  Date:
2004-02-18 05:36:31.000000000 -0800
 -  Orig file: 
linux-2.4.24/fs/binfmt_elf.c
 -  Orig date: 
2003-11-28 10:26:21.000000000 -0800
 
diff -urN linux-2.4.24/fs/binfmt_elf.c linux-2.4.25/fs/binfmt_elf.c
@@ -577,6 +577,10 @@
 			// printk(KERN_WARNING "ELF: Ambiguous type, using ELF\n");
 			interpreter_type = INTERPRETER_ELF;
 		}
+		/* Verify the interpreter has a valid arch */
+		if ((interpreter_type == INTERPRETER_ELF) &&
+		    !elf_check_arch(&interp_elf_ex))
+			goto out_free_dentry;
 	} else {
 		/* Executables without an interpreter also need a personality  */
 		SET_PERSONALITY(elf_ex, ibcs2_interpreter);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)