summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/malloc.3
AgeCommit message (Collapse)Author
2012-11-02Add a new malloc option 'U' => "Free unmap" that does the guarding/Damien Miller
unmapping of freed allocations without disabling chunk randomisation like the "Freeguard" ('F') option does. Make security 'S' option use 'U' and not 'F'. Rationale: guarding with no chunk randomisation is great for debugging use-after-free, but chunk randomisation offers better defence against "heap feng shui" style attacks that depend on carefully constructing a particular heap layout so we should leave this enabled when requesting security options.
2011-07-22Show (in the example) that < and > can be used multiple times; ok jmc@Otto Moerbeek
jasper@
2011-07-21- add a MALLOC_OPTIONS section header. the content is already there, but havingJasper Lievisse Adriaanse
a section will help people looking for just the MALLOC_OPTIONS. ok otto@ jmc@
2010-05-26oops - forgot to check for trailing whitespace;Jason McIntyre
2010-05-26reword the 'D' dump bit to make it clear that the malloc.out file needsThordur I. Bjornsson
to exist before exit for malloc to dump stats in it. tweaks from jmc@ ok otto@,jmc@
2010-05-18add posix_madvise, posix_memalign, strndup, and strnlen. mostly fromTed Unangst
brad and millert, with hints from guenther, jmc, and otto I think. ok previous.
2010-01-25stucture -> structure;Jason McIntyre
2010-01-13New options 'S', as a shorthand for the options most suitable as anOtto Moerbeek
extra safeguard (FGJ). Idea from deraadt@; ok deraadt@ dlg@
2009-10-10rewrite the history section, prompted by Paul Stoeber; ok deraadt@ jmc@Otto Moerbeek
2009-02-13kill whitespace at eol;Jason McIntyre
2009-02-13decribe 'F' better and mention flags are debugging aids; ok tedu@ jmc@Otto Moerbeek
2008-12-30Remove mprotecting of struct dir_info introduced in previous commitDamien Miller
(MALLOC_OPTIONS=L). It was too slow to turn on by default, and we don't do optional security. requested by deraadt@ grumbling ok otto@
2008-12-29extra paranoia for malloc(3):Damien Miller
Move all runtime options into a structure that is made read-only (via mprotect) after initialisation to protect against attacks that overwrite options to turn off malloc protections (e.g. use-after-free) Allocate the main bookkeeping data (struct dir_info) using mmap(), thereby giving it an unpredictable address. Place a PROT_NONE guard page on either side to further frustrate attacks on it. Add a new 'L' option that maps struct dir_info PROT_NONE except when in the allocator code itself. Makes attacks on it basically impossible. feedback tedu deraadt otto canacar ok otto
2008-11-26Fix typo, okay jmc@.Pedro Martelletto
2008-11-20move allocations between half a page and a page as close to the end ofOtto Moerbeek
the page as possible (i.e. make malloc option P a default). ok art@ millert@ krw@
2008-11-02fix markup of example line and description of G flag; partly from andOtto Moerbeek
ok jmc@
2008-11-02remove distinction between warnings and errors, ok deraadt@ djm@Otto Moerbeek
2008-08-07small cleanup of error/warning stringsOtto Moerbeek
2008-07-28man page bits for new malloc; ok jmc@Otto Moerbeek
2008-05-20kill an Xr to a non-existent man page, ulimit(1);Jason McIntyre
2008-05-19remove recalloc(3); it is buggy and impossible to repair without bigOtto Moerbeek
costs; ok jmc@ for the man page bits; ok millert@ deraadt@
2007-09-05no need to talk about bits; ok millert jmcTheo de Raadt
2007-09-03Update free(3) section--we use mmap()/munmap(), not brk().Todd C. Miller
Based on a diff from Mike Belopuhov. OK jmc@
2007-09-03add recaloc(3)Todd C. Miller
2007-08-08Clarify the example about avoiding overflow. OK ray@ deraadt@Todd C. Miller
2007-05-31convert to new .Dd format;Jason McIntyre
2006-06-06Fix 'double by a factor of two' and make cache options a bit morePedro Martelletto
descriptive while at it, input and okay jmc@
2006-04-02Use SIZE_MAX instead of SIZE_T_MAX, the latter is not POSIX andOtto Moerbeek
remove redundant check on size. ok millert@ deraadt@
2006-03-26Add warning about malloc(num * size) and recommend calloc() instead,Ray Lai
or if malloc must be used suggest check. Get rid of "one". OK deraadt@ and jmc@, OK kjell@ to earlier version with "one"s.
2006-01-18missing auxillary verbJacob Meuser
"yes, that is correct." jmc@ (a while back)
2005-07-26- typos, punctuation, layout, macro tweaksJared Yanovich
- break long lines ok jmc
2005-06-07no need to insert spacing between list members;Jason McIntyre
2005-06-07adding pointer protection to 'G' was too heavyweight. Since malloc guardTed Unangst
should be generally usable, split this out into option 'P'. ok deraadt
2005-05-24add a note describing latest guard featureTed Unangst
2004-07-02kill dead .Xr to memory(3);Jason McIntyre
from kjell@
2004-02-09punctuate variable; okay jmc@.Marc Espie
2004-02-04H comes before J;Jason McIntyre
2004-02-02'F'reeguard doc, as reported missing by brad. nit free thanks to jmcTed Unangst
2003-11-25wording improvements from Brian Poole;Jason McIntyre
kill a .Pp before a display;
2003-10-16by popular demand, malloc guard pages. insert an unreadable/unwriteableTed Unangst
page after each page size allocation to detect overrun. this is somewhat electric fence like, while attempting to be mostly usable in production. also, use tdeval's chunk randomization code. enabled with the G option. ok deraadt and co.
2003-09-26It is safe to pass free() a NULL pointer since C89; update example toTodd C. Miller
this effect. OK deraadt@ pvalchev@
2003-09-25improve example even moreTheo de Raadt
2003-09-18expand on the realloc no-no section to include adjusting a length beforeTed Unangst
the allocation. ok deraadt@ markus@
2003-06-02Remove the advertising clause in the UCB license which BerkeleyTodd C. Miller
rescinded 22 July 1999. Proofed by myself and Theo.
2003-06-01- section reorderJason McIntyre
- merge COMPATIBILITY - kill whitespace at EOL
2003-05-14Delete reference to /usr/share/doc/papers/malloc.ascii.gz as we do notKenneth R Westerback
have it. We don't even have the directory /usr/share/doc/papers. ok millert@.
2003-01-21typos;Jason McIntyre
ok deraadt@
2001-12-05document how malloc(0) blobbies are stored, and their characterTheo de Raadt
2001-11-05Comment out info on U (utrace) malloc option since we don't support itTodd C. Miller
on OpenBSD.
2001-10-30Grammar. Thanks markus@Thierry Deval