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
Unknown Object (File)
Thu, May 16, 5:23 AM
Unknown Object (File)
Sat, May 11, 10:01 PM
Unknown Object (File)
Sat, May 11, 10:00 PM
Unknown Object (File)
Fri, May 10, 11:26 AM
Unknown Object (File)
Fri, May 10, 5:38 AM
Unknown Object (File)
Wed, May 1, 8:29 PM
Unknown Object (File)
Dec 22 2023, 10:41 PM
Unknown Object (File)
Nov 14 2023, 10:00 PM
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.