Re: [PATCH] binfmt_elf_fdpic: only honour the first PT_INTERP

Jori Koolstra <[email protected]> Tue, 4 Aug 2026 15:56:57 +0200 (CEST)
Newsgroups gmane.linux.file-systems,gmane.linux.kernel.bpf,gmane.linux.kernel.mm,gmane.linux.kernel.stable
Message-ID <[email protected]>
> Op 04-08-2026 15:42 CEST schreef Daniel Palmer <[email protected]>:
> 
>  
> Hi,
> 
> Sorry if I messed this up. First time replying via git.
> 
> >Afaict, currently read_code() may blow past what vm_mmap() allocated
> >there, which may result in memory corruption for a non MMU system.
> 
> I ran Fable on all of the "nommu files" and it found the issue this
> commit fixes and the above issue,
> I sent a patch (co-written with fable) and we proved this is an actual
> issue on nommu via a reproducer tested on a real system.
> 
> https://lore.kernel.org/all/[email protected]/
> 
> Thanks,
> 
> Daniel

Charlie Mirabile made a good point to me about this, namely that on a no MMU
systems, if a malicious elf can run, you are basically screwed any way since
there isn't really any memory protection. I don't know how much worse it is here
that you can corrupt memory, given that this already assumes a malicious elf. But
I don't know if no MMU has any other protection that would make this patch useful.

Thanks,
Jori.