From: Sven Schnelle <svens@linux.ibm.com>
To: John Ogness <john.ogness@linutronix.de>
Cc: Petr Mladek <pmladek@suse.com>,
Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] printk: fix buffer overflow potential for print_text()
Date: Sun, 24 Jan 2021 09:59:21 +0100 [thread overview]
Message-ID: <yt9d1reayal2.fsf@linux.ibm.com> (raw)
In-Reply-To: <87k0s2n45n.fsf@jogness.linutronix.de> (John Ogness's message of "Sun, 24 Jan 2021 09:19:40 +0106")
John Ogness <john.ogness@linutronix.de> writes:
> Hi Sven,
>
> Thanks for the outstanding analysis!
>
> On 2021-01-23, Sven Schnelle <svens@linux.ibm.com> wrote:
>>> 1401 if (buf_size > 0)
>>> 1402 text[len] = 0;
>>
>> I don't think i have really understood how all the printk magic works,
>> but using r->text_buf[len] seems to be the correct place to put the
>> zero byte in that case?
>
> Yes, you are correct! @text is pointing to the beginning of the
> currently processed line, not the beginning of the buffer.
>
> I will submit a patch to fix our recent fix (unless you would like to do
> that).
Please go ahead, thank you!
next prev parent reply other threads:[~2021-01-24 9:01 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-14 17:04 [PATCH] printk: fix buffer overflow potential for print_text() John Ogness
2021-01-15 12:04 ` Petr Mladek
2021-01-15 12:07 ` Petr Mladek
2021-01-19 0:44 ` Sergey Senozhatsky
2021-01-19 8:54 ` John Ogness
2021-01-19 10:29 ` Sergey Senozhatsky
2021-01-19 11:44 ` John Ogness
2021-01-19 12:22 ` Petr Mladek
2021-01-19 11:20 ` Petr Mladek
2021-01-15 14:16 ` John Ogness
2021-01-15 16:04 ` Petr Mladek
2021-01-22 21:21 ` Sven Schnelle
2021-01-22 23:42 ` John Ogness
2021-01-23 21:18 ` Sven Schnelle
2021-01-23 21:41 ` Sven Schnelle
2021-01-24 8:13 ` John Ogness
2021-01-24 8:59 ` Sven Schnelle [this message]
2021-02-26 17:19 ` Alexander Gordeev
2021-02-26 17:39 ` John Ogness
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yt9d1reayal2.fsf@linux.ibm.com \
--to=svens@linux.ibm.com \
--cc=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky.work@gmail.com \
--cc=sergey.senozhatsky@gmail.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.