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

Jori Koolstra <[email protected]>
Newsgroups org.kernel.vger.linux-fsdevel,org.kernel.vger.bpf,org.kernel.vger.stable,org.kvack.linux-mm
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.