From: "Starke, Daniel" <daniel.starke@siemens.com>
To: Jiri Slaby <jirislaby@kernel.org>,
"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH 1/3] tty: n_gsm: fix buffer over-read in gsm_dlci_data()
Date: Mon, 9 May 2022 10:55:26 +0000 [thread overview]
Message-ID: <DB9PR10MB58811C7FBE7EB0600151A6D8E0C69@DB9PR10MB5881.EURPRD10.PROD.OUTLOOK.COM> (raw)
> On 04. 05. 22, 10:17, D. Starke wrote:
> > From: Daniel Starke <daniel.starke@siemens.com>
> >
> > 'len' is decreased after each octet that has its EA bit set to 0,
> > which means that the value is encoded with additional octets. However,
> > the final octet does not decreases 'len' which results in 'len' being
> > one byte too long. A buffer over-read may occur in
> > tty_insert_flip_string() as it tries to read one byte more than the passed content size of 'data'.
> > Decrease 'len' also for the final octet which has the EA bit set to 1
> > to write the correct number of bytes from the internal receive buffer
> > to the virtual tty.
> >
> > Fixes: 2e124b4a390c ("TTY: switch tty_flip_buffer_push")
>
> That commit barely introduced the problem.
You are right. It was introduced in
commit e1eaea46bb40 ("tty: n_gsm line discipline")
This patch was already included in the tty-linus branch. Shall I resubmit it nevertheless?
Best regards,
Daniel Starke
next reply other threads:[~2022-05-09 10:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-09 10:55 Starke, Daniel [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-05-04 8:17 D. Starke
2022-05-09 10:41 ` Jiri Slaby
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=DB9PR10MB58811C7FBE7EB0600151A6D8E0C69@DB9PR10MB5881.EURPRD10.PROD.OUTLOOK.COM \
--to=daniel.starke@siemens.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®