Page MenuHomeFreeBSD

Don't pass size_t arguments to setsockopt(SO_SNDBUF/SO_RCVBUF).
ClosedPublic

Authored by brooks on Apr 27 2017, 12:31 AM.
Tags
None
Referenced Files
F132546986: D10518.id27771.diff
Fri, Oct 17, 9:16 PM
Unknown Object (File)
Fri, Oct 3, 9:24 PM
Unknown Object (File)
Sun, Sep 21, 4:26 AM
Unknown Object (File)
Sat, Sep 20, 10:46 PM
Unknown Object (File)
Aug 5 2025, 1:22 PM
Unknown Object (File)
Jun 30 2025, 2:59 AM
Unknown Object (File)
Jun 26 2025, 3:02 PM
Unknown Object (File)
Jun 24 2025, 7:58 AM
Subscribers
None

Details

Summary

These command take an int. The tests work by accident on little-endian
systems.

Tested with: qemu-cheri and CheriBSD built for mips64
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
MFC after: 1 week

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Oops. LGTM. This seems like a good candidate for a Coverity check.

This revision is now accepted and ready to land.Apr 27 2017, 2:44 AM

I've added a not even compiled change in D10519 which would have caught this.

Could you please add testing done on the Cheri emulator?

In D10518#217952, @ngie wrote:

Could you please add testing done on the Cheri emulator?

I'm not sure what you're asking. FYI, this is broken on all big-endian 64-bit systems.

This revision was automatically updated to reflect the committed changes.