[PATCH v3] Don't allow attackers to inject arbitrary data into stack through LD_DEBUG
Paul Eggert
eggert@cs.ucla.edu
Mon Aug 10 15:38:00 GMT 2015
Alex Dowad wrote:
> _dl_error_printf ("\
> warning: debug option `%.*s' unknown; try LD_DEBUG=help\n", (int)len, dl_debug);
Since this patch is about security, I suggest truncating the diagnostic a bit
less randomly (as the above code will do if len exceeds INT_MAX). It can cause
trouble to the user to get gigabyte-long diagnostics, and nothing after the
first few bytes is helpful for diagnosis anyway. Plus, while we're at it, the
indenting should be fixed and we shouldn't quote with grave accent. Something
like the attached (untested) patch, perhaps.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rtld.patch
Type: text/x-diff
Size: 609 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20150810/c4928c75/attachment.bin>
More information about the Libc-alpha
mailing list