We may want to redefine asprint and vasprintf in the user headers
Anton Ivanov
anton.ivanov at cambridgegreys.com
Fri Nov 13 04:42:32 EST 2020
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/
More information about the linux-um
mailing list