mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org, Bastian Krause <bst@pengutronix.de>
Subject: Re: [PATCH v2 3/3] console: fix out-of-bounds read in dputc(/dev/*, ...)
Date: Fri, 23 Aug 2019 09:07:36 +0200	[thread overview]
Message-ID: <20190823070736.mx3z4hkbhaoezvtg@pengutronix.de> (raw)
In-Reply-To: <c306a487-96b7-dee0-8ade-6e896967057d@pengutronix.de>

On Thu, Aug 22, 2019 at 09:06:09AM +0200, Ahmad Fatoum wrote:
> Hello Sascha,
> 
> On 7/31/19 12:21 PM, Ahmad Fatoum wrote:
> > Trying to output a single character via
> > 	echo -a /dev/serial0-1
> > currently results in garbage output after the newline, because console.c's
> > fops_write discards the buffer length and passes the buffer to
> > (struct cdev)::puts which only handles NUL-terminated strings.
> > 
> > Fix this by amending (struct cdev)::puts with a new nbytes parameter,
> > which is correctly propagated.
> 
> Can this one be merged? It doesn;t depend on the other two patches.

Ok. Can you rebase it? Without the others it doesn't seem to apply.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2019-08-23  7:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-31 10:21 [PATCH v2 1/3] console: don't count newlines twice in bytes written Ahmad Fatoum
2019-07-31 10:21 ` [PATCH v2 2/3] ratp: return 0 bytes written from puts if busy Ahmad Fatoum
2019-08-05  8:59   ` Sascha Hauer
2019-08-22  6:57     ` Ahmad Fatoum
2019-07-31 10:21 ` [PATCH v2 3/3] console: fix out-of-bounds read in dputc(/dev/*, ...) Ahmad Fatoum
2019-08-22  7:06   ` Ahmad Fatoum
2019-08-23  7:07     ` Sascha Hauer [this message]
2019-08-23  9:28       ` Ahmad Fatoum
2019-08-05  9:11 ` [PATCH v2 1/3] console: don't count newlines twice in bytes written Sascha Hauer
2019-08-22  7:04   ` Ahmad Fatoum
2019-08-22  8:16     ` Ahmad Fatoum

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=20190823070736.mx3z4hkbhaoezvtg@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=bst@pengutronix.de \
    /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