mailing list of musl libc
 help / color / mirror / code / Atom feed
* overflow() at stdlib.h
@ 2018-07-12 14:25 m0rtal f!w
  2018-07-12 15:42 ` Szabolcs Nagy
  2018-07-13  0:14 ` Rich Felker
  0 siblings, 2 replies; 6+ messages in thread
From: m0rtal f!w @ 2018-07-12 14:25 UTC (permalink / raw)
  To: musl

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

Team,

File: stdlib.h#L:113

i.e
char *realpath (const char *__restrict, char *__restrict);

According to the documentation of realpath() the output buffer needs to be
at least of size PATH_MAX specifying output buffers large enough to handle
the maximum-size possible result from path manipulation functions. (In that
instance, buf's size comes from uv__fs_pathmax_size(). That function
attempts to use pathconf(path, _PC_PATH_MAX) as noted in the realpath(3)
docs)

But over here uv__fs_pathmax_size() nor pathconf(path, _PC_PATH_MAX) is
used.

Passing an inadequately-sized output buffer to a path manipulation function
can result in a buffer overflow. Such functions include realpath()
readlink() PathAppend() and others.

Request team to have a look and validate.


Thank you

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-07-13  0:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-12 14:25 overflow() at stdlib.h m0rtal f!w
2018-07-12 15:42 ` Szabolcs Nagy
2018-07-12 15:51   ` Dhiraj
2018-07-12 16:30     ` Szabolcs Nagy
2018-07-12 16:35       ` Dhiraj
2018-07-13  0:14 ` Rich Felker

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).