public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcj/24170]  New: [SECURITY] readdir_r considered harmful
@ 2005-10-02 23:12 ben at decadentplace dot org dot uk
  2005-10-02 23:16 ` [Bug libgcj/24170] " ben at decadentplace dot org dot uk
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: ben at decadentplace dot org dot uk @ 2005-10-02 23:12 UTC (permalink / raw)
  To: java-prs

The function java::io::File::performList in libjava/java/io/natFilePosix.cc
calls readdir_r using a stack buffer with pathconf(path, _PC_NAME_MAX) + 1
extra bytes. It does not check for failure of pathconf(). Also there is a race
condition between opendir() and pathconf(). This may well be exploitable for
denial of service and code injection, particularly on Solaris and other
platforms where struct dirent is defined with a small d_name array.

I am attaching a draft copy of a security advisory that I intend to publish on
1st November.

Please let me know if you have any unanswered questions about this issue
or wish to provide information about workarounds, mitigation or versions
that are or are not vulnerable for inclusion in the advisory.


-- 
           Summary: [SECURITY] readdir_r considered harmful
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: major
          Priority: P1
         Component: libgcj
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ben at decadentplace dot org dot uk


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24170


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

end of thread, other threads:[~2008-02-20 19:10 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-02 23:12 [Bug libgcj/24170] New: [SECURITY] readdir_r considered harmful ben at decadentplace dot org dot uk
2005-10-02 23:16 ` [Bug libgcj/24170] " ben at decadentplace dot org dot uk
2005-10-02 23:20 ` pinskia at gcc dot gnu dot org
2005-10-02 23:28 ` [Bug libgcj/24170] natFilePosix.cc seems to have a security problem pinskia at gcc dot gnu dot org
2005-10-02 23:38 ` ben at decadentplace dot org dot uk
2005-10-03  1:01 ` dberlin at dberlin dot org
2005-10-03 14:28 ` tromey at gcc dot gnu dot org
2005-11-10 11:33 ` ben at decadentplace dot org dot uk
2008-02-20 18:27 ` [Bug libgcj/24170] libjava " jason at gcc dot gnu dot org
2008-02-20 18:38 ` tromey at gcc dot gnu dot org
2008-02-20 19:09 ` tromey at gcc dot gnu dot org
2008-02-20 19:10 ` tromey at gcc dot gnu dot org

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 read-only IMAP folder(s) and NNTP newsgroup(s).