lkml.org 
[lkml]   [2021]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] printk: fix string termination for record_print_text()
On Sun 2021-01-24 21:33:28, John Ogness wrote:
> Commit f0e386ee0c0b ("printk: fix buffer overflow potential for
> print_text()") added string termination in record_print_text().
> However it used the wrong base pointer for adding the terminator.
> This led to a 0-byte being written somewhere beyond the buffer.
>
> Use the correct base pointer when adding the terminator.
>
> Fixes: f0e386ee0c0b ("printk: fix buffer overflow potential for print_text()")
> Reported-by: Sven Schnelle <svens@linux.ibm.com>
> Signed-off-by: John Ogness <john.ogness@linutronix.de>

The patch is pushed in kernel/printk.git, branch printk-rework.

I am going to send pull request for-5.11 later today.

Thanks a lot for the debugging and quick fix. I feel shame that
I did not caught this during the review.

Best Regards,
Petr

\
 
 \ /
  Last update: 2021-01-26 20:43    [W:0.033 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site