Page MenuHomeFreeBSD

raw ip: clear sin_port on bind(2)
AcceptedPublic

Authored by glebius on Thu, Sep 10, 2:03 PM.
Tags
None
Referenced Files
F171555023: D59570.id.diff
Fri, Sep 11, 5:55 PM
F171514275: D59570.id.diff
Fri, Sep 11, 1:21 PM
F171401395: D59570.diff
Thu, Sep 10, 10:29 PM
Unknown Object (File)
Thu, Sep 10, 8:22 PM
Unknown Object (File)
Thu, Sep 10, 8:16 PM
Unknown Object (File)
Thu, Sep 10, 5:13 PM
Unknown Object (File)
Thu, Sep 10, 5:02 PM
Subscribers

Details

Reviewers
bnovkov
pouria
adrian
Group Reviewers
network
Summary

Application may set sin_port to some value. Although this value is not
used by SOCK_RAW, it breaks a check that the address is available. A
perfect fix would be not use sockaddrs for ifaddrs, but that would be a
bigger change.

PR: 298366
Fixes: 948ad32ae1e0811f45e1d38f26636fefed5051f0

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 76747
Build 73630: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Thu, Sep 10, 2:27 PM

What if the application set the sin6_flowinfo too?

What if the application set the sin6_flowinfo too?

Good question. Probably same bug? We just didn't encounter application that sets it.

This change is good by nature. but it would be nice to have a comment above sa_equal in case we forget the original issue