public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Szabolcs Nagy via Libc-alpha <libc-alpha@sourceware.org>
Cc: Szabolcs Nagy <szabolcs.nagy@arm.com>
Subject: Re: [PATCH v2 1/4] Fix OOB read in stdlib thousand grouping parsing [BZ #29727]
Date: Wed, 02 Nov 2022 16:20:59 +0100	[thread overview]
Message-ID: <mvmv8nx757o.fsf@suse.de> (raw)
In-Reply-To: <ca35ce47afa4a6cb3674f38413061db7635a73ec.1666974807.git.szabolcs.nagy@arm.com> (Szabolcs Nagy via Libc-alpha's message of "Fri, 28 Oct 2022 17:39:57 +0100")

On Okt 28 2022, Szabolcs Nagy via Libc-alpha wrote:

> __correctly_grouped_prefixmb only worked with thousands_len == 1,
> otherwise it read past the end of cp or thousands.
>
> This affects scanf formats like %'d, %'f and the internal but
> exposed __strto{l,ul,f,d,..}_internal with grouping flag set
> and an LC_NUMERIC locale where thousands_len > 1.
>
> Avoid OOB access by considering thousands_len when initializing cp.
> This fixes bug 29727.
>
> Found by the morello port with strict bounds checking where
>
> FAIL: stdlib/tst-strtod4
> FAIL: stdlib/tst-strtod5i
>
> crashed using a locale with thousands_len==3.

Ok.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

  reply	other threads:[~2022-11-02 15:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-28 16:39 [PATCH v2 0/4] patches from the morello port Szabolcs Nagy
2022-10-28 16:39 ` [PATCH v2 1/4] Fix OOB read in stdlib thousand grouping parsing [BZ #29727] Szabolcs Nagy
2022-11-02 15:20   ` Andreas Schwab [this message]
2022-10-28 16:40 ` [PATCH v2 2/4] Fix off-by-one OOB write in iconv/tst-iconv-mt Szabolcs Nagy
2022-10-28 16:40 ` [PATCH v2 3/4] Fix elf/tst-dlmopen-twice not to exhaust static TLS Szabolcs Nagy
2022-10-28 17:04   ` Florian Weimer
2022-10-28 16:40 ` [PATCH v2 4/4] Remove unused scratch_buffer_dupfree Szabolcs Nagy
2022-10-28 17:06   ` Florian Weimer

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=mvmv8nx757o.fsf@suse.de \
    --to=schwab@suse.de \
    --cc=libc-alpha@sourceware.org \
    --cc=szabolcs.nagy@arm.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).