mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Pascal Cuoq <cuoq@trust-in-soft.com>
To: "musl@lists.openwall.com" <musl@lists.openwall.com>
Subject: Re: musl's putenv makes assumptions about memcmp
Date: Mon, 21 Aug 2017 12:38:14 +0000	[thread overview]
Message-ID: <033E85D4-1611-42A8-95D3-76157D18749B@trust-in-soft.com> (raw)
In-Reply-To: <alpine.LNX.2.20.13.1708211101480.10181@monopod.intra.ispras.ru>

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

Hello Alexander,

Thanks for this pointer. This UB and a similar one in putenv were going to be our next report:

unsetenv:
* rewrite; this fixes UB caused by testing a free'd pointer against
  NULL on entry to subsequent loops.

In the version after your patch, we do not detect any undefined behavior with TIS Interpreter, for the tests we have (libc-testsuite plus one additional test that we wrote to make TIS Interpreter confirm the misuse of memcmp in putenv).

Pascal

On 21 Aug 2017, at 10:02, Alexander Monakov <amonakov@ispras.ru<mailto:amonakov@ispras.ru>> wrote:

*env functions have multiple issues including other UB and a memory leak.

http://openwall.com/lists/musl/2016/03/13/7

Alexander


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

      reply	other threads:[~2017-08-21 12:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-21  5:50 Pascal Cuoq
2017-08-21  8:02 ` Alexander Monakov
2017-08-21 12:38   ` Pascal Cuoq [this message]

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=033E85D4-1611-42A8-95D3-76157D18749B@trust-in-soft.com \
    --to=cuoq@trust-in-soft.com \
    --cc=musl@lists.openwall.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.
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).