--- linux-2.5-orig/fs/binfmt_elf.c 2003-10-16 13:35:24.000000000 -0500 +++ linux-2.5/fs/binfmt_elf.c 2003-10-16 15:23:34.000000000 -0500 @@ -602,6 +602,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);