Page MenuHomeFreeBSD

tcp: stop all timers in tcp_usr_detach()
AbandonedPublic

Authored by rscheff on Feb 11 2024, 12:13 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 9, 8:39 PM
Unknown Object (File)
Tue, Oct 29, 12:21 PM
Unknown Object (File)
Oct 11 2024, 6:38 AM
Unknown Object (File)
Sep 21 2024, 10:27 AM
Unknown Object (File)
Sep 4 2024, 5:51 AM
Unknown Object (File)
Aug 31 2024, 1:31 PM
Unknown Object (File)
Jul 6 2024, 8:46 PM
Unknown Object (File)
Jul 6 2024, 8:04 PM

Details

Reviewers
glebius
tuexen
rrs
Group Reviewers
transport
Summary

When apruptly detaching a tcp session, stop all timers prior of discarding the tcpcb.

Reported-by: syzbot+9a9aa434a14a2b35c3ba@syzkaller.appspotmail.com
Reported-by: syzbot+e82856782410e895bae7@syzkaller.appspotmail.com

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 55934
Build 52823: arc lint + arc unit

Event Timeline

Please also add:

Reported-by: syzbot+e82856782410e895bae7@syzkaller.appspotmail.com
This revision is now accepted and ready to land.Feb 11 2024, 9:14 AM
This revision now requires review to proceed.Feb 11 2024, 9:54 AM
rscheff retitled this revision from tcp: allow only 2msl timer to run past tcp_discardcb() to tcp: stop all timers in tcp_usr_detach().Feb 11 2024, 11:26 AM
rscheff edited the summary of this revision. (Show Details)

This should fix the panic observed of course. Question is: do we want every TCP state go through tcp_close() in its life cycle? Cause no we got a case that TIME_WAIT will just disappear. There are three options here: 1) use the patch as is 2) add tcp_state_change() here 3) add full tcp_close().

We may want to quickly check in the patch as is and then think better.

This revision is now accepted and ready to land.Feb 12 2024, 4:25 PM

Better revert to the prior state (with tcp_timer_stop() in tcp_discardcb()) - D43855