All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anton Ivanov <anton.ivanov@cambridgegreys.com>
To: linux-um <linux-um@lists.infradead.org>, ",richard"@nod.at
Subject: We may want to redefine asprint and vasprintf in the user headers
Date: Fri, 13 Nov 2020 09:42:32 +0000	[thread overview]
Message-ID: <85e05ffa-d539-b2a9-6e4f-2cc11f49beec@cambridgegreys.com> (raw)

Summary - we cannot use asprintf on the user side.

The use of asprintf in umid.c resulted in slab memory corruption.

In most cases it is harmless - just dumping a backtrace on startup the moment you try to free the string allocated by asprintf. It can, for some values of umid, end up in a startup crash.

I will amend my patch which was removing the extraneous snprintf in umid shortly to do the opposite - remove the asprintf and use the older snprintf approach.

It may be a good idea to add an include to the user side which redefines asprintf as a compile time error.

-- 
Anton R. Ivanov
Cambridgegreys Limited. Registered in England. Company Number 10273661
https://www.cambridgegreys.com/


_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um


                 reply	other threads:[~2020-11-13  9:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=85e05ffa-d539-b2a9-6e4f-2cc11f49beec@cambridgegreys.com \
    --to=anton.ivanov@cambridgegreys.com \
    --cc=",richard"@nod.at \
    --cc=linux-um@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.