There are few subsystems that reference inpcb and allow it to outlive
in_pcbfree(). There are no known bugs with them to unreference the
socket and options pointers for a freed inpcb. Enforce this so that
such bugs don't appear in the future.
Details
Details
- Reviewers
markj - Group Reviewers
network - Commits
- rG4a0c6403b0ec: inpcb: poison several inpcb pointer in in_pcbfree()
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/netinet/in_pcb.c | ||
---|---|---|
1761 | I think this should probably be unconditional? i.e., not dependent on whether INP_IPV6PROTO is set. |
Comment Actions
I'd prefer to leave it conditional if you don't mind. The field is IPv6 specific. In the past I tried to unionize IPv4 and IPv6 stuff in the inpcb. The blunt attempt failed, most likely due to 4to6 mapped connections. Maybe in future I'll make a smarter attempt. If that succeeds, then we should trash v6 pointers only for a INP_IPV6PROTO pcb.
Comment Actions
I don't mind, but IMHO it is a strange argument: it is not much work to move the poisoning back later if needed.