#1609 closed defect (duplicate)

Segmentation fault on closing a socket

Reported by: Vinu Rajashekhar Owned by: Eric Norum
Priority: normal Milestone: 4.11
Component: network/legacy Version: 4.11
Severity: normal Keywords:
Cc: jennifer.averett@…, vinutheraj@… Blocked By:
Blocking:

Description

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.

Attachments (2)

close.patch (899 bytes) - added by Vinu Rajashekhar on Jul 9, 2010 at 3:44:56 AM.
patch for close.c
close_v1.patch (492 bytes) - added by Vinu Rajashekhar on Jul 15, 2010 at 10:56:39 AM.
patch for close.c

Download all attachments as: .zip

Change History (6)

Changed on Jul 9, 2010 at 3:44:56 AM by Vinu Rajashekhar

Attachment: close.patch added

patch for close.c

comment:1 Changed on Jul 10, 2010 at 5:29:36 PM by Vinu Rajashekhar

Cc: Vinu Rajashekhar added

Changed on Jul 15, 2010 at 10:56:39 AM by Vinu Rajashekhar

Attachment: close_v1.patch added

patch for close.c

comment:2 Changed on Jul 15, 2010 at 10:56:39 AM by Vinu Rajashekhar

attachments.isobsolete: 01

comment:3 Changed on Jul 15, 2010 at 11:00:02 AM by Vinu Rajashekhar

Resolution: duplicate
Status: newclosed

This is a duplicate of bug 1612

comment:4 Changed on Nov 24, 2014 at 6:58:28 PM by Gedare Bloom

Version: HEAD4.11

Replace Version=HEAD with Version=4.11 for the tickets with Milestone >= 4.11

Note: See TracTickets for help on using tickets.