Re: [PATCH] module: .strtab must be null terminated

2024-10-21 Thread Luis Chamberlain
On Sat, Oct 19, 2024 at 04:14:40PM +0200, Tobias Stoeckmann wrote: > The string table must be NUL-terminated, just like the section name table. > > Signed-off-by: Tobias Stoeckmann > --- > In order to create a proof of concept, which I can't get into a simple > script right now, it's easiest to m

Re: [PATCH] module: .strtab must be null terminated

2024-10-19 Thread Alexey Dobriyan
> + strhdr = &info->sechdrs[info->index.str]; > + if (strhdr->sh_size > 0 && info->strtab[strhdr->sh_size - 1] != '\0') { > + pr_err("module %s: string table isn't null terminated\n", > +info->name ?: "(missing .modinfo section or name > field)"); > +

[PATCH] module: .strtab must be null terminated

2024-10-19 Thread Tobias Stoeckmann
The string table must be NUL-terminated, just like the section name table. Signed-off-by: Tobias Stoeckmann --- In order to create a proof of concept, which I can't get into a simple script right now, it's easiest to move '.strtab' to the end of the module file, write as many 'A' characters at th