Re: RFC: printk: kmsg_dump_get_line_nolock() buffer overflow

2021-01-14 Thread Petr Mladek
On Thu 2021-01-14 17:06:59, John Ogness wrote: > On 2021-01-14, Petr Mladek wrote: > > It is pitty that I have missed this. I remember that I discussed > > exactly this problem before, see > > https://lore.kernel.org/lkml/20190710080402.ab3f4qfnvez6d...@axis.com/ > > > > And I did exactly the same

Re: RFC: printk: kmsg_dump_get_line_nolock() buffer overflow

2021-01-14 Thread John Ogness
On 2021-01-14, Petr Mladek wrote: > It is pitty that I have missed this. I remember that I discussed > exactly this problem before, see > https://lore.kernel.org/lkml/20190710080402.ab3f4qfnvez6d...@axis.com/ > > And I did exactly the same mistake. I have missed the two users in > "arch/powerpc" a

Re: RFC: printk: kmsg_dump_get_line_nolock() buffer overflow

2021-01-14 Thread Petr Mladek
On Wed 2021-01-13 21:06:28, John Ogness wrote: > Hello, > > I have discovered that kmsg_dump_get_line_nolock() is not allowed to > fill the full buffer that it is provided. It should leave at least 1 > byte free so that callers can append a terminator. > > Example from arch/powerpc/xmon/xmon.c: >