Page MenuHomeFreeBSD

Appease Coverty
ClosedPublic

Authored by bret_ketchum_dell.com on Aug 29 2020, 4:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 15, 10:40 PM
Unknown Object (File)
Wed, May 8, 4:21 AM
Unknown Object (File)
Fri, May 3, 9:28 PM
Unknown Object (File)
Sun, Apr 28, 5:50 AM
Unknown Object (File)
Apr 17 2024, 5:05 PM
Unknown Object (File)
Apr 7 2024, 6:34 AM
Unknown Object (File)
Feb 11 2024, 9:15 AM
Unknown Object (File)
Jan 15 2024, 10:50 AM
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

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

sys/ofed/include/rdma/ib_addr.h
63

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.