Page MenuHomeFreeBSD

sockstat: Fix segfault when peer has no pid
AcceptedPublic

Authored by dan.mcgregor_usask.ca on May 10 2024, 2:44 AM.
Tags
None
Referenced Files
F151982721: D45147.id.diff
Sat, Apr 11, 10:24 PM
Unknown Object (File)
Sun, Mar 15, 7:17 PM
Unknown Object (File)
Sun, Mar 15, 7:10 PM
Unknown Object (File)
Feb 27 2026, 8:27 PM
Unknown Object (File)
Feb 23 2026, 3:50 AM
Unknown Object (File)
Feb 8 2026, 12:45 PM
Unknown Object (File)
Dec 20 2025, 11:08 AM
Unknown Object (File)
Dec 1 2025, 6:05 PM
Subscribers

Details

Summary

If a dgram socket's remote end is the kernel, there may not
be a file associated with it. I've seen this with gssd's kernel
rpc socket. Arguably the kernel should do something better, but
for now handle the possibility.

Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 57649
Build 54537: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.May 10 2024, 6:12 PM

Thanks, @tuexen and @emaste. This does affect my NFS server on every version I've tried in the 14-STABLE or 15-CURRENT series. 13.3 is unaffected. Looks like everything since commit a83d596f434f in 2022.

I have no commit bit, so if somebody could commit this it'd be appreciated.