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)
Feb 27 2025, 5:32 PM
Unknown Object (File)
Feb 8 2025, 1:59 AM
Unknown Object (File)
Feb 7 2025, 11:47 PM
Unknown Object (File)
Feb 7 2025, 11:44 PM
Unknown Object (File)
Feb 3 2025, 1:17 AM
Unknown Object (File)
Jan 26 2025, 3:05 PM
Unknown Object (File)
Jan 23 2025, 9:22 PM
Unknown Object (File)
Jan 23 2025, 6:30 PM

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.