Re: [PATCH 0/5] kallsyms: make kallsym APIs more safe with scnprintf

2022-05-23 Thread Kees Cook
On Sat, May 21, 2022 at 11:07:52PM -0700, Christoph Hellwig wrote: > On Fri, May 20, 2022 at 02:06:56PM +0530, Maninder Singh wrote: > > kallsyms functionality depends on KSYM_NAME_LEN directly. > > but if user passed array length lesser than it, sprintf > > can cause issues of buffer overflow

Re: [PATCH 0/5] kallsyms: make kallsym APIs more safe with scnprintf

2022-05-22 Thread Christoph Hellwig
On Fri, May 20, 2022 at 02:06:56PM +0530, Maninder Singh wrote: > kallsyms functionality depends on KSYM_NAME_LEN directly. > but if user passed array length lesser than it, sprintf > can cause issues of buffer overflow attack. > > So changing *sprint* and *lookup* APIs in this patch set > to

[PATCH 0/5] kallsyms: make kallsym APIs more safe with scnprintf

2022-05-20 Thread Maninder Singh
kallsyms functionality depends on KSYM_NAME_LEN directly. but if user passed array length lesser than it, sprintf can cause issues of buffer overflow attack. So changing *sprint* and *lookup* APIs in this patch set to have buffer size as an argument and replacing sprintf with scnprintf. patch 1