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)
Wed, May 1, 8:29 PM
Unknown Object (File)
Dec 22 2023, 10:41 PM
Unknown Object (File)
Nov 14 2023, 10:00 PM
Unknown Object (File)
Sep 1 2023, 4:43 PM
Unknown Object (File)
Aug 25 2023, 10:20 AM
Unknown Object (File)
Aug 12 2023, 2:35 AM
Unknown Object (File)
Jul 11 2023, 11:07 PM
Unknown Object (File)
Jul 10 2023, 9:43 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.