kern/158340: Possible dereference of null pointer by code that calls replay_find()...

Greg Becker greg at codeconcepts.com
Mon Jun 27 12:50:08 UTC 2011


>Number:         158340
>Category:       kern
>Synopsis:       Possible dereference of null pointer by code that calls replay_find()...
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 27 12:50:07 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Greg Becker
>Release:        8.2
>Organization:
CodeConcepts
>Environment:
>Description:
In replay_find() (src/sys/rpc/replay.c), if a message is found in the DRC but does not have a body then mp is left untouched.  The only caller of replay_find() is svc_getreq(), which assumes that replay_find() returns a valid pointer in this argument.

Now, I don't know if rce_repbody can legitimately be NULL, but for completeness svc_getreq() should probably set repbody to NULL and then check it after the call to replay_find(), and avoid making the call to SVC_REPLY() if repbody is NULL.

replay_find() also should set *mp = NULL if rce_repbody is NULL.


>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list