Page MenuHomeFreeBSD

Appease Coverty
ClosedPublic

Authored by bret_ketchum_dell.com on Aug 29 2020, 4:19 PM.
Tags
None
Referenced Files
F107415095: D26229.diff
Mon, Jan 13, 8:09 PM
Unknown Object (File)
Thu, Dec 19, 6:02 AM
Unknown Object (File)
Wed, Dec 18, 2:17 PM
Unknown Object (File)
Dec 13 2024, 1:26 PM
Unknown Object (File)
Nov 29 2024, 3:23 AM
Unknown Object (File)
Nov 23 2024, 10:02 PM
Unknown Object (File)
Nov 18 2024, 3:41 PM
Unknown Object (File)
Nov 3 2024, 12:43 PM
Subscribers

Details

Summary

Coverity claims the call to rdma_gid2ip in cma_igmp_send overwrites addr. Use a consistent definition of sockaddr to prevent detections and code changes in the future.

Diff Detail

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

Event Timeline

sys/ofed/include/rdma/ib_addr.h
63 ↗(On Diff #76341)

I believe you should add sockaddr_storage to the union, to get proper alignment.

From what I see, sockaddr does not have any alignment requirements, and the strongest is sockaddr_in6 for 4 bytes. sockaddr_storage ensures 8 bytes when needed.

This revision is now accepted and ready to land.Aug 30 2020, 1:09 PM

Don't forget to MFC to 11 and 12 stable.

This revision was automatically updated to reflect the committed changes.