Page MenuHomeFreeBSD

Support clnt_raw's use of FD_SETSIZE as a fake file descriptor.
ClosedPublic

Authored by brooks on Apr 27 2017, 11:43 PM.
Tags
None
Referenced Files
F133653910: D10528.id27800.diff
Mon, Oct 27, 7:37 AM
F133639516: D10528.id27895.diff
Mon, Oct 27, 5:15 AM
Unknown Object (File)
Sun, Oct 26, 11:38 AM
Unknown Object (File)
Thu, Oct 23, 10:28 AM
Unknown Object (File)
Thu, Oct 23, 10:28 AM
Unknown Object (File)
Thu, Oct 23, 10:28 AM
Unknown Object (File)
Thu, Oct 23, 10:28 AM
Unknown Object (File)
Thu, Oct 23, 7:34 AM
Subscribers

Details

Summary

Accomplish this by allocating space for it in __svc_xports and allowing
it to be registered. The failure to allocate space was causing an out of
bounds read in svc_getreq_common(). The failure to register caused PR 211804.

The bug was found with CHERI bounds checking.

PR: 211804
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

FWIW, NetBSD switched to using -1 instead of FD_SETSIZE to allow larger sets. We should probably pick up their assorted RPC fixes at some point.

FWIW, NetBSD switched to using -1 instead of FD_SETSIZE to allow larger sets. We should probably pick up their assorted RPC fixes at some point.

+1

Does supporting code need to be added to not leak the extra bogus descriptor?

lib/libc/rpc/svc.c
116 ↗(On Diff #27800)

This really should be 0, not '\0'.

  • Also deregister fake sockets for raw RPC.
This revision is now accepted and ready to land.Apr 28 2017, 10:27 PM
This revision was automatically updated to reflect the committed changes.