Re: [PATCH 2/2] linux-user/gen-vdso: Don't write off the end of buf[]

2025-07-10 Thread Peter Maydell
On Thu, 10 Jul 2025 at 18:07, Peter Maydell wrote: > > In gen-vdso we load in a file and assume it's a valid ELF file. In > particular we assume it's big enough to be able to read the ELF > information in e_ident in the ELF header. > > Add a check that the total file length is at least big enough

Re: [PATCH 2/2] linux-user/gen-vdso: Don't write off the end of buf[]

2025-07-10 Thread Richard Henderson
On 7/10/25 11:07, Peter Maydell wrote: In gen-vdso we load in a file and assume it's a valid ELF file. In particular we assume it's big enough to be able to read the ELF information in e_ident in the ELF header. Add a check that the total file length is at least big enough for all the e_ident b

[PATCH 2/2] linux-user/gen-vdso: Don't write off the end of buf[]

2025-07-10 Thread Peter Maydell
In gen-vdso we load in a file and assume it's a valid ELF file. In particular we assume it's big enough to be able to read the ELF information in e_ident in the ELF header. Add a check that the total file length is at least big enough for all the e_ident bytes, which is good enough for the code i