#2075 closed defect (fixed)

NFS using uninitialized heap memory

Reported by: dufault Owned by: Sebastian Huber
Priority: normal Milestone: 4.11
Component: fs Version: 4.11
Severity: major Keywords:
Cc: sebastian.huber@… Blocked By:
Blocking:

Description

I've updated to the head and NFS is crashing in strdup() called from nfs_move_node():

(gdb) print dir->serporid.serporid_u.serporid.arg_u
$19 = {diroparg = {

name = 0xcfcfcfcf "\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374\374", <incomplete sequence \374>...}, sattrarg = {

"0xcfcfcfcf" is what is put in by rtems_malloc_dirty_memory. I don't know the correct fix, but changing two suspicious mallocs() to callocs() hides the problem.

Attachments (2)

nfs.diff (653 bytes) - added by dufault on Sep 29, 2012 at 10:17:51 AM.
Change malloc to calloc to work around NFS crash
0001-nfsclient-PR2075-Fix-node-initialization.patch (1.8 KB) - added by Sebastian Huber on Oct 1, 2012 at 2:41:50 PM.
Fix node initialization

Download all attachments as: .zip

Change History (6)

Changed on Sep 29, 2012 at 10:17:51 AM by dufault

Attachment: nfs.diff added

Change malloc to calloc to work around NFS crash

comment:1 Changed on Oct 1, 2012 at 10:53:15 AM by Sebastian Huber

Owner: changed from Chris Johns to Sebastian Huber
Status: newassigned, sebastian.huber@embedded-brains.de

Changed on Oct 1, 2012 at 2:41:50 PM by Sebastian Huber

Fix node initialization

comment:2 Changed on Oct 1, 2012 at 2:41:50 PM by Sebastian Huber

attachments.isobsolete: 01

comment:3 Changed on Oct 2, 2012 at 12:30:37 PM by Sebastian Huber

Resolution: fixed
Status: assignedclosed

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.