All of lore.kernel.org
 help / color / mirror / Atom feed
* We may want to redefine asprint and vasprintf in the user headers
@ 2020-11-13  9:42 Anton Ivanov
  0 siblings, 0 replies; only message in thread
From: Anton Ivanov @ 2020-11-13  9:42 UTC (permalink / raw)
  To: linux-um, ,richard

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-11-13  9:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-13  9:42 We may want to redefine asprint and vasprintf in the user headers Anton Ivanov

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.