[Bug 1609] New: Segmentation fault on closing a socket

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Fri Jul 9 04:44:58 UTC 2010


https://www.rtems.org/bugzilla/show_bug.cgi?id=1609

           Summary: Segmentation fault on closing a socket
           Product: RTEMS
           Version: HEAD
          Platform: All
        OS/Version: RTEMS
            Status: NEW
          Severity: normal
          Priority: P3
         Component: networking
        AssignedTo: norume at aps.anl.gov
        ReportedBy: vinutheraj at gmail.com
                CC: jennifer.averett at oarcorp.com


Created an attachment (id=867)
 --> (https://www.rtems.org/bugzilla/attachment.cgi?id=867)
patch for close.c

On trying to do rtems_bsdnet_initialize_network in RTEMS, the program was dying
with - "fatal: Trying to execute code outside RAM or ROM at 0xff0720ff". Upon
investigation it was seen that the error was caused inside
rtems_filesystem_freenode, which is called from close.

The problem is caused when a socket is closed. This is because of the line
rtems_filesystem_freenode( &iop->pathinfo ); in cpukit/libcsupport/src/close.c
where the pathinfo struct is 0 for a socket and it is passed to
rtems_filesystem_freenode, which tries to use pathinfo, not checking whether it
is 0.

A patch is attached.

I am CCing Jennifer Averett because I saw her name as the last person who
edited both close.c and freenode.c recently.

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the bugs mailing list