mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Anuraag Agrawal <anuraaga@gmail.com>
To: Markus Wichmann <nullplan@gmx.net>
Cc: musl@lists.openwall.com
Subject: Re: [musl] Large overflow in __intscan ignored
Date: Sat, 2 Dec 2023 10:42:11 +0900	[thread overview]
Message-ID: <CAOWvS+2BrX2qM+JwSYO-hGbSFJ8Dbkjg_ef3nfboc8c5Q=UmgQ@mail.gmail.com> (raw)
In-Reply-To: <ZWoIGGT49V-21l0d@voyager>

[-- Attachment #1: Type: text/plain, Size: 920 bytes --]

Hello,

Thanks for checking and very sorry for the noise, I didn't read the loop
condition correctly. I am using Webassembly so the issue must be specific
to it somehow. I will report on wasi-libc to follow up.

Thanks,

On Sat, Dec 2, 2023, 01:21 Markus Wichmann <nullplan@gmx.net> wrote:

> Am Fri, Dec 01, 2023 at 02:08:54PM +0900 schrieb Anuraag Agrawal:
> > Currently, __intscan, used by functions like strtol, does not seem to
> check
> > for overflow during multiplication.
> >
> > https://git.musl-libc.org/cgit/musl/tree/src/internal/intscan.c#n69
> >
>
> There is no multiplication in the referenced line. Assuming you mean the
> one above it, the loop condition checks that neither the multiplication
> nor the addition can overflow. The same holds for the loop on lines 79f.
>
> As far as I can tell, this has been the case since the first version of
> this code was checked in in 2012.
>
> Ciao,
> Markus
>

[-- Attachment #2: Type: text/html, Size: 1462 bytes --]

  reply	other threads:[~2023-12-02  1:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-01  5:08 Anuraag Agrawal
2023-12-01  5:14 ` [musl] " Anuraag Agrawal
2023-12-01 15:52   ` Rich Felker
2023-12-01 16:21 ` [musl] " Markus Wichmann
2023-12-02  1:42   ` Anuraag Agrawal [this message]
2023-12-02  8:48     ` Markus Wichmann
2023-12-02 16:29       ` Rich Felker
2024-02-26  1:30         ` Rich Felker

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='CAOWvS+2BrX2qM+JwSYO-hGbSFJ8Dbkjg_ef3nfboc8c5Q=UmgQ@mail.gmail.com' \
    --to=anuraaga@gmail.com \
    --cc=musl@lists.openwall.com \
    --cc=nullplan@gmx.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).