Page MenuHomeFreeBSD

netinet[6]: make in[6]_control use ucred instead of td
ClosedPublic

Authored by melifaro on Jun 29 2023, 7:03 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 28, 5:07 PM
Unknown Object (File)
Thu, Nov 27, 5:15 PM
Unknown Object (File)
Wed, Nov 26, 9:19 AM
Unknown Object (File)
Fri, Nov 21, 12:45 AM
Unknown Object (File)
Nov 10 2025, 8:27 AM
Unknown Object (File)
Nov 10 2025, 5:37 AM
Unknown Object (File)
Nov 9 2025, 4:24 AM
Unknown Object (File)
Nov 9 2025, 1:03 AM

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj added a subscriber: markj.

Not directly related to the patch, but: nl_pru_attach() does not count its ucred reference, i.e., it does not use crhold() when copying the socket's reference. However, nl_pru_detach() uses a deferred free and does not set nl_cred = NULL before returning to sodealloc(), which releases the ucred reference, so there is a window where netlink holds a dangling ucred reference.

This revision is now accepted and ready to land.Jun 29 2023, 2:40 PM
zlei added a subscriber: zlei.

I'm not familiar with the netlink part, others look good to me.