kern/158340: Possible dereference of null pointer by code that
greg at codeconcepts.com
Mon Jun 27 12:50:08 UTC 2011
>Synopsis: Possible dereference of null pointer by code that calls replay_find()...
>Arrival-Date: Mon Jun 27 12:50:07 UTC 2011
>Originator: Greg Becker
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.
More information about the freebsd-bugs